@taiga-ui/core 4.68.0 → 5.0.0-canary.0c88239

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 (659) hide show
  1. package/README.md +1 -1
  2. package/classes/accessors.d.ts +2 -2
  3. package/classes/driver.d.ts +1 -1
  4. package/components/button/button.directive.d.ts +2 -3
  5. package/components/button/button.options.d.ts +1 -1
  6. package/components/calendar/calendar-sheet.component.d.ts +2 -7
  7. package/components/calendar/calendar-sheet.options.d.ts +1 -3
  8. package/{pipes/calendar-sheet → components/calendar}/calendar-sheet.pipe.d.ts +2 -2
  9. package/components/calendar/calendar-spin.component.d.ts +1 -0
  10. package/components/calendar/calendar-year.component.d.ts +1 -1
  11. package/components/calendar/calendar.options.d.ts +9 -0
  12. package/components/calendar/index.d.ts +3 -0
  13. package/{pipes/order-week-days → components/calendar}/order-week-days.pipe.d.ts +1 -1
  14. package/components/cell/cell.directive.d.ts +9 -0
  15. package/components/cell/cell.options.d.ts +6 -0
  16. package/components/cell/index.d.ts +2 -0
  17. package/components/data-list/data-list.component.d.ts +8 -12
  18. package/components/data-list/data-list.d.ts +3 -4
  19. package/components/data-list/data-list.tokens.d.ts +1 -20
  20. package/components/data-list/index.d.ts +4 -4
  21. package/components/data-list/opt-group.directive.d.ts +2 -2
  22. package/components/data-list/option-content.directive.d.ts +14 -0
  23. package/components/data-list/option-with-content.directive.d.ts +9 -0
  24. package/components/data-list/option-with-value.directive.d.ts +10 -0
  25. package/components/data-list/option.directive.d.ts +15 -0
  26. package/components/error/error.component.d.ts +6 -8
  27. package/components/error/error.d.ts +4 -0
  28. package/components/error/error.directive.d.ts +19 -0
  29. package/components/error/error.pipe.d.ts +10 -0
  30. package/components/error/index.d.ts +3 -0
  31. package/components/expand/expand.component.d.ts +9 -28
  32. package/components/expand/index.d.ts +0 -2
  33. package/components/icon/icon.component.d.ts +6 -11
  34. package/components/index.d.ts +3 -3
  35. package/components/input/index.d.ts +2 -0
  36. package/components/input/input.d.ts +5 -0
  37. package/components/input/input.directive.d.ts +29 -0
  38. package/components/label/label.directive.d.ts +1 -1
  39. package/components/link/index.d.ts +0 -1
  40. package/components/link/link.directive.d.ts +8 -6
  41. package/components/loader/loader.component.d.ts +7 -7
  42. package/components/loader/loader.options.d.ts +1 -3
  43. package/components/notification/index.d.ts +3 -0
  44. package/components/notification/notification.component.d.ts +14 -0
  45. package/components/notification/notification.d.ts +3 -0
  46. package/components/notification/notification.directive.d.ts +7 -12
  47. package/components/notification/notification.options.d.ts +10 -7
  48. package/components/notification/notification.service.d.ts +17 -0
  49. package/components/root/root.component.d.ts +4 -7
  50. package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
  51. package/components/scrollbar/scroll-ref.directive.d.ts +2 -0
  52. package/components/scrollbar/scrollbar.component.d.ts +1 -5
  53. package/components/scrollbar/scrollbar.directive.d.ts +2 -2
  54. package/components/scrollbar/scrollbar.options.d.ts +1 -1
  55. package/components/spin-button/spin-button.component.d.ts +9 -10
  56. package/components/textfield/index.d.ts +1 -4
  57. package/components/textfield/textfield-content.directive.d.ts +3 -2
  58. package/components/textfield/textfield-icon.d.ts +3 -3
  59. package/components/textfield/textfield-multi/textfield-item.component.d.ts +3 -2
  60. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +9 -15
  61. package/components/textfield/textfield.component.d.ts +20 -35
  62. package/components/textfield/textfield.d.ts +2 -4
  63. package/components/textfield/textfield.options.d.ts +8 -11
  64. package/{directives → components}/title/title.directive.d.ts +2 -3
  65. package/directives/appearance/appearance.directive.d.ts +5 -13
  66. package/directives/appearance/appearance.options.d.ts +1 -2
  67. package/directives/button-x/button-x.directive.d.ts +6 -0
  68. package/directives/button-x/index.d.ts +1 -0
  69. package/directives/date-format/date-format.directive.d.ts +3 -7
  70. package/directives/group/group.directive.d.ts +7 -7
  71. package/directives/group/group.options.d.ts +1 -3
  72. package/directives/icons/icons.bindings.d.ts +5 -0
  73. package/directives/icons/icons.directive.d.ts +8 -16
  74. package/directives/icons/index.d.ts +1 -0
  75. package/directives/index.d.ts +1 -5
  76. package/directives/items-handlers/items-handlers.directive.d.ts +5 -9
  77. package/directives/items-handlers/items-handlers.tokens.d.ts +4 -4
  78. package/directives/number-format/number-format.directive.d.ts +3 -7
  79. package/fesm2022/taiga-ui-core-classes.mjs +9 -11
  80. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-core-components-button.mjs +14 -21
  82. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-core-components-calendar.mjs +139 -52
  84. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-core-components-cell.mjs +45 -0
  86. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -0
  87. package/fesm2022/taiga-ui-core-components-data-list.mjs +108 -270
  88. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-core-components-error.mjs +108 -26
  90. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-core-components-expand.mjs +34 -132
  92. package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-core-components-icon.mjs +21 -43
  94. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-core-components-input.mjs +100 -0
  96. package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -0
  97. package/fesm2022/taiga-ui-core-components-label.mjs +15 -18
  98. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-core-components-link.mjs +17 -36
  100. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-core-components-loader.mjs +20 -40
  102. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-core-components-notification.mjs +106 -66
  104. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-core-components-root.mjs +23 -60
  106. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +76 -96
  108. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-core-components-spin-button.mjs +18 -31
  110. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  111. package/fesm2022/taiga-ui-core-components-textfield.mjs +140 -439
  112. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-core-components-title.mjs +39 -0
  114. package/fesm2022/taiga-ui-core-components-title.mjs.map +1 -0
  115. package/fesm2022/taiga-ui-core-components.mjs +3 -3
  116. package/fesm2022/taiga-ui-core-directives-appearance.mjs +36 -75
  117. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  118. package/fesm2022/taiga-ui-core-directives-button-x.mjs +51 -0
  119. package/fesm2022/taiga-ui-core-directives-button-x.mjs.map +1 -0
  120. package/fesm2022/taiga-ui-core-directives-date-format.mjs +26 -20
  121. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  122. package/fesm2022/taiga-ui-core-directives-group.mjs +27 -40
  123. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  124. package/fesm2022/taiga-ui-core-directives-icons.mjs +37 -45
  125. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  126. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +21 -51
  127. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  128. package/fesm2022/taiga-ui-core-directives-number-format.mjs +32 -20
  129. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  130. package/fesm2022/taiga-ui-core-directives.mjs +1 -5
  131. package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
  132. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -15
  133. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  134. package/fesm2022/taiga-ui-core-pipes.mjs +0 -8
  135. package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
  136. package/fesm2022/taiga-ui-core-portals-alert.mjs +73 -0
  137. package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -0
  138. package/fesm2022/taiga-ui-core-portals-dialog.mjs +157 -0
  139. package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -0
  140. package/fesm2022/{taiga-ui-core-directives-dropdown.mjs → taiga-ui-core-portals-dropdown.mjs} +252 -429
  141. package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -0
  142. package/fesm2022/taiga-ui-core-portals-hint.mjs +544 -0
  143. package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -0
  144. package/fesm2022/taiga-ui-core-portals-modal.mjs +89 -0
  145. package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -0
  146. package/fesm2022/taiga-ui-core-portals-popup.mjs +52 -0
  147. package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -0
  148. package/fesm2022/taiga-ui-core-portals.mjs +11 -0
  149. package/fesm2022/taiga-ui-core-portals.mjs.map +1 -0
  150. package/fesm2022/taiga-ui-core-services.mjs +18 -84
  151. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  152. package/fesm2022/taiga-ui-core-tokens.mjs +65 -106
  153. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  154. package/fesm2022/taiga-ui-core-utils-dom.mjs.map +1 -1
  155. package/fesm2022/taiga-ui-core-utils-format.mjs +1 -22
  156. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  157. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +55 -19
  158. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  159. package/fesm2022/taiga-ui-core.mjs +1 -1
  160. package/index.d.ts +1 -1
  161. package/package.json +58 -179
  162. package/pipes/format-number/format-number.pipe.d.ts +6 -4
  163. package/pipes/index.d.ts +0 -8
  164. package/portals/alert/alert.directive.d.ts +11 -0
  165. package/portals/alert/alert.service.d.ts +12 -0
  166. package/portals/alert/index.d.ts +2 -0
  167. package/portals/dialog/dialog.component.d.ts +14 -0
  168. package/portals/dialog/dialog.directive.d.ts +8 -0
  169. package/{components → portals}/dialog/dialog.factory.d.ts +1 -1
  170. package/portals/dialog/dialog.options.d.ts +25 -0
  171. package/{components/dialog/dialog-close.service.d.ts → portals/dialog/dialog.providers.d.ts} +2 -0
  172. package/portals/dialog/dialog.service.d.ts +10 -0
  173. package/portals/dialog/index.d.ts +6 -0
  174. package/portals/dropdown/dropdown-close.directive.d.ts +15 -0
  175. package/portals/dropdown/dropdown-content.directive.d.ts +9 -0
  176. package/{directives → portals}/dropdown/dropdown-context.directive.d.ts +0 -1
  177. package/{directives → portals}/dropdown/dropdown-hover.directive.d.ts +5 -10
  178. package/{directives → portals}/dropdown/dropdown-hover.options.d.ts +1 -3
  179. package/{directives → portals}/dropdown/dropdown-manual.directive.d.ts +2 -2
  180. package/portals/dropdown/dropdown-open.directive.d.ts +29 -0
  181. package/{directives → portals}/dropdown/dropdown-options.directive.d.ts +1 -5
  182. package/{directives → portals}/dropdown/dropdown-position-sided.directive.d.ts +3 -3
  183. package/{directives → portals}/dropdown/dropdown-position.directive.d.ts +6 -6
  184. package/{directives → portals}/dropdown/dropdown-selection.directive.d.ts +4 -5
  185. package/{directives → portals}/dropdown/dropdown.bindings.d.ts +0 -1
  186. package/{directives → portals}/dropdown/dropdown.d.ts +2 -3
  187. package/{directives → portals}/dropdown/dropdown.directive.d.ts +6 -8
  188. package/{directives → portals}/dropdown/index.d.ts +2 -4
  189. package/{directives → portals}/hint/hint-describe.directive.d.ts +4 -6
  190. package/{directives → portals}/hint/hint-host.directive.d.ts +2 -2
  191. package/{directives → portals}/hint/hint-hover.directive.d.ts +3 -4
  192. package/{directives → portals}/hint/hint-manual.directive.d.ts +2 -2
  193. package/portals/hint/hint-options.directive.d.ts +17 -0
  194. package/{directives → portals}/hint/hint-overflow.directive.d.ts +2 -2
  195. package/{directives → portals}/hint/hint-position.directive.d.ts +7 -8
  196. package/{directives → portals}/hint/hint-unstyled.component.d.ts +2 -7
  197. package/portals/hint/hint.component.d.ts +29 -0
  198. package/{directives → portals}/hint/hint.d.ts +1 -2
  199. package/portals/hint/hint.directive.d.ts +24 -0
  200. package/{directives → portals}/hint/index.d.ts +0 -2
  201. package/portals/index.d.ts +6 -0
  202. package/portals/modal/index.d.ts +2 -0
  203. package/portals/modal/modal.component.d.ts +17 -0
  204. package/portals/modal/modal.service.d.ts +13 -0
  205. package/portals/popup/popup.directive.d.ts +12 -0
  206. package/{directives → portals}/popup/popup.service.d.ts +1 -1
  207. package/{directives → portals}/popup/popups.component.d.ts +2 -2
  208. package/services/index.d.ts +0 -3
  209. package/styles/components/appearance.less +7 -1
  210. package/styles/components/button.less +13 -25
  211. package/styles/components/group.less +1 -1
  212. package/styles/components/icon.less +43 -22
  213. package/styles/components/icons.less +19 -14
  214. package/styles/components/label.less +4 -13
  215. package/styles/components/link.less +11 -28
  216. package/styles/components/notification.less +33 -67
  217. package/styles/components/textfield.less +128 -213
  218. package/styles/components/title.less +13 -13
  219. package/styles/mixins/appearance.less +11 -26
  220. package/styles/mixins/appearance.scss +9 -24
  221. package/styles/mixins/date-picker.less +1 -1
  222. package/styles/mixins/mixins.less +1 -7
  223. package/styles/mixins/mixins.scss +1 -7
  224. package/styles/mixins/picker.less +1 -1
  225. package/styles/mixins/picker.scss +1 -1
  226. package/styles/mixins/slider.less +31 -30
  227. package/styles/mixins/slider.scss +28 -32
  228. package/styles/taiga-ui-local.less +0 -1
  229. package/styles/taiga-ui-local.scss +0 -1
  230. package/styles/taiga-ui-theme.less +0 -1
  231. package/styles/theme/appearance/action.less +0 -14
  232. package/styles/theme/appearance/floating.less +5 -0
  233. package/styles/theme/appearance/outline.less +9 -18
  234. package/styles/theme/appearance/primary.less +2 -4
  235. package/styles/theme/appearance/secondary.less +6 -14
  236. package/styles/theme/appearance/status.less +0 -4
  237. package/styles/theme/appearance/table.less +36 -35
  238. package/styles/theme/appearance/textfield.less +27 -28
  239. package/styles/theme/appearance.less +0 -1
  240. package/styles/theme/variables.less +16 -19
  241. package/styles/variables/media.less +13 -18
  242. package/styles/variables/media.scss +13 -13
  243. package/tokens/breakpoint.d.ts +4 -0
  244. package/tokens/common-icons.d.ts +3 -3
  245. package/tokens/date-format.d.ts +2 -3
  246. package/tokens/i18n.d.ts +8 -8
  247. package/tokens/icon-resolver.d.ts +1 -5
  248. package/tokens/icons.d.ts +0 -4
  249. package/tokens/index.d.ts +2 -5
  250. package/tokens/number-format.d.ts +2 -3
  251. package/tokens/validation-errors.d.ts +4 -0
  252. package/types/direction.d.ts +1 -1
  253. package/types/index.d.ts +0 -3
  254. package/types/point.d.ts +1 -1
  255. package/types/size.d.ts +0 -11
  256. package/utils/format/index.d.ts +0 -1
  257. package/utils/miscellaneous/get-duration.d.ts +2 -0
  258. package/utils/miscellaneous/index.d.ts +2 -1
  259. package/utils/miscellaneous/provide-taiga.d.ts +13 -0
  260. package/animations/animations.d.ts +0 -109
  261. package/animations/index.d.ts +0 -1
  262. package/components/alert/alert.component.d.ts +0 -15
  263. package/components/alert/alert.directive.d.ts +0 -7
  264. package/components/alert/alert.interfaces.d.ts +0 -12
  265. package/components/alert/alert.service.d.ts +0 -7
  266. package/components/alert/alert.tokens.d.ts +0 -12
  267. package/components/alert/alerts.component.d.ts +0 -12
  268. package/components/alert/index.d.ts +0 -6
  269. package/components/data-list/data-list.directive.d.ts +0 -7
  270. package/components/data-list/option/option-content.d.ts +0 -16
  271. package/components/data-list/option/option-legacy.component.d.ts +0 -24
  272. package/components/data-list/option/option.directive.d.ts +0 -27
  273. package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
  274. package/components/dialog/dialog.component.d.ts +0 -20
  275. package/components/dialog/dialog.directive.d.ts +0 -7
  276. package/components/dialog/dialog.interfaces.d.ts +0 -34
  277. package/components/dialog/dialog.service.d.ts +0 -7
  278. package/components/dialog/dialog.tokens.d.ts +0 -15
  279. package/components/dialog/dialogs.component.d.ts +0 -8
  280. package/components/dialog/index.d.ts +0 -8
  281. package/components/expand/expand-content.directive.d.ts +0 -8
  282. package/components/expand/expand.d.ts +0 -6
  283. package/components/fullscreen/fullscreen.component.d.ts +0 -14
  284. package/components/fullscreen/index.d.ts +0 -1
  285. package/components/link/link.options.d.ts +0 -12
  286. package/components/textfield/select.directive.d.ts +0 -19
  287. package/components/textfield/textfield-dropdown.directive.d.ts +0 -16
  288. package/components/textfield/textfield.directive.d.ts +0 -38
  289. package/directives/dropdown/dropdown-open-legacy.directive.d.ts +0 -12
  290. package/directives/dropdown/dropdown-open.directive.d.ts +0 -33
  291. package/directives/dropdown/dropdown-portal.directive.d.ts +0 -14
  292. package/directives/dropdown/dropdown.service.d.ts +0 -6
  293. package/directives/dropdown/dropdowns.component.d.ts +0 -9
  294. package/directives/hint/hint-options.directive.d.ts +0 -36
  295. package/directives/hint/hint.component.d.ts +0 -30
  296. package/directives/hint/hint.directive.d.ts +0 -26
  297. package/directives/hint/hint.service.d.ts +0 -13
  298. package/directives/hint/hints.component.d.ts +0 -12
  299. package/directives/popup/popup.directive.d.ts +0 -11
  300. package/directives/surface/index.d.ts +0 -1
  301. package/directives/surface/surface.directive.d.ts +0 -8
  302. package/esm2022/animations/animations.mjs +0 -363
  303. package/esm2022/animations/index.mjs +0 -2
  304. package/esm2022/animations/taiga-ui-core-animations.mjs +0 -5
  305. package/esm2022/classes/accessors.mjs +0 -31
  306. package/esm2022/classes/driver.mjs +0 -36
  307. package/esm2022/classes/index.mjs +0 -4
  308. package/esm2022/classes/taiga-ui-core-classes.mjs +0 -5
  309. package/esm2022/classes/vehicle.mjs +0 -7
  310. package/esm2022/components/alert/alert.component.mjs +0 -43
  311. package/esm2022/components/alert/alert.directive.mjs +0 -21
  312. package/esm2022/components/alert/alert.interfaces.mjs +0 -2
  313. package/esm2022/components/alert/alert.service.mjs +0 -18
  314. package/esm2022/components/alert/alert.tokens.mjs +0 -51
  315. package/esm2022/components/alert/alerts.component.mjs +0 -33
  316. package/esm2022/components/alert/index.mjs +0 -6
  317. package/esm2022/components/alert/taiga-ui-core-components-alert.mjs +0 -5
  318. package/esm2022/components/button/button.directive.mjs +0 -43
  319. package/esm2022/components/button/button.options.mjs +0 -7
  320. package/esm2022/components/button/index.mjs +0 -3
  321. package/esm2022/components/button/taiga-ui-core-components-button.mjs +0 -5
  322. package/esm2022/components/calendar/calendar-sheet.component.mjs +0 -168
  323. package/esm2022/components/calendar/calendar-sheet.options.mjs +0 -12
  324. package/esm2022/components/calendar/calendar-spin.component.mjs +0 -53
  325. package/esm2022/components/calendar/calendar-year.component.mjs +0 -128
  326. package/esm2022/components/calendar/calendar.component.mjs +0 -147
  327. package/esm2022/components/calendar/index.mjs +0 -6
  328. package/esm2022/components/calendar/taiga-ui-core-components-calendar.mjs +0 -5
  329. package/esm2022/components/data-list/data-list.component.mjs +0 -139
  330. package/esm2022/components/data-list/data-list.directive.mjs +0 -19
  331. package/esm2022/components/data-list/data-list.mjs +0 -14
  332. package/esm2022/components/data-list/data-list.tokens.mjs +0 -18
  333. package/esm2022/components/data-list/index.mjs +0 -9
  334. package/esm2022/components/data-list/opt-group.directive.mjs +0 -21
  335. package/esm2022/components/data-list/option/option-content.mjs +0 -36
  336. package/esm2022/components/data-list/option/option-legacy.component.mjs +0 -90
  337. package/esm2022/components/data-list/option/option.directive.mjs +0 -109
  338. package/esm2022/components/data-list/taiga-ui-core-components-data-list.mjs +0 -5
  339. package/esm2022/components/dialog/active-zone-adapter.directive.mjs +0 -37
  340. package/esm2022/components/dialog/dialog-close.service.mjs +0 -41
  341. package/esm2022/components/dialog/dialog.component.mjs +0 -63
  342. package/esm2022/components/dialog/dialog.directive.mjs +0 -21
  343. package/esm2022/components/dialog/dialog.factory.mjs +0 -15
  344. package/esm2022/components/dialog/dialog.interfaces.mjs +0 -2
  345. package/esm2022/components/dialog/dialog.service.mjs +0 -18
  346. package/esm2022/components/dialog/dialog.tokens.mjs +0 -33
  347. package/esm2022/components/dialog/dialogs.component.mjs +0 -31
  348. package/esm2022/components/dialog/index.mjs +0 -8
  349. package/esm2022/components/dialog/taiga-ui-core-components-dialog.mjs +0 -5
  350. package/esm2022/components/error/error.component.mjs +0 -34
  351. package/esm2022/components/error/index.mjs +0 -2
  352. package/esm2022/components/error/taiga-ui-core-components-error.mjs +0 -5
  353. package/esm2022/components/expand/expand-content.directive.mjs +0 -18
  354. package/esm2022/components/expand/expand.component.mjs +0 -124
  355. package/esm2022/components/expand/expand.mjs +0 -7
  356. package/esm2022/components/expand/index.mjs +0 -4
  357. package/esm2022/components/expand/taiga-ui-core-components-expand.mjs +0 -5
  358. package/esm2022/components/fullscreen/fullscreen.component.mjs +0 -71
  359. package/esm2022/components/fullscreen/index.mjs +0 -2
  360. package/esm2022/components/fullscreen/taiga-ui-core-components-fullscreen.mjs +0 -5
  361. package/esm2022/components/icon/icon.component.mjs +0 -44
  362. package/esm2022/components/icon/icon.pipe.mjs +0 -19
  363. package/esm2022/components/icon/index.mjs +0 -3
  364. package/esm2022/components/icon/taiga-ui-core-components-icon.mjs +0 -5
  365. package/esm2022/components/index.mjs +0 -18
  366. package/esm2022/components/label/index.mjs +0 -2
  367. package/esm2022/components/label/label.directive.mjs +0 -41
  368. package/esm2022/components/label/taiga-ui-core-components-label.mjs +0 -5
  369. package/esm2022/components/link/index.mjs +0 -3
  370. package/esm2022/components/link/link.directive.mjs +0 -47
  371. package/esm2022/components/link/link.options.mjs +0 -13
  372. package/esm2022/components/link/taiga-ui-core-components-link.mjs +0 -5
  373. package/esm2022/components/loader/index.mjs +0 -3
  374. package/esm2022/components/loader/loader.component.mjs +0 -46
  375. package/esm2022/components/loader/loader.options.mjs +0 -18
  376. package/esm2022/components/loader/taiga-ui-core-components-loader.mjs +0 -5
  377. package/esm2022/components/notification/index.mjs +0 -3
  378. package/esm2022/components/notification/notification.directive.mjs +0 -81
  379. package/esm2022/components/notification/notification.options.mjs +0 -23
  380. package/esm2022/components/notification/taiga-ui-core-components-notification.mjs +0 -5
  381. package/esm2022/components/root/index.mjs +0 -2
  382. package/esm2022/components/root/root.component.mjs +0 -87
  383. package/esm2022/components/root/taiga-ui-core-components-root.mjs +0 -5
  384. package/esm2022/components/scrollbar/index.mjs +0 -9
  385. package/esm2022/components/scrollbar/scroll-controls.component.mjs +0 -32
  386. package/esm2022/components/scrollbar/scroll-into-view.directive.mjs +0 -43
  387. package/esm2022/components/scrollbar/scroll-ref.directive.mjs +0 -19
  388. package/esm2022/components/scrollbar/scrollable.directive.mjs +0 -26
  389. package/esm2022/components/scrollbar/scrollbar.component.mjs +0 -72
  390. package/esm2022/components/scrollbar/scrollbar.directive.mjs +0 -93
  391. package/esm2022/components/scrollbar/scrollbar.options.mjs +0 -6
  392. package/esm2022/components/scrollbar/scrollbar.service.mjs +0 -46
  393. package/esm2022/components/scrollbar/taiga-ui-core-components-scrollbar.mjs +0 -5
  394. package/esm2022/components/spin-button/index.mjs +0 -2
  395. package/esm2022/components/spin-button/spin-button.component.mjs +0 -51
  396. package/esm2022/components/spin-button/taiga-ui-core-components-spin-button.mjs +0 -5
  397. package/esm2022/components/taiga-ui-core-components.mjs +0 -5
  398. package/esm2022/components/textfield/index.mjs +0 -16
  399. package/esm2022/components/textfield/select-like.directive.mjs +0 -44
  400. package/esm2022/components/textfield/select.directive.mjs +0 -64
  401. package/esm2022/components/textfield/taiga-ui-core-components-textfield.mjs +0 -5
  402. package/esm2022/components/textfield/textfield-accessor.mjs +0 -7
  403. package/esm2022/components/textfield/textfield-auxiliary.mjs +0 -7
  404. package/esm2022/components/textfield/textfield-content.directive.mjs +0 -22
  405. package/esm2022/components/textfield/textfield-dropdown.directive.mjs +0 -43
  406. package/esm2022/components/textfield/textfield-icon.mjs +0 -10
  407. package/esm2022/components/textfield/textfield-multi/textfield-item.component.mjs +0 -37
  408. package/esm2022/components/textfield/textfield-multi/textfield-multi.component.mjs +0 -145
  409. package/esm2022/components/textfield/textfield.component.mjs +0 -183
  410. package/esm2022/components/textfield/textfield.directive.mjs +0 -134
  411. package/esm2022/components/textfield/textfield.mjs +0 -19
  412. package/esm2022/components/textfield/textfield.options.mjs +0 -63
  413. package/esm2022/components/textfield/with-native-picker.directive.mjs +0 -24
  414. package/esm2022/directives/appearance/appearance.bindings.mjs +0 -15
  415. package/esm2022/directives/appearance/appearance.directive.mjs +0 -79
  416. package/esm2022/directives/appearance/appearance.options.mjs +0 -12
  417. package/esm2022/directives/appearance/index.mjs +0 -5
  418. package/esm2022/directives/appearance/taiga-ui-core-directives-appearance.mjs +0 -5
  419. package/esm2022/directives/appearance/with-appearance.mjs +0 -27
  420. package/esm2022/directives/date-format/date-format.directive.mjs +0 -31
  421. package/esm2022/directives/date-format/index.mjs +0 -2
  422. package/esm2022/directives/date-format/taiga-ui-core-directives-date-format.mjs +0 -5
  423. package/esm2022/directives/dropdown/dropdown-context.directive.mjs +0 -76
  424. package/esm2022/directives/dropdown/dropdown-hover.directive.mjs +0 -70
  425. package/esm2022/directives/dropdown/dropdown-hover.options.mjs +0 -17
  426. package/esm2022/directives/dropdown/dropdown-limit-width.mjs +0 -37
  427. package/esm2022/directives/dropdown/dropdown-manual.directive.mjs +0 -27
  428. package/esm2022/directives/dropdown/dropdown-open-legacy.directive.mjs +0 -33
  429. package/esm2022/directives/dropdown/dropdown-open.directive.mjs +0 -169
  430. package/esm2022/directives/dropdown/dropdown-options.directive.mjs +0 -73
  431. package/esm2022/directives/dropdown/dropdown-portal.directive.mjs +0 -34
  432. package/esm2022/directives/dropdown/dropdown-position-sided.directive.mjs +0 -69
  433. package/esm2022/directives/dropdown/dropdown-position.directive.mjs +0 -88
  434. package/esm2022/directives/dropdown/dropdown-selection.directive.mjs +0 -159
  435. package/esm2022/directives/dropdown/dropdown.bindings.mjs +0 -19
  436. package/esm2022/directives/dropdown/dropdown.component.mjs +0 -92
  437. package/esm2022/directives/dropdown/dropdown.directive.mjs +0 -110
  438. package/esm2022/directives/dropdown/dropdown.driver.mjs +0 -32
  439. package/esm2022/directives/dropdown/dropdown.mjs +0 -29
  440. package/esm2022/directives/dropdown/dropdown.providers.mjs +0 -10
  441. package/esm2022/directives/dropdown/dropdown.service.mjs +0 -15
  442. package/esm2022/directives/dropdown/dropdowns.component.mjs +0 -24
  443. package/esm2022/directives/dropdown/index.mjs +0 -22
  444. package/esm2022/directives/dropdown/taiga-ui-core-directives-dropdown.mjs +0 -5
  445. package/esm2022/directives/dropdown/with-dropdown-open.directive.mjs +0 -23
  446. package/esm2022/directives/group/group.directive.mjs +0 -53
  447. package/esm2022/directives/group/group.options.mjs +0 -15
  448. package/esm2022/directives/group/index.mjs +0 -3
  449. package/esm2022/directives/group/taiga-ui-core-directives-group.mjs +0 -5
  450. package/esm2022/directives/hint/hint-describe.directive.mjs +0 -50
  451. package/esm2022/directives/hint/hint-driver.directive.mjs +0 -19
  452. package/esm2022/directives/hint/hint-host.directive.mjs +0 -27
  453. package/esm2022/directives/hint/hint-hover.directive.mjs +0 -59
  454. package/esm2022/directives/hint/hint-manual.directive.mjs +0 -33
  455. package/esm2022/directives/hint/hint-options.directive.mjs +0 -86
  456. package/esm2022/directives/hint/hint-overflow.directive.mjs +0 -38
  457. package/esm2022/directives/hint/hint-pointer.directive.mjs +0 -33
  458. package/esm2022/directives/hint/hint-position.directive.mjs +0 -115
  459. package/esm2022/directives/hint/hint-unstyled.component.mjs +0 -39
  460. package/esm2022/directives/hint/hint.component.mjs +0 -127
  461. package/esm2022/directives/hint/hint.directive.mjs +0 -99
  462. package/esm2022/directives/hint/hint.mjs +0 -27
  463. package/esm2022/directives/hint/hint.providers.mjs +0 -9
  464. package/esm2022/directives/hint/hint.service.mjs +0 -29
  465. package/esm2022/directives/hint/hints.component.mjs +0 -34
  466. package/esm2022/directives/hint/index.mjs +0 -17
  467. package/esm2022/directives/hint/taiga-ui-core-directives-hint.mjs +0 -5
  468. package/esm2022/directives/icons/icons.directive.mjs +0 -66
  469. package/esm2022/directives/icons/index.mjs +0 -3
  470. package/esm2022/directives/icons/taiga-ui-core-directives-icons.mjs +0 -5
  471. package/esm2022/directives/icons/with-icons.mjs +0 -22
  472. package/esm2022/directives/index.mjs +0 -12
  473. package/esm2022/directives/items-handlers/index.mjs +0 -4
  474. package/esm2022/directives/items-handlers/items-handlers.directive.mjs +0 -63
  475. package/esm2022/directives/items-handlers/items-handlers.tokens.mjs +0 -27
  476. package/esm2022/directives/items-handlers/items-handlers.validator.mjs +0 -32
  477. package/esm2022/directives/items-handlers/taiga-ui-core-directives-items-handlers.mjs +0 -5
  478. package/esm2022/directives/number-format/index.mjs +0 -2
  479. package/esm2022/directives/number-format/number-format.directive.mjs +0 -31
  480. package/esm2022/directives/number-format/taiga-ui-core-directives-number-format.mjs +0 -5
  481. package/esm2022/directives/popup/index.mjs +0 -4
  482. package/esm2022/directives/popup/popup.directive.mjs +0 -31
  483. package/esm2022/directives/popup/popup.service.mjs +0 -15
  484. package/esm2022/directives/popup/popups.component.mjs +0 -20
  485. package/esm2022/directives/popup/taiga-ui-core-directives-popup.mjs +0 -5
  486. package/esm2022/directives/surface/index.mjs +0 -2
  487. package/esm2022/directives/surface/surface.directive.mjs +0 -44
  488. package/esm2022/directives/surface/taiga-ui-core-directives-surface.mjs +0 -5
  489. package/esm2022/directives/taiga-ui-core-directives.mjs +0 -5
  490. package/esm2022/directives/title/index.mjs +0 -2
  491. package/esm2022/directives/title/taiga-ui-core-directives-title.mjs +0 -5
  492. package/esm2022/directives/title/title.directive.mjs +0 -37
  493. package/esm2022/index.mjs +0 -9
  494. package/esm2022/pipes/auto-color/auto-color.pipe.mjs +0 -19
  495. package/esm2022/pipes/auto-color/index.mjs +0 -2
  496. package/esm2022/pipes/auto-color/taiga-ui-core-pipes-auto-color.mjs +0 -5
  497. package/esm2022/pipes/calendar-sheet/calendar-sheet.pipe.mjs +0 -54
  498. package/esm2022/pipes/calendar-sheet/index.mjs +0 -2
  499. package/esm2022/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.mjs +0 -5
  500. package/esm2022/pipes/calendar-sheet/utils.mjs +0 -36
  501. package/esm2022/pipes/fallback-src/fallback-src.pipe.mjs +0 -23
  502. package/esm2022/pipes/fallback-src/index.mjs +0 -2
  503. package/esm2022/pipes/fallback-src/taiga-ui-core-pipes-fallback-src.mjs +0 -5
  504. package/esm2022/pipes/flag/flag.pipe.mjs +0 -26
  505. package/esm2022/pipes/flag/index.mjs +0 -2
  506. package/esm2022/pipes/flag/taiga-ui-core-pipes-flag.mjs +0 -5
  507. package/esm2022/pipes/format-date/format-date.pipe.mjs +0 -22
  508. package/esm2022/pipes/format-date/index.mjs +0 -2
  509. package/esm2022/pipes/format-date/taiga-ui-core-pipes-format-date.mjs +0 -5
  510. package/esm2022/pipes/format-number/format-number.pipe.mjs +0 -36
  511. package/esm2022/pipes/format-number/index.mjs +0 -2
  512. package/esm2022/pipes/format-number/taiga-ui-core-pipes-format-number.mjs +0 -5
  513. package/esm2022/pipes/index.mjs +0 -10
  514. package/esm2022/pipes/initials/index.mjs +0 -2
  515. package/esm2022/pipes/initials/initials.pipe.mjs +0 -23
  516. package/esm2022/pipes/initials/taiga-ui-core-pipes-initials.mjs +0 -5
  517. package/esm2022/pipes/month/index.mjs +0 -2
  518. package/esm2022/pipes/month/month.pipe.mjs +0 -23
  519. package/esm2022/pipes/month/taiga-ui-core-pipes-month.mjs +0 -5
  520. package/esm2022/pipes/order-week-days/index.mjs +0 -2
  521. package/esm2022/pipes/order-week-days/order-week-days.pipe.mjs +0 -30
  522. package/esm2022/pipes/order-week-days/taiga-ui-core-pipes-order-week-days.mjs +0 -5
  523. package/esm2022/pipes/taiga-ui-core-pipes.mjs +0 -5
  524. package/esm2022/services/breakpoint.service.mjs +0 -31
  525. package/esm2022/services/dark-theme.service.mjs +0 -24
  526. package/esm2022/services/format-date.service.mjs +0 -24
  527. package/esm2022/services/index.mjs +0 -6
  528. package/esm2022/services/position.service.mjs +0 -26
  529. package/esm2022/services/taiga-ui-core-services.mjs +0 -5
  530. package/esm2022/services/visual-viewport.service.mjs +0 -29
  531. package/esm2022/taiga-ui-core.mjs +0 -5
  532. package/esm2022/tokens/animations-speed.mjs +0 -9
  533. package/esm2022/tokens/assets-path.mjs +0 -11
  534. package/esm2022/tokens/auxiliary.mjs +0 -9
  535. package/esm2022/tokens/common-icons.mjs +0 -18
  536. package/esm2022/tokens/dark-mode.mjs +0 -43
  537. package/esm2022/tokens/date-format.mjs +0 -20
  538. package/esm2022/tokens/day-type-handler.mjs +0 -8
  539. package/esm2022/tokens/first-day-of-week.mjs +0 -9
  540. package/esm2022/tokens/i18n.mjs +0 -51
  541. package/esm2022/tokens/icon-resolver.mjs +0 -44
  542. package/esm2022/tokens/icon.mjs +0 -8
  543. package/esm2022/tokens/icons.mjs +0 -21
  544. package/esm2022/tokens/index.mjs +0 -21
  545. package/esm2022/tokens/media.mjs +0 -12
  546. package/esm2022/tokens/number-format.mjs +0 -24
  547. package/esm2022/tokens/reduced-motion.mjs +0 -7
  548. package/esm2022/tokens/scroll-ref.mjs +0 -6
  549. package/esm2022/tokens/selection-stream.mjs +0 -14
  550. package/esm2022/tokens/spin-icons.mjs +0 -8
  551. package/esm2022/tokens/taiga-ui-core-tokens.mjs +0 -5
  552. package/esm2022/tokens/theme.mjs +0 -5
  553. package/esm2022/tokens/viewport.mjs +0 -35
  554. package/esm2022/types/direction.mjs +0 -2
  555. package/esm2022/types/index.mjs +0 -2
  556. package/esm2022/types/interactive-state.mjs +0 -2
  557. package/esm2022/types/orientation.mjs +0 -2
  558. package/esm2022/types/point.mjs +0 -2
  559. package/esm2022/types/portal-item.mjs +0 -2
  560. package/esm2022/types/range-state.mjs +0 -2
  561. package/esm2022/types/size.mjs +0 -13
  562. package/esm2022/types/taiga-ui-core-types.mjs +0 -5
  563. package/esm2022/types/value-content-context.mjs +0 -2
  564. package/esm2022/utils/dom/check-fixed-position.mjs +0 -9
  565. package/esm2022/utils/dom/get-viewport.mjs +0 -24
  566. package/esm2022/utils/dom/get-word-range.mjs +0 -51
  567. package/esm2022/utils/dom/index.mjs +0 -4
  568. package/esm2022/utils/dom/taiga-ui-core-utils-dom.mjs +0 -5
  569. package/esm2022/utils/format/format-number.mjs +0 -47
  570. package/esm2022/utils/format/get-fractional-part-padded.mjs +0 -16
  571. package/esm2022/utils/format/index.mjs +0 -5
  572. package/esm2022/utils/format/number-to-string-without-exp.mjs +0 -18
  573. package/esm2022/utils/format/string-hash-to-hsl.mjs +0 -21
  574. package/esm2022/utils/format/taiga-ui-core-utils-format.mjs +0 -5
  575. package/esm2022/utils/index.mjs +0 -4
  576. package/esm2022/utils/miscellaneous/font-scaling.mjs +0 -21
  577. package/esm2022/utils/miscellaneous/index.mjs +0 -7
  578. package/esm2022/utils/miscellaneous/is-editing-key.mjs +0 -18
  579. package/esm2022/utils/miscellaneous/is-obscured.mjs +0 -8
  580. package/esm2022/utils/miscellaneous/override-options.mjs +0 -11
  581. package/esm2022/utils/miscellaneous/size-bigger.mjs +0 -19
  582. package/esm2022/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.mjs +0 -5
  583. package/esm2022/utils/miscellaneous/to-animation-options.mjs +0 -16
  584. package/esm2022/utils/taiga-ui-core-utils.mjs +0 -5
  585. package/fesm2022/taiga-ui-core-animations.mjs +0 -370
  586. package/fesm2022/taiga-ui-core-animations.mjs.map +0 -1
  587. package/fesm2022/taiga-ui-core-components-alert.mjs +0 -149
  588. package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
  589. package/fesm2022/taiga-ui-core-components-dialog.mjs +0 -230
  590. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +0 -1
  591. package/fesm2022/taiga-ui-core-components-fullscreen.mjs +0 -77
  592. package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +0 -1
  593. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +0 -1
  594. package/fesm2022/taiga-ui-core-directives-hint.mjs +0 -713
  595. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +0 -1
  596. package/fesm2022/taiga-ui-core-directives-popup.mjs +0 -63
  597. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +0 -1
  598. package/fesm2022/taiga-ui-core-directives-surface.mjs +0 -50
  599. package/fesm2022/taiga-ui-core-directives-surface.mjs.map +0 -1
  600. package/fesm2022/taiga-ui-core-directives-title.mjs +0 -43
  601. package/fesm2022/taiga-ui-core-directives-title.mjs.map +0 -1
  602. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -25
  603. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +0 -1
  604. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -94
  605. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +0 -1
  606. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs +0 -29
  607. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs.map +0 -1
  608. package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -32
  609. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +0 -1
  610. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -28
  611. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +0 -1
  612. package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -29
  613. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +0 -1
  614. package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -29
  615. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +0 -1
  616. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -36
  617. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +0 -1
  618. package/pipes/auto-color/auto-color.pipe.d.ts +0 -7
  619. package/pipes/auto-color/index.d.ts +0 -1
  620. package/pipes/calendar-sheet/index.d.ts +0 -1
  621. package/pipes/calendar-sheet/utils.d.ts +0 -20
  622. package/pipes/fallback-src/fallback-src.pipe.d.ts +0 -9
  623. package/pipes/fallback-src/index.d.ts +0 -1
  624. package/pipes/flag/flag.pipe.d.ts +0 -14
  625. package/pipes/flag/index.d.ts +0 -1
  626. package/pipes/format-date/format-date.pipe.d.ts +0 -9
  627. package/pipes/format-date/index.d.ts +0 -1
  628. package/pipes/initials/index.d.ts +0 -1
  629. package/pipes/initials/initials.pipe.d.ts +0 -7
  630. package/pipes/month/index.d.ts +0 -1
  631. package/pipes/month/month.pipe.d.ts +0 -10
  632. package/pipes/order-week-days/index.d.ts +0 -1
  633. package/services/breakpoint.service.d.ts +0 -16
  634. package/services/dark-theme.service.d.ts +0 -10
  635. package/services/format-date.service.d.ts +0 -8
  636. package/styles/mixins/wrapper.less +0 -64
  637. package/styles/mixins/wrapper.scss +0 -61
  638. package/styles/theme/appearance/opposite.less +0 -17
  639. package/styles/theme/wrapper.less +0 -211
  640. package/tokens/day-type-handler.d.ts +0 -7
  641. package/tokens/first-day-of-week.d.ts +0 -5
  642. package/tokens/scroll-ref.d.ts +0 -2
  643. package/tokens/spin-icons.d.ts +0 -6
  644. package/tokens/theme.d.ts +0 -2
  645. package/types/portal-item.d.ts +0 -9
  646. package/types/range-state.d.ts +0 -4
  647. package/types/value-content-context.d.ts +0 -4
  648. package/utils/format/string-hash-to-hsl.d.ts +0 -6
  649. package/utils/miscellaneous/to-animation-options.d.ts +0 -4
  650. /package/{directives → components}/title/index.d.ts +0 -0
  651. /package/{directives → portals}/dropdown/dropdown-limit-width.d.ts +0 -0
  652. /package/{directives → portals}/dropdown/dropdown.component.d.ts +0 -0
  653. /package/{directives → portals}/dropdown/dropdown.driver.d.ts +0 -0
  654. /package/{directives → portals}/dropdown/dropdown.providers.d.ts +0 -0
  655. /package/{directives → portals}/dropdown/with-dropdown-open.directive.d.ts +0 -0
  656. /package/{directives → portals}/hint/hint-driver.directive.d.ts +0 -0
  657. /package/{directives → portals}/hint/hint-pointer.directive.d.ts +0 -0
  658. /package/{directives → portals}/hint/hint.providers.d.ts +0 -0
  659. /package/{directives → portals}/popup/index.d.ts +0 -0
@@ -1,13 +1,13 @@
1
- import { InjectionToken, inject, signal, untracked, effect, Optional, SkipSelf, ElementRef } from '@angular/core';
1
+ import { InjectionToken, inject, signal, untracked, effect, computed } from '@angular/core';
2
2
  import { DOCUMENT } from '@angular/common';
3
- import { tuiProvide, tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
3
+ import { tuiProvide, tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
4
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
+ import { tuiZoneOptimized, tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
6
+ import { TUI_WINDOW_SIZE } from '@taiga-ui/cdk/tokens';
7
+ import { map, distinctUntilChanged, fromEvent, filter, merge, switchMap, takeUntil, share } from 'rxjs';
5
8
  import { WA_LOCAL_STORAGE, WA_WINDOW } from '@ng-web-apis/common';
6
- import { fromEvent, filter, of, map, merge, switchMap, takeUntil, share } from 'rxjs';
7
- import { TuiDayOfWeek } from '@taiga-ui/cdk/date-time';
8
9
  import { tuiExtractI18n } from '@taiga-ui/i18n/utils';
9
10
  import { CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
10
- import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
11
11
 
12
12
  const TUI_REDUCED_MOTION = new InjectionToken(ngDevMode ? 'TUI_REDUCED_MOTION' : '', {
13
13
  factory: () => inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')
@@ -17,9 +17,7 @@ const TUI_REDUCED_MOTION = new InjectionToken(ngDevMode ? 'TUI_REDUCED_MOTION' :
17
17
  /**
18
18
  * Speed of all Taiga UI animations. 1 equals 300ms.
19
19
  */
20
- const TUI_ANIMATIONS_SPEED = new InjectionToken(ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '', {
21
- factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1),
22
- });
20
+ const TUI_ANIMATIONS_SPEED = new InjectionToken(ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '', { factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1) });
23
21
 
24
22
  const TUI_ASSETS_PATH = new InjectionToken(ngDevMode ? 'TUI_ASSETS_PATH' : '', {
25
23
  factory: () => 'assets/taiga-ui/icons',
@@ -38,6 +36,30 @@ function tuiAsAuxiliary(x) {
38
36
  return tuiProvide(TUI_AUXILIARY, x);
39
37
  }
40
38
 
39
+ /**
40
+ * Token for media constant
41
+ */
42
+ const TUI_MEDIA = new InjectionToken(ngDevMode ? 'TUI_MEDIA' : '', {
43
+ factory: () => ({
44
+ mobile: 768,
45
+ desktopSmall: 1280,
46
+ desktopLarge: Infinity,
47
+ }),
48
+ });
49
+
50
+ const TUI_BREAKPOINT = new InjectionToken(ngDevMode ? 'TUI_BREAKPOINT' : '', {
51
+ factory: () => {
52
+ const media = inject(TUI_MEDIA);
53
+ const sorted = Object.values(media).sort((a, b) => a - b);
54
+ const invert = Object.keys(media).reduce((ret, key) => ({
55
+ ...ret,
56
+ [media[key]]: key,
57
+ }), {});
58
+ const stream$ = inject(TUI_WINDOW_SIZE).pipe(map(({ width }) => sorted.find((size) => size > width)), map((key) => invert[key || sorted[sorted.length - 1] || 0] ?? 'desktopLarge'), distinctUntilChanged(), tuiZoneOptimized());
59
+ return toSignal(stream$, { initialValue: 'desktopLarge' });
60
+ },
61
+ });
62
+
41
63
  // TODO: Rename `ellipsis` to `more` in the next major version
42
64
  const COMMON_ICONS = {
43
65
  check: '@tui.check',
@@ -46,18 +68,13 @@ const COMMON_ICONS = {
46
68
  more: '@tui.chevron-right',
47
69
  search: '@tui.search',
48
70
  ellipsis: '@tui.ellipsis',
71
+ decrement: '@tui.chevron-left',
72
+ increment: '@tui.chevron-right',
49
73
  };
50
- const TUI_COMMON_ICONS = new InjectionToken(ngDevMode ? 'TUI_COMMON_ICONS' : '', {
51
- factory: () => COMMON_ICONS,
52
- });
53
- function tuiCommonIconsProvider(icons) {
54
- return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);
55
- }
74
+ const [TUI_COMMON_ICONS, tuiCommonIconsProvider] = tuiCreateOptions(COMMON_ICONS);
56
75
 
57
76
  const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';
58
- const TUI_DARK_MODE_KEY = new InjectionToken(ngDevMode ? 'TUI_DARK_MODE_KEY' : '', {
59
- factory: () => TUI_DARK_MODE_DEFAULT_KEY,
60
- });
77
+ const TUI_DARK_MODE_KEY = new InjectionToken(ngDevMode ? 'TUI_DARK_MODE_KEY' : '', { factory: () => TUI_DARK_MODE_DEFAULT_KEY });
61
78
  const TUI_DARK_MODE = new InjectionToken(ngDevMode ? 'TUI_DARK_MODE' : '', {
62
79
  factory: () => {
63
80
  let automatic = true;
@@ -94,37 +111,26 @@ const TUI_DARK_MODE = new InjectionToken(ngDevMode ? 'TUI_DARK_MODE' : '', {
94
111
  });
95
112
 
96
113
  const TUI_DEFAULT_DATE_FORMAT = {
97
- mode: 'DMY',
114
+ mode: 'dd/mm/yyyy',
98
115
  separator: '.',
99
116
  };
100
117
  /**
101
118
  * Formatting configuration for displayed dates
102
119
  */
103
- const TUI_DATE_FORMAT = new InjectionToken(ngDevMode ? 'TUI_DATE_FORMAT' : '', {
104
- factory: () => of(TUI_DEFAULT_DATE_FORMAT),
105
- });
120
+ const TUI_DATE_FORMAT = new InjectionToken(ngDevMode ? 'TUI_DATE_FORMAT' : '', { factory: () => signal(TUI_DEFAULT_DATE_FORMAT) });
106
121
  function tuiDateFormatProvider(options) {
107
122
  return {
108
123
  provide: TUI_DATE_FORMAT,
109
- deps: [[new Optional(), new SkipSelf(), TUI_DATE_FORMAT]],
110
- useFactory: (parent) => (parent || of(TUI_DEFAULT_DATE_FORMAT)).pipe(map((format) => ({ ...format, ...options }))),
124
+ useFactory: () => {
125
+ const parent = inject(TUI_DATE_FORMAT, { optional: true, skipSelf: true });
126
+ return computed(() => ({
127
+ ...(parent?.() || TUI_DEFAULT_DATE_FORMAT),
128
+ ...options,
129
+ }));
130
+ },
111
131
  };
112
132
  }
113
133
 
114
- /**
115
- * Token for adding data-type attribute to calendar cell
116
- */
117
- const TUI_DAY_TYPE_HANDLER = new InjectionToken(ngDevMode ? 'TUI_DAY_TYPE_HANDLER' : '', {
118
- factory: () => (day) => (day.isWeekend ? 'weekend' : 'weekday'),
119
- });
120
-
121
- /**
122
- * The first day of the week index
123
- */
124
- const TUI_FIRST_DAY_OF_WEEK = new InjectionToken(ngDevMode ? 'TUI_FIRST_DAY_OF_WEEK' : '', {
125
- factory: () => TuiDayOfWeek.Monday,
126
- });
127
-
128
134
  /**
129
135
  * Localized months names
130
136
  */
@@ -152,15 +158,11 @@ const TUI_CLEAR_WORD = new InjectionToken(ngDevMode ? 'TUI_CLEAR_WORD' : '', {
152
158
  /**
153
159
  * i18n 'Nothing found' message
154
160
  */
155
- const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '', {
156
- factory: tuiExtractI18n('nothingFoundMessage'),
157
- });
161
+ const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '', { factory: tuiExtractI18n('nothingFoundMessage') });
158
162
  /**
159
163
  * i18n of error message
160
164
  */
161
- const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '', {
162
- factory: tuiExtractI18n('defaultErrorMessage'),
163
- });
165
+ const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '', { factory: tuiExtractI18n('defaultErrorMessage') });
164
166
  /**
165
167
  * spin i18n texts
166
168
  */
@@ -170,9 +172,7 @@ const TUI_SPIN_TEXTS = new InjectionToken(ngDevMode ? 'TUI_SPIN_TEXTS' : '', {
170
172
  /**
171
173
  * calendars i18n texts
172
174
  */
173
- const TUI_SHORT_WEEK_DAYS = new InjectionToken(ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '', {
174
- factory: tuiExtractI18n('shortWeekDays'),
175
- });
175
+ const TUI_SHORT_WEEK_DAYS = new InjectionToken(ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '', { factory: tuiExtractI18n('shortWeekDays') });
176
176
 
177
177
  const TUI_ICON_START = new InjectionToken(ngDevMode ? 'TUI_ICON_START' : '', {
178
178
  factory: () => '',
@@ -181,13 +181,7 @@ const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {
181
181
  factory: () => '',
182
182
  });
183
183
 
184
- const TUI_ICON_REGISTRY = new InjectionToken(ngDevMode ? 'TUI_ICON_REGISTRY' : '', {
185
- factory: () => ({}),
186
- });
187
- /**
188
- * @deprecated: use {@link TUI_ICON_REGISTRY}
189
- */
190
- const TUI_ICON_STARTS = TUI_ICON_REGISTRY;
184
+ const TUI_ICON_REGISTRY = new InjectionToken(ngDevMode ? 'TUI_ICON_REGISTRY' : '', { factory: () => ({}) });
191
185
  function tuiIconsProvider(icons) {
192
186
  return {
193
187
  provide: TUI_ICON_REGISTRY,
@@ -195,35 +189,21 @@ function tuiIconsProvider(icons) {
195
189
  ...(inject(TUI_ICON_REGISTRY, { skipSelf: true, optional: true }) || {}),
196
190
  ...Object.fromEntries(Object.entries(icons).map(([key, value]) => [
197
191
  key,
198
- `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}`,
192
+ `"data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}"`,
199
193
  ])),
200
194
  }),
201
195
  };
202
196
  }
203
197
 
204
- const ICON_MODE_PREFIXES = { font: '@font.', image: '@img.' };
205
198
  const TUI_ICON_RESOLVER = new InjectionToken(ngDevMode ? 'TUI_ICON_RESOLVER' : '', {
206
199
  factory: () => {
207
200
  const path = inject(TUI_ASSETS_PATH);
208
201
  // regex for @{any text}. used as a default fallback, returns path to svg from icon pack
209
- return (icon) => `${path}/${icon
210
- .replace(/@[a-zA-Z]+\./, '')
211
- .split('.')
212
- .join('/')}.svg`;
202
+ return (icon) => `${path}/${icon.replace(/@[a-zA-Z]+\./, '').replaceAll('.', '/')}.svg`;
213
203
  },
214
204
  });
215
- /**
216
- * @deprecated use {@link TUI_ICON_RESOLVER}
217
- */
218
- const TUI_ICON_START_RESOLVER = TUI_ICON_RESOLVER;
219
205
  function tuiGetIconMode(icon) {
220
- if (!icon) {
221
- return null;
222
- }
223
- if (icon.startsWith(ICON_MODE_PREFIXES.image)) {
224
- return 'image';
225
- }
226
- return icon.startsWith(ICON_MODE_PREFIXES.font) ? 'font' : 'svg';
206
+ return icon?.match(/@([^.]*)\./)?.[1] || icon || undefined;
227
207
  }
228
208
  function tuiInjectIconResolver() {
229
209
  const icons = inject(TUI_ICON_REGISTRY);
@@ -232,27 +212,15 @@ function tuiInjectIconResolver() {
232
212
  if (!icon || icon.includes('/')) {
233
213
  return icon;
234
214
  }
235
- if (tuiGetIconMode(icon) === 'font') {
236
- return icon.slice(ICON_MODE_PREFIXES.font.length);
237
- }
238
- return icons[icon] ?? resolver(icon);
215
+ return icon.startsWith('@font.')
216
+ ? icon.replace('@font.', '')
217
+ : (icons[icon] ?? resolver(icon));
239
218
  };
240
219
  }
241
220
  function tuiIconResolverProvider(useValue) {
242
221
  return { provide: TUI_ICON_RESOLVER, useValue };
243
222
  }
244
223
 
245
- /**
246
- * Token for media constant
247
- */
248
- const TUI_MEDIA = new InjectionToken(ngDevMode ? 'TUI_MEDIA' : '', {
249
- factory: () => ({
250
- mobile: 768,
251
- desktopSmall: 1024,
252
- desktopLarge: 1280,
253
- }),
254
- });
255
-
256
224
  const TUI_DEFAULT_NUMBER_FORMAT = {
257
225
  precision: NaN,
258
226
  decimalSeparator: '.',
@@ -263,21 +231,20 @@ const TUI_DEFAULT_NUMBER_FORMAT = {
263
231
  /**
264
232
  * Formatting configuration for displayed numbers
265
233
  */
266
- const TUI_NUMBER_FORMAT = new InjectionToken(ngDevMode ? 'TUI_NUMBER_FORMAT' : '', {
267
- factory: () => of(TUI_DEFAULT_NUMBER_FORMAT),
268
- });
234
+ const TUI_NUMBER_FORMAT = new InjectionToken(ngDevMode ? 'TUI_NUMBER_FORMAT' : '', { factory: () => signal(TUI_DEFAULT_NUMBER_FORMAT) });
269
235
  function tuiNumberFormatProvider(options) {
270
236
  return {
271
237
  provide: TUI_NUMBER_FORMAT,
272
- deps: [[new Optional(), new SkipSelf(), TUI_NUMBER_FORMAT]],
273
- useFactory: (parent) => (parent || of(TUI_DEFAULT_NUMBER_FORMAT)).pipe(map((format) => ({ ...format, ...options }))),
238
+ useFactory: () => {
239
+ const parent = inject(TUI_NUMBER_FORMAT, { optional: true, skipSelf: true });
240
+ return computed(() => ({
241
+ ...(parent?.() || TUI_DEFAULT_NUMBER_FORMAT),
242
+ ...options,
243
+ }));
244
+ },
274
245
  };
275
246
  }
276
247
 
277
- const TUI_SCROLL_REF = new InjectionToken(ngDevMode ? 'TUI_SCROLL_REF' : '', {
278
- factory: () => new ElementRef(inject(DOCUMENT).documentElement),
279
- });
280
-
281
248
  /**
282
249
  * A stream of possible selection changes
283
250
  */
@@ -288,16 +255,8 @@ const TUI_SELECTION_STREAM = new InjectionToken(ngDevMode ? 'TUI_SELECTION_STREA
288
255
  },
289
256
  });
290
257
 
291
- const TUI_SPIN_ICONS = new InjectionToken(ngDevMode ? 'TUI_SPIN_ICONS' : '', {
292
- factory: () => ({
293
- decrement: '@tui.chevron-left',
294
- increment: '@tui.chevron-right',
295
- }),
296
- });
297
-
298
- const TUI_THEME = new InjectionToken(ngDevMode ? 'TUI_THEME' : '', {
299
- factory: () => 'Taiga UI',
300
- });
258
+ const TUI_VALIDATION_ERRORS = new InjectionToken(ngDevMode ? 'TUI_VALIDATION_ERRORS' : '', { factory: () => ({}) });
259
+ const tuiValidationErrorsProvider = (useValue) => ({ provide: TUI_VALIDATION_ERRORS, useValue });
301
260
 
302
261
  /**
303
262
  * Viewport accessor
@@ -335,5 +294,5 @@ function tuiAsViewport(accessor) {
335
294
  * Generated bundle index. Do not edit.
336
295
  */
337
296
 
338
- export { TUI_ANIMATIONS_SPEED, TUI_ASSETS_PATH, TUI_AUXILIARY, TUI_BACK_WORD, TUI_CLEAR_WORD, TUI_CLOSE_WORD, TUI_COMMON_ICONS, TUI_DARK_MODE, TUI_DARK_MODE_DEFAULT_KEY, TUI_DARK_MODE_KEY, TUI_DATE_FORMAT, TUI_DAY_TYPE_HANDLER, TUI_DEFAULT_DATE_FORMAT, TUI_DEFAULT_ERROR_MESSAGE, TUI_DEFAULT_NUMBER_FORMAT, TUI_FIRST_DAY_OF_WEEK, TUI_ICON_END, TUI_ICON_REGISTRY, TUI_ICON_RESOLVER, TUI_ICON_START, TUI_ICON_STARTS, TUI_ICON_START_RESOLVER, TUI_MEDIA, TUI_MONTHS, TUI_NOTHING_FOUND_MESSAGE, TUI_NUMBER_FORMAT, TUI_REDUCED_MOTION, TUI_SCROLL_REF, TUI_SELECTION_STREAM, TUI_SHORT_WEEK_DAYS, TUI_SPIN_ICONS, TUI_SPIN_TEXTS, TUI_THEME, TUI_VIEWPORT, tuiAsAuxiliary, tuiAsViewport, tuiAssetsPathProvider, tuiCommonIconsProvider, tuiDateFormatProvider, tuiGetIconMode, tuiIconResolverProvider, tuiIconsProvider, tuiInjectIconResolver, tuiNumberFormatProvider };
297
+ export { TUI_ANIMATIONS_SPEED, TUI_ASSETS_PATH, TUI_AUXILIARY, TUI_BACK_WORD, TUI_BREAKPOINT, TUI_CLEAR_WORD, TUI_CLOSE_WORD, TUI_COMMON_ICONS, TUI_DARK_MODE, TUI_DARK_MODE_DEFAULT_KEY, TUI_DARK_MODE_KEY, TUI_DATE_FORMAT, TUI_DEFAULT_DATE_FORMAT, TUI_DEFAULT_ERROR_MESSAGE, TUI_DEFAULT_NUMBER_FORMAT, TUI_ICON_END, TUI_ICON_REGISTRY, TUI_ICON_RESOLVER, TUI_ICON_START, TUI_MEDIA, TUI_MONTHS, TUI_NOTHING_FOUND_MESSAGE, TUI_NUMBER_FORMAT, TUI_REDUCED_MOTION, TUI_SELECTION_STREAM, TUI_SHORT_WEEK_DAYS, TUI_SPIN_TEXTS, TUI_VALIDATION_ERRORS, TUI_VIEWPORT, tuiAsAuxiliary, tuiAsViewport, tuiAssetsPathProvider, tuiCommonIconsProvider, tuiDateFormatProvider, tuiGetIconMode, tuiIconResolverProvider, tuiIconsProvider, tuiInjectIconResolver, tuiNumberFormatProvider, tuiValidationErrorsProvider };
339
298
  //# sourceMappingURL=taiga-ui-core-tokens.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-tokens.mjs","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-speed.ts","../../../projects/core/tokens/assets-path.ts","../../../projects/core/tokens/auxiliary.ts","../../../projects/core/tokens/common-icons.ts","../../../projects/core/tokens/dark-mode.ts","../../../projects/core/tokens/date-format.ts","../../../projects/core/tokens/day-type-handler.ts","../../../projects/core/tokens/first-day-of-week.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icon-resolver.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/scroll-ref.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/spin-icons.ts","../../../projects/core/tokens/theme.ts","../../../projects/core/tokens/viewport.ts","../../../projects/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\nexport const TUI_REDUCED_MOTION = new InjectionToken(\n ngDevMode ? 'TUI_REDUCED_MOTION' : '',\n {\n factory: () =>\n inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')\n .matches ?? false,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\n/**\n * Speed of all Taiga UI animations. 1 equals 300ms.\n */\nexport const TUI_ANIMATIONS_SPEED = new InjectionToken<number>(\n ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '',\n {\n factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1),\n },\n);\n","import {InjectionToken, type ValueProvider} from '@angular/core';\n\nexport const TUI_ASSETS_PATH = new InjectionToken(ngDevMode ? 'TUI_ASSETS_PATH' : '', {\n factory: () => 'assets/taiga-ui/icons',\n});\n\nexport function tuiAssetsPathProvider(useValue: string): ValueProvider {\n return {\n provide: TUI_ASSETS_PATH,\n useValue,\n };\n}\n","import {InjectionToken, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const TUI_AUXILIARY = new InjectionToken(ngDevMode ? 'TUI_AUXILIARY' : '', {\n factory: () => null,\n});\n\nexport function tuiAsAuxiliary(x: Type<unknown>): Provider {\n return tuiProvide(TUI_AUXILIARY, x);\n}\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\n\n// TODO: Rename `ellipsis` to `more` in the next major version\nconst COMMON_ICONS: TuiCommonIcons = {\n check: '@tui.check',\n close: '@tui.x',\n error: '@tui.circle-alert',\n more: '@tui.chevron-right',\n search: '@tui.search',\n ellipsis: '@tui.ellipsis',\n};\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n readonly search: string;\n readonly ellipsis: string;\n}\n\nexport const TUI_COMMON_ICONS = new InjectionToken(ngDevMode ? 'TUI_COMMON_ICONS' : '', {\n factory: () => COMMON_ICONS,\n});\n\nexport function tuiCommonIconsProvider(icons: Partial<TuiCommonIcons>): Provider {\n return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);\n}\n","import {\n effect,\n inject,\n InjectionToken,\n signal,\n untracked,\n type WritableSignal,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_LOCAL_STORAGE, WA_WINDOW} from '@ng-web-apis/common';\nimport {filter, fromEvent} from 'rxjs';\n\nexport const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';\nexport const TUI_DARK_MODE_KEY = new InjectionToken(\n ngDevMode ? 'TUI_DARK_MODE_KEY' : '',\n {\n factory: () => TUI_DARK_MODE_DEFAULT_KEY,\n },\n);\nexport const TUI_DARK_MODE = new InjectionToken<\n WritableSignal<boolean> & {reset(): void}\n>(ngDevMode ? 'TUI_DARK_MODE' : '', {\n factory: () => {\n let automatic = true;\n\n const storage = inject(WA_LOCAL_STORAGE);\n const key = inject(TUI_DARK_MODE_KEY);\n const saved = storage?.getItem(key);\n const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');\n const result = signal(Boolean((saved && JSON.parse(saved)) ?? media.matches));\n\n fromEvent(media, 'change')\n .pipe(\n filter(() => !storage?.getItem(key)),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n automatic = true;\n result.set(media.matches);\n });\n\n untracked(() => {\n effect(() => {\n const value = String(result());\n\n if (automatic) {\n automatic = false;\n } else {\n storage?.setItem(key, value);\n }\n });\n });\n\n return Object.assign(result, {\n reset: () => {\n storage?.removeItem(key);\n automatic = true;\n result.set(media.matches);\n },\n });\n },\n});\n","import {InjectionToken, Optional, type Provider, SkipSelf} from '@angular/core';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\nimport {map, type Observable, of} from 'rxjs';\n\n/**\n * Formatting configuration for displayed dates\n */\nexport interface TuiDateFormatSettings {\n /**\n * Date format mode.\n */\n readonly mode: TuiDateMode;\n /**\n * Separator between date segments\n * @example 10.02 ('.' by default)\n */\n readonly separator: string;\n}\n\nexport const TUI_DEFAULT_DATE_FORMAT: TuiDateFormatSettings = {\n mode: 'DMY',\n separator: '.',\n};\n\n/**\n * Formatting configuration for displayed dates\n */\nexport const TUI_DATE_FORMAT = new InjectionToken<Observable<TuiDateFormatSettings>>(\n ngDevMode ? 'TUI_DATE_FORMAT' : '',\n {\n factory: () => of(TUI_DEFAULT_DATE_FORMAT),\n },\n);\n\nexport function tuiDateFormatProvider(options: Partial<TuiDateFormatSettings>): Provider {\n return {\n provide: TUI_DATE_FORMAT,\n deps: [[new Optional(), new SkipSelf(), TUI_DATE_FORMAT]],\n useFactory: (\n parent: Observable<TuiDateFormatSettings> | null,\n ): Observable<TuiDateFormatSettings> =>\n (parent || of(TUI_DEFAULT_DATE_FORMAT)).pipe(\n map((format) => ({...format, ...options})),\n ),\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {type TuiDay} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Token for adding data-type attribute to calendar cell\n */\nexport const TUI_DAY_TYPE_HANDLER = new InjectionToken<TuiHandler<TuiDay, string>>(\n ngDevMode ? 'TUI_DAY_TYPE_HANDLER' : '',\n {\n factory: () => (day) => (day.isWeekend ? 'weekend' : 'weekday'),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDayOfWeek} from '@taiga-ui/cdk/date-time';\n\n/**\n * The first day of the week index\n */\nexport const TUI_FIRST_DAY_OF_WEEK = new InjectionToken<0 | 1 | 2 | 3 | 4 | 5 | 6>(\n ngDevMode ? 'TUI_FIRST_DAY_OF_WEEK' : '',\n {\n factory: () => TuiDayOfWeek.Monday,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = new InjectionToken(ngDevMode ? 'TUI_MONTHS' : '', {\n factory: tuiExtractI18n('months'),\n});\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = new InjectionToken(ngDevMode ? 'TUI_CLOSE_WORD' : '', {\n factory: tuiExtractI18n('close'),\n});\n\n/**\n * i18n 'back' word\n */\nexport const TUI_BACK_WORD = new InjectionToken(ngDevMode ? 'TUI_BACK_WORD' : '', {\n factory: tuiExtractI18n('back'),\n});\n\n/**\n * i18n 'clear' word\n */\nexport const TUI_CLEAR_WORD = new InjectionToken(ngDevMode ? 'TUI_CLEAR_WORD' : '', {\n factory: tuiExtractI18n('clear'),\n});\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '',\n {\n factory: tuiExtractI18n('nothingFoundMessage'),\n },\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '',\n {\n factory: tuiExtractI18n('defaultErrorMessage'),\n },\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = new InjectionToken(ngDevMode ? 'TUI_SPIN_TEXTS' : '', {\n factory: tuiExtractI18n('spinTexts'),\n});\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken(\n ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '',\n {\n factory: tuiExtractI18n('shortWeekDays'),\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_START = new InjectionToken(ngDevMode ? 'TUI_ICON_START' : '', {\n factory: () => '',\n});\nexport const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {\n factory: () => '',\n});\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_REGISTRY = new InjectionToken<Record<string, string>>(\n ngDevMode ? 'TUI_ICON_REGISTRY' : '',\n {\n factory: () => ({}),\n },\n);\n\n/**\n * @deprecated: use {@link TUI_ICON_REGISTRY}\n */\nexport const TUI_ICON_STARTS = TUI_ICON_REGISTRY;\n\nexport function tuiIconsProvider(icons: Record<string, string>): FactoryProvider {\n return {\n provide: TUI_ICON_REGISTRY,\n useFactory: () => ({\n ...(inject(TUI_ICON_REGISTRY, {skipSelf: true, optional: true}) || {}),\n ...Object.fromEntries(\n Object.entries(icons).map(([key, value]) => [\n key,\n `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}`,\n ]),\n ),\n }),\n };\n}\n","import {inject, InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\nimport {TUI_ASSETS_PATH} from './assets-path';\nimport {TUI_ICON_REGISTRY} from './icons';\n\nconst ICON_MODE_PREFIXES = {font: '@font.', image: '@img.'} as const;\n\nexport const TUI_ICON_RESOLVER = new InjectionToken<TuiStringHandler<string>>(\n ngDevMode ? 'TUI_ICON_RESOLVER' : '',\n {\n factory: () => {\n const path = inject(TUI_ASSETS_PATH);\n\n // regex for @{any text}. used as a default fallback, returns path to svg from icon pack\n return (icon) =>\n `${path}/${icon\n .replace(/@[a-zA-Z]+\\./, '')\n .split('.')\n .join('/')}.svg`;\n },\n },\n);\n\n/**\n * @deprecated use {@link TUI_ICON_RESOLVER}\n */\nexport const TUI_ICON_START_RESOLVER = TUI_ICON_RESOLVER;\n\nexport function tuiGetIconMode(icon?: string | null): 'font' | 'image' | 'svg' | null {\n if (!icon) {\n return null;\n }\n\n if (icon.startsWith(ICON_MODE_PREFIXES.image)) {\n return 'image';\n }\n\n return icon.startsWith(ICON_MODE_PREFIXES.font) ? 'font' : 'svg';\n}\n\nexport function tuiInjectIconResolver(): TuiStringHandler<string> {\n const icons = inject(TUI_ICON_REGISTRY);\n const resolver = inject(TUI_ICON_RESOLVER);\n\n return (icon) => {\n if (!icon || icon.includes('/')) {\n return icon;\n }\n\n if (tuiGetIconMode(icon) === 'font') {\n return icon.slice(ICON_MODE_PREFIXES.font.length);\n }\n\n return icons[icon] ?? resolver(icon);\n };\n}\n\nexport function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider {\n return {provide: TUI_ICON_RESOLVER, useValue};\n}\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiMedia {\n readonly desktopLarge: number;\n readonly desktopSmall: number;\n readonly mobile: number;\n readonly tablet?: number;\n}\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>(ngDevMode ? 'TUI_MEDIA' : '', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n }),\n});\n","import {InjectionToken, Optional, type Provider, SkipSelf} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {type TuiRounding} from '@taiga-ui/cdk/types';\nimport {map, type Observable, of} from 'rxjs';\n\nexport type TuiDecimalMode = 'always' | 'not-zero' | 'pad';\nexport type TuiDecimalSymbol = ',' | '.';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport interface TuiNumberFormatSettings {\n /**\n * Number of digits of decimal part.\n * @note Use `Infinity` to keep untouched.\n */\n readonly precision: number;\n /**\n * Separator between the integer and the decimal part.\n * @example 0,42 (',' by default)\n */\n readonly decimalSeparator: TuiDecimalSymbol;\n /**\n * Rounding method.\n */\n readonly rounding: TuiRounding;\n /**\n * Separator between thousands.\n * @example 360 000 (' ' by default)\n */\n readonly thousandSeparator: string;\n /**\n * Decimal part display mode. ('pad' by default)\n */\n readonly decimalMode: TuiDecimalMode;\n}\n\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n precision: NaN,\n decimalSeparator: '.',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n rounding: 'truncate',\n decimalMode: 'pad',\n};\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = new InjectionToken<Observable<TuiNumberFormatSettings>>(\n ngDevMode ? 'TUI_NUMBER_FORMAT' : '',\n {\n factory: () => of(TUI_DEFAULT_NUMBER_FORMAT),\n },\n);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return {\n provide: TUI_NUMBER_FORMAT,\n deps: [[new Optional(), new SkipSelf(), TUI_NUMBER_FORMAT]],\n useFactory: (\n parent: Observable<TuiNumberFormatSettings> | null,\n ): Observable<TuiNumberFormatSettings> =>\n (parent || of(TUI_DEFAULT_NUMBER_FORMAT)).pipe(\n map((format) => ({...format, ...options})),\n ),\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_SCROLL_REF = new InjectionToken(ngDevMode ? 'TUI_SCROLL_REF' : '', {\n factory: () => new ElementRef(inject(DOCUMENT).documentElement),\n});\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, type Observable, share, switchMap, takeUntil} from 'rxjs';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_SELECTION_STREAM' : '',\n {\n factory: () => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, 'selectionchange'),\n tuiTypedFromEvent(doc, 'mouseup'),\n tuiTypedFromEvent(doc, 'mousedown').pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, 'mousemove').pipe(\n takeUntil(tuiTypedFromEvent(doc, 'mouseup')),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, 'keydown'),\n tuiTypedFromEvent(doc, 'keyup'),\n ).pipe(share());\n },\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiSpinIcons {\n readonly decrement: string;\n readonly increment: string;\n}\n\nexport const TUI_SPIN_ICONS = new InjectionToken<TuiSpinIcons>(\n ngDevMode ? 'TUI_SPIN_ICONS' : '',\n {\n factory: () => ({\n decrement: '@tui.chevron-left',\n increment: '@tui.chevron-right',\n }),\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_THEME = new InjectionToken(ngDevMode ? 'TUI_THEME' : '', {\n factory: () => 'Taiga UI',\n});\n","import {inject, InjectionToken, type Provider, type Type} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiRectAccessor} from '@taiga-ui/core/classes';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = new InjectionToken<TuiRectAccessor>(\n ngDevMode ? 'TUI_VIEWPORT' : '',\n {\n factory: () => {\n const win = inject(WA_WINDOW);\n\n return {\n type: 'viewport',\n getClientRect() {\n const {height = 0, offsetTop = 0} = win.visualViewport || {};\n const rect = {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: height + offsetTop || win.innerHeight,\n x: 0,\n y: 0,\n };\n\n return {\n ...rect,\n toJSON: () => JSON.stringify(rect),\n };\n },\n };\n },\n },\n);\n\nexport function tuiAsViewport(accessor: Type<TuiRectAccessor>): Provider {\n return tuiProvide(TUI_VIEWPORT, accessor);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGa,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MACL,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,UAAU,GAAG,kCAAkC,CAAC;AACzE,SAAA,OAAO,IAAI,KAAK;AAC5B,CAAA;;ACLL;;AAEG;AACU,MAAA,oBAAoB,GAAG,IAAI,cAAc,CAClD,SAAS,GAAG,sBAAsB,GAAG,EAAE,EACvC;AACI,IAAA,OAAO,EAAE,OAAO,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACtD,CAAA;;ACTQ,MAAA,eAAe,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,iBAAiB,GAAG,EAAE,EAAE;AAClF,IAAA,OAAO,EAAE,MAAM,uBAAuB;AACzC,CAAA,EAAE;AAEG,SAAU,qBAAqB,CAAC,QAAgB,EAAA;IA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E,GAAG,CAAC,UAAU;oBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;oBACvB,KAAK,EAAE,GAAG,CAAC,UAAU;AACrB,oBAAA,MAAM,EAAE,MAAM,GAAG,SAAS,IAAI,GAAG,CAAC,WAAW;AAC7C,oBAAA,CAAC,EAAE,CAAC;AACJ,oBAAA,CAAC,EAAE,CAAC;iBACP,CAAC;gBAEF,OAAO;AACH,oBAAA,GAAG,IAAI;oBACP,MAAM,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;iBACrC,CAAC;aACL;SACJ,CAAC;KACL;AACJ,CAAA,EACH;AAEI,SAAU,aAAa,CAAC,QAA+B,EAAA;AACzD,IAAA,OAAO,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AAC9C;;ACzCA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-tokens.mjs","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-speed.ts","../../../projects/core/tokens/assets-path.ts","../../../projects/core/tokens/auxiliary.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/breakpoint.ts","../../../projects/core/tokens/common-icons.ts","../../../projects/core/tokens/dark-mode.ts","../../../projects/core/tokens/date-format.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icon-resolver.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/validation-errors.ts","../../../projects/core/tokens/viewport.ts","../../../projects/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\nexport const TUI_REDUCED_MOTION = new InjectionToken(\n ngDevMode ? 'TUI_REDUCED_MOTION' : '',\n {\n factory: () =>\n inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')\n .matches ?? false,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\n/**\n * Speed of all Taiga UI animations. 1 equals 300ms.\n */\nexport const TUI_ANIMATIONS_SPEED = new InjectionToken<number>(\n ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '',\n {factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1)},\n);\n","import {InjectionToken, type ValueProvider} from '@angular/core';\n\nexport const TUI_ASSETS_PATH = new InjectionToken(ngDevMode ? 'TUI_ASSETS_PATH' : '', {\n factory: () => 'assets/taiga-ui/icons',\n});\n\nexport function tuiAssetsPathProvider(useValue: string): ValueProvider {\n return {\n provide: TUI_ASSETS_PATH,\n useValue,\n };\n}\n","import {InjectionToken, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\n\nexport const TUI_AUXILIARY = new InjectionToken(ngDevMode ? 'TUI_AUXILIARY' : '', {\n factory: () => null,\n});\n\nexport function tuiAsAuxiliary(x: Type<unknown>): Provider {\n return tuiProvide(TUI_AUXILIARY, x);\n}\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiMedia {\n readonly desktopLarge: number;\n readonly desktopSmall: number;\n readonly mobile: number;\n readonly tablet?: number;\n}\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>(ngDevMode ? 'TUI_MEDIA' : '', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1280,\n desktopLarge: Infinity,\n }),\n});\n","import {inject, InjectionToken, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {TUI_WINDOW_SIZE} from '@taiga-ui/cdk/tokens';\nimport {distinctUntilChanged, map} from 'rxjs';\n\nimport {TUI_MEDIA, type TuiMedia} from './media';\n\nexport type TuiBreakpointMediaKey = keyof Omit<TuiMedia, 'tablet'>;\n\nexport const TUI_BREAKPOINT = new InjectionToken<Signal<TuiBreakpointMediaKey>>(\n ngDevMode ? 'TUI_BREAKPOINT' : '',\n {\n factory: () => {\n const media = inject(TUI_MEDIA);\n const sorted: number[] = Object.values(media).sort((a, b) => a - b);\n const invert: Record<number, TuiBreakpointMediaKey> = Object.keys(\n media,\n ).reduce(\n (ret, key) => ({\n ...ret,\n [media[key as TuiBreakpointMediaKey]]: key,\n }),\n {},\n );\n\n const stream$ = inject(TUI_WINDOW_SIZE).pipe(\n map(({width}) => sorted.find((size) => size > width)),\n map(\n (key) =>\n invert[key || sorted[sorted.length - 1] || 0] ?? 'desktopLarge',\n ),\n distinctUntilChanged(),\n tuiZoneOptimized(),\n );\n\n return toSignal(stream$, {initialValue: 'desktopLarge'});\n },\n },\n);\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\n// TODO: Rename `ellipsis` to `more` in the next major version\nconst COMMON_ICONS: TuiCommonIcons = {\n check: '@tui.check',\n close: '@tui.x',\n error: '@tui.circle-alert',\n more: '@tui.chevron-right',\n search: '@tui.search',\n ellipsis: '@tui.ellipsis',\n decrement: '@tui.chevron-left',\n increment: '@tui.chevron-right',\n};\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n readonly search: string;\n readonly ellipsis: string;\n readonly decrement: string;\n readonly increment: string;\n}\n\nexport const [TUI_COMMON_ICONS, tuiCommonIconsProvider] = tuiCreateOptions(COMMON_ICONS);\n","import {\n effect,\n inject,\n InjectionToken,\n signal,\n untracked,\n type WritableSignal,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_LOCAL_STORAGE, WA_WINDOW} from '@ng-web-apis/common';\nimport {filter, fromEvent} from 'rxjs';\n\nexport const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';\nexport const TUI_DARK_MODE_KEY = new InjectionToken(\n ngDevMode ? 'TUI_DARK_MODE_KEY' : '',\n {factory: () => TUI_DARK_MODE_DEFAULT_KEY},\n);\nexport const TUI_DARK_MODE = new InjectionToken<\n WritableSignal<boolean> & {reset(): void}\n>(ngDevMode ? 'TUI_DARK_MODE' : '', {\n factory: () => {\n let automatic = true;\n\n const storage = inject(WA_LOCAL_STORAGE);\n const key = inject(TUI_DARK_MODE_KEY);\n const saved = storage?.getItem(key);\n const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');\n const result = signal(Boolean((saved && JSON.parse(saved)) ?? media.matches));\n\n fromEvent(media, 'change')\n .pipe(\n filter(() => !storage?.getItem(key)),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n automatic = true;\n result.set(media.matches);\n });\n\n untracked(() => {\n effect(() => {\n const value = String(result());\n\n if (automatic) {\n automatic = false;\n } else {\n storage?.setItem(key, value);\n }\n });\n });\n\n return Object.assign(result, {\n reset: () => {\n storage?.removeItem(key);\n automatic = true;\n result.set(media.matches);\n },\n });\n },\n});\n","import {\n computed,\n inject,\n InjectionToken,\n type Provider,\n type Signal,\n signal,\n} from '@angular/core';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\n\n/**\n * Formatting configuration for displayed dates\n */\nexport interface TuiDateFormatSettings {\n /**\n * Date format mode.\n */\n readonly mode: TuiDateMode;\n /**\n * Separator between date segments\n * @example 10.02 ('.' by default)\n */\n readonly separator: string;\n}\n\nexport const TUI_DEFAULT_DATE_FORMAT: TuiDateFormatSettings = {\n mode: 'dd/mm/yyyy',\n separator: '.',\n};\n\n/**\n * Formatting configuration for displayed dates\n */\nexport const TUI_DATE_FORMAT = new InjectionToken<Signal<TuiDateFormatSettings>>(\n ngDevMode ? 'TUI_DATE_FORMAT' : '',\n {factory: () => signal(TUI_DEFAULT_DATE_FORMAT)},\n);\n\nexport function tuiDateFormatProvider(options: Partial<TuiDateFormatSettings>): Provider {\n return {\n provide: TUI_DATE_FORMAT,\n useFactory: (): Signal<TuiDateFormatSettings> => {\n const parent = inject(TUI_DATE_FORMAT, {optional: true, skipSelf: true});\n\n return computed(() => ({\n ...(parent?.() || TUI_DEFAULT_DATE_FORMAT),\n ...options,\n }));\n },\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = new InjectionToken(ngDevMode ? 'TUI_MONTHS' : '', {\n factory: tuiExtractI18n('months'),\n});\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = new InjectionToken(ngDevMode ? 'TUI_CLOSE_WORD' : '', {\n factory: tuiExtractI18n('close'),\n});\n\n/**\n * i18n 'back' word\n */\nexport const TUI_BACK_WORD = new InjectionToken(ngDevMode ? 'TUI_BACK_WORD' : '', {\n factory: tuiExtractI18n('back'),\n});\n\n/**\n * i18n 'clear' word\n */\nexport const TUI_CLEAR_WORD = new InjectionToken(ngDevMode ? 'TUI_CLEAR_WORD' : '', {\n factory: tuiExtractI18n('clear'),\n});\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '',\n {factory: tuiExtractI18n('nothingFoundMessage')},\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '',\n {factory: tuiExtractI18n('defaultErrorMessage')},\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = new InjectionToken(ngDevMode ? 'TUI_SPIN_TEXTS' : '', {\n factory: tuiExtractI18n('spinTexts'),\n});\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken(\n ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '',\n {factory: tuiExtractI18n('shortWeekDays')},\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_START = new InjectionToken(ngDevMode ? 'TUI_ICON_START' : '', {\n factory: () => '',\n});\nexport const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {\n factory: () => '',\n});\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_REGISTRY = new InjectionToken<Record<string, string>>(\n ngDevMode ? 'TUI_ICON_REGISTRY' : '',\n {factory: () => ({})},\n);\n\nexport function tuiIconsProvider(icons: Record<string, string>): FactoryProvider {\n return {\n provide: TUI_ICON_REGISTRY,\n useFactory: () => ({\n ...(inject(TUI_ICON_REGISTRY, {skipSelf: true, optional: true}) || {}),\n ...Object.fromEntries(\n Object.entries(icons).map(([key, value]) => [\n key,\n `\"data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}\"`,\n ]),\n ),\n }),\n };\n}\n","import {inject, InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\nimport {TUI_ASSETS_PATH} from './assets-path';\nimport {TUI_ICON_REGISTRY} from './icons';\n\nexport const TUI_ICON_RESOLVER = new InjectionToken<TuiStringHandler<string>>(\n ngDevMode ? 'TUI_ICON_RESOLVER' : '',\n {\n factory: () => {\n const path = inject(TUI_ASSETS_PATH);\n\n // regex for @{any text}. used as a default fallback, returns path to svg from icon pack\n return (icon) =>\n `${path}/${icon.replace(/@[a-zA-Z]+\\./, '').replaceAll('.', '/')}.svg`;\n },\n },\n);\n\nexport function tuiGetIconMode(icon?: string | null): string | undefined {\n return icon?.match(/@([^.]*)\\./)?.[1] || icon || undefined;\n}\n\nexport function tuiInjectIconResolver(): TuiStringHandler<string> {\n const icons = inject(TUI_ICON_REGISTRY);\n const resolver = inject(TUI_ICON_RESOLVER);\n\n return (icon) => {\n if (!icon || icon.includes('/')) {\n return icon;\n }\n\n return icon.startsWith('@font.')\n ? icon.replace('@font.', '')\n : (icons[icon] ?? resolver(icon));\n };\n}\n\nexport function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider {\n return {provide: TUI_ICON_RESOLVER, useValue};\n}\n","import {\n computed,\n inject,\n InjectionToken,\n type Provider,\n type Signal,\n signal,\n} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {type TuiRounding} from '@taiga-ui/cdk/types';\n\nexport type TuiDecimalMode = 'always' | 'not-zero' | 'pad';\nexport type TuiDecimalSymbol = ',' | '.';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport interface TuiNumberFormatSettings {\n /**\n * Number of digits of decimal part.\n * @note Use `Infinity` to keep untouched.\n */\n readonly precision: number;\n /**\n * Separator between the integer and the decimal part.\n * @example 0,42 (',' by default)\n */\n readonly decimalSeparator: TuiDecimalSymbol;\n /**\n * Rounding method.\n */\n readonly rounding: TuiRounding;\n /**\n * Separator between thousands.\n * @example 360 000 (' ' by default)\n */\n readonly thousandSeparator: string;\n /**\n * Decimal part display mode. ('pad' by default)\n */\n readonly decimalMode: TuiDecimalMode;\n}\n\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n precision: NaN,\n decimalSeparator: '.',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n rounding: 'truncate',\n decimalMode: 'pad',\n};\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = new InjectionToken<Signal<TuiNumberFormatSettings>>(\n ngDevMode ? 'TUI_NUMBER_FORMAT' : '',\n {factory: () => signal(TUI_DEFAULT_NUMBER_FORMAT)},\n);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return {\n provide: TUI_NUMBER_FORMAT,\n useFactory: (): Signal<TuiNumberFormatSettings> => {\n const parent = inject(TUI_NUMBER_FORMAT, {optional: true, skipSelf: true});\n\n return computed(() => ({\n ...(parent?.() || TUI_DEFAULT_NUMBER_FORMAT),\n ...options,\n }));\n },\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, type Observable, share, switchMap, takeUntil} from 'rxjs';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_SELECTION_STREAM' : '',\n {\n factory: () => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, 'selectionchange'),\n tuiTypedFromEvent(doc, 'mouseup'),\n tuiTypedFromEvent(doc, 'mousedown').pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, 'mousemove').pipe(\n takeUntil(tuiTypedFromEvent(doc, 'mouseup')),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, 'keydown'),\n tuiTypedFromEvent(doc, 'keyup'),\n ).pipe(share());\n },\n },\n);\n","import {InjectionToken, type Provider, type Signal} from '@angular/core';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport const TUI_VALIDATION_ERRORS = new InjectionToken<\n Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>\n>(ngDevMode ? 'TUI_VALIDATION_ERRORS' : '', {factory: () => ({})});\n\nexport const tuiValidationErrorsProvider = (\n useValue: Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>,\n): Provider => ({provide: TUI_VALIDATION_ERRORS, useValue});\n","import {inject, InjectionToken, type Provider, type Type} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {type TuiRectAccessor} from '@taiga-ui/core/classes';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = new InjectionToken<TuiRectAccessor>(\n ngDevMode ? 'TUI_VIEWPORT' : '',\n {\n factory: () => {\n const win = inject(WA_WINDOW);\n\n return {\n type: 'viewport',\n getClientRect() {\n const {height = 0, offsetTop = 0} = win.visualViewport || {};\n const rect = {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: height + offsetTop || win.innerHeight,\n x: 0,\n y: 0,\n };\n\n return {\n ...rect,\n toJSON: () => JSON.stringify(rect),\n };\n },\n };\n },\n },\n);\n\nexport function tuiAsViewport(accessor: Type<TuiRectAccessor>): Provider {\n return tuiProvide(TUI_VIEWPORT, accessor);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGa,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MACL,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,UAAU,GAAG,kCAAkC;AACxE,SAAA,OAAO,IAAI,KAAK;AAC5B,CAAA;;ACLL;;AAEG;AACU,MAAA,oBAAoB,GAAG,IAAI,cAAc,CAClD,SAAS,GAAG,sBAAsB,GAAG,EAAE,EACvC,EAAC,OAAO,EAAE,OAAO,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAC;;ACP5C,MAAA,eAAe,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,iBAAiB,GAAG,EAAE,EAAE;AAClF,IAAA,OAAO,EAAE,MAAM,uBAAuB;AACzC,CAAA;AAEK,SAAU,qBAAqB,CAAC,QAAgB,EAAA;IAClD,OAAO;AACH,QAAA,OAAO,EAAE,eAAe;QACxB,QAAQ;KACX;AACL;;ACRa,MAAA,aAAa,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,eAAe,GAAG,EAAE,EAAE;AAC9E,IAAA,OAAO,EAAE,MAAM,IAAI;AACtB,CAAA;AAEK,SAAU,cAAc,CAAC,CAAgB,EAAA;AAC3C,IAAA,OAAO,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC;AACvC;;ACAA;;AAEG;AACU,MAAA,SAAS,GAAG,IAAI,cAAc,CAAW,SAAS,GAAG,WAAW,GAAG,EAAE,EAAE;AAChF,IAAA,OAAO,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE,GAAG;AACX,QAAA,YAAY,EAAE,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,GAAG;AACT,oBAAA,GAAG,EAAE,CAAC;AACN,oBAAA,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,GAAG,CAAC,UAAU;oBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;oBACvB,KAAK,EAAE,GAAG,CAAC,UAAU;AACrB,oBAAA,MAAM,EAAE,MAAM,GAAG,SAAS,IAAI,GAAG,CAAC,WAAW;AAC7C,oBAAA,CAAC,EAAE,CAAC;AACJ,oBAAA,CAAC,EAAE,CAAC;iBACP;gBAED,OAAO;AACH,oBAAA,GAAG,IAAI;oBACP,MAAM,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;iBACrC;aACJ;SACJ;KACJ;AACJ,CAAA;AAGC,SAAU,aAAa,CAAC,QAA+B,EAAA;AACzD,IAAA,OAAO,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC;AAC7C;;ACzCA;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils-dom.mjs","sources":["../../../projects/core/utils/dom/check-fixed-position.ts","../../../projects/core/utils/dom/get-viewport.ts","../../../projects/core/utils/dom/get-word-range.ts","../../../projects/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["export function tuiCheckFixedPosition(element?: HTMLElement | null): boolean {\n return (\n !!element && (isFixed(element) || tuiCheckFixedPosition(element.parentElement))\n );\n}\n\nfunction isFixed(element: HTMLElement): boolean {\n return (\n element.ownerDocument.defaultView\n ?.getComputedStyle(element)\n .getPropertyValue('position') === 'fixed'\n );\n}\n","/**\n * @description:\n * Cross-browser @media (height/width)\n *\n * 1. window.innerWidth/Width\n * 1.1. gets CSS viewport @media (height/width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight/Width\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","import {\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n svgNodeFilter,\n} from '@taiga-ui/cdk/constants';\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\nexport function tuiGetWordRange(currentRange: Range): Range {\n const range = currentRange.cloneRange();\n const {startContainer, startOffset, endContainer, endOffset} = range;\n const {ownerDocument} = startContainer;\n\n if (!ownerDocument) {\n return range;\n }\n\n const treeWalker = ownerDocument.createTreeWalker(\n ownerDocument.body,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = startContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content =\n container === startContainer\n ? textContent.slice(0, Math.max(0, startOffset + 1))\n : textContent;\n const offset =\n Math.max(\n content.lastIndexOf(' '),\n content.lastIndexOf('\\n'),\n content.lastIndexOf(CHAR_NO_BREAK_SPACE),\n content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE),\n ) + 1;\n\n range.setStart(container, 0);\n\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n\n treeWalker.currentNode = endContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content =\n container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n const offset = [\n content.indexOf(' '),\n content.lastIndexOf('\\n'),\n content.indexOf(CHAR_NO_BREAK_SPACE),\n content.indexOf(CHAR_ZERO_WIDTH_SPACE),\n ].reduce(\n (result, item) =>\n result === -1 || item === -1\n ? Math.max(result, item)\n : Math.min(result, item),\n -1,\n );\n\n range.setEnd(container, textContent.length);\n\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n\n return range;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAM,SAAU,qBAAqB,CAAC,OAA4B,EAAA;AAC9D,IAAA,QACI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,EACjF;AACN,CAAC;AAED,SAAS,OAAO,CAAC,OAAoB,EAAA;AACjC,IAAA,QACI,OAAO,CAAC,aAAa,CAAC,WAAW;UAC3B,gBAAgB,CAAC,OAAO,CAAC;AAC1B,SAAA,gBAAgB,CAAC,UAAU,CAAC,KAAK,OAAO,EAC/C;AACN;;ACZA;;;;;;;;;;;;;;;;AAgBG;SACa,oBAAoB,CAAC,EAAC,QAAQ,EAAE,WAAW,EAAS,EAAA;AAChE,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,YAAY,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,CAAC,CAAC;AAClF,CAAC;SAEe,mBAAmB,CAAC,EAAC,QAAQ,EAAE,UAAU,EAAS,EAAA;AAC9D,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,IAAI,CAAC,EAAE,UAAU,IAAI,CAAC,CAAC,CAAC;AAChF;;ACjBA;;;;;AAKG;AACG,SAAU,eAAe,CAAC,YAAmB,EAAA;AAC/C,IAAA,MAAM,KAAK,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;IACxC,MAAM,EAAC,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAC,GAAG,KAAK,CAAC;AACrE,IAAA,MAAM,EAAC,aAAa,EAAC,GAAG,cAAc,CAAC;IAEvC,IAAI,CAAC,aAAa,EAAE;AAChB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AW,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;AAChF,QAAA,MAAM,MAAM,GAAG;AACX,YAAA,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;AACpB,YAAA,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;AACzB,YAAA,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;AACpC,YAAA,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;AACzC,SAAA,CAAC,MAAM,CACJ,CAAC,MAAM,EAAE,IAAI,KACT,MAAM,KAAK,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC;cACtB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;AACxB,cAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,EAChC,CAAC,CAAC,CACL,CAAC;QAEF,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;AAE5C,QAAA,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE;AACf,YAAA,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;YACtE,MAAM;AACT,SAAA;AACJ,KAAA,QAAQ,UAAU,CAAC,QAAQ,EAAE,EAAE;AAEhC,IAAA,OAAO,KAAK,CAAC;AACjB;;ACjFA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-utils-dom.mjs","sources":["../../../projects/core/utils/dom/check-fixed-position.ts","../../../projects/core/utils/dom/get-viewport.ts","../../../projects/core/utils/dom/get-word-range.ts","../../../projects/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["export function tuiCheckFixedPosition(element?: HTMLElement | null): boolean {\n return (\n !!element && (isFixed(element) || tuiCheckFixedPosition(element.parentElement))\n );\n}\n\nfunction isFixed(element: HTMLElement): boolean {\n return (\n element.ownerDocument.defaultView\n ?.getComputedStyle(element)\n .getPropertyValue('position') === 'fixed'\n );\n}\n","/**\n * @description:\n * Cross-browser @media (height/width)\n *\n * 1. window.innerWidth/Width\n * 1.1. gets CSS viewport @media (height/width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight/Width\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","import {\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n svgNodeFilter,\n} from '@taiga-ui/cdk/constants';\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\nexport function tuiGetWordRange(currentRange: Range): Range {\n const range = currentRange.cloneRange();\n const {startContainer, startOffset, endContainer, endOffset} = range;\n const {ownerDocument} = startContainer;\n\n if (!ownerDocument) {\n return range;\n }\n\n const treeWalker = ownerDocument.createTreeWalker(\n ownerDocument.body,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = startContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content =\n container === startContainer\n ? textContent.slice(0, Math.max(0, startOffset + 1))\n : textContent;\n const offset =\n Math.max(\n content.lastIndexOf(' '),\n content.lastIndexOf('\\n'),\n content.lastIndexOf(CHAR_NO_BREAK_SPACE),\n content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE),\n ) + 1;\n\n range.setStart(container, 0);\n\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n\n treeWalker.currentNode = endContainer;\n\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content =\n container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n const offset = [\n content.indexOf(' '),\n content.lastIndexOf('\\n'),\n content.indexOf(CHAR_NO_BREAK_SPACE),\n content.indexOf(CHAR_ZERO_WIDTH_SPACE),\n ].reduce(\n (result, item) =>\n result === -1 || item === -1\n ? Math.max(result, item)\n : Math.min(result, item),\n -1,\n );\n\n range.setEnd(container, textContent.length);\n\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n\n return range;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAM,SAAU,qBAAqB,CAAC,OAA4B,EAAA;AAC9D,IAAA,QACI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAEvF;AAEA,SAAS,OAAO,CAAC,OAAoB,EAAA;AACjC,IAAA,QACI,OAAO,CAAC,aAAa,CAAC;UAChB,gBAAgB,CAAC,OAAO;AACzB,SAAA,gBAAgB,CAAC,UAAU,CAAC,KAAK,OAAO;AAErD;;ACZA;;;;;;;;;;;;;;;;AAgBG;SACa,oBAAoB,CAAC,EAAC,QAAQ,EAAE,WAAW,EAAS,EAAA;AAChE,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,YAAY,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,CAAC;AACjF;SAEgB,mBAAmB,CAAC,EAAC,QAAQ,EAAE,UAAU,EAAS,EAAA;AAC9D,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,IAAI,CAAC,EAAE,UAAU,IAAI,CAAC,CAAC;AAC/E;;ACjB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C,QAAA,MAAM,SAAS,GAAG,UAAU,CAAC,WAAW;AACxC,QAAA,MAAM,WAAW,GAAG,SAAS,CAAC,WAAW,IAAI,EAAE;QAC/C,MAAM,OAAO,GACT,SAAS,KAAK,YAAY,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,WAAW;AAC/E,QAAA,MAAM,MAAM,GAAG;AACX,YAAA,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;AACpB,YAAA,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;AACzB,YAAA,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;AACpC,YAAA,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;AACzC,SAAA,CAAC,MAAM,CACJ,CAAC,MAAM,EAAE,IAAI,KACT,MAAM,KAAK,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC;cACrB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI;AACvB,cAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,EAChC,CAAC,CAAC,CACL;QAED,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC;AAE3C,QAAA,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE;AACf,YAAA,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YACrE;;AAER,KAAC,QAAQ,UAAU,CAAC,QAAQ,EAAE;AAE9B,IAAA,OAAO,KAAK;AAChB;;ACjFA;;AAEG;;;;"}
@@ -78,30 +78,9 @@ function tuiFormatNumber(value, settings = {}) {
78
78
  return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;
79
79
  }
80
80
 
81
- /**
82
- * Converts a string to an HSL color
83
- * @param value string to convert
84
- * @return HSL color string
85
- */
86
- // @bad TODO: convert stringHashToHsl to stringHashToRgb
87
- function tuiStringHashToHsl(value) {
88
- if (value === '') {
89
- return '';
90
- }
91
- let hash = 0;
92
- for (let i = 0; i < value.length; i++) {
93
- hash = value.charCodeAt(i) + ((hash << 5) - hash);
94
- hash &= hash;
95
- }
96
- const hue = hash % 360;
97
- const saturation = 60 + (hash % 5);
98
- const lightness = 80 + (hash % 5);
99
- return `hsl(${hue},${saturation}%,${lightness}%)`;
100
- }
101
-
102
81
  /**
103
82
  * Generated bundle index. Do not edit.
104
83
  */
105
84
 
106
- export { tuiFormatNumber, tuiGetFractionPartPadded, tuiNumberToStringWithoutExp, tuiStringHashToHsl };
85
+ export { tuiFormatNumber, tuiGetFractionPartPadded, tuiNumberToStringWithoutExp };
107
86
  //# sourceMappingURL=taiga-ui-core-utils-format.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils-format.mjs","sources":["../../../projects/core/utils/format/number-to-string-without-exp.ts","../../../projects/core/utils/format/get-fractional-part-padded.ts","../../../projects/core/utils/format/format-number.ts","../../../projects/core/utils/format/string-hash-to-hsl.ts","../../../projects/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\n * Convert number to string with replacing exponent part on decimals\n *\n * @param value the number\n * @return string representation of a number\n */\nexport function tuiNumberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split('e-');\n\n let valueWithoutExp = valueAsString;\n\n if (expPart) {\n const [, fractionalPart = ''] = numberPart?.split('.') ?? [];\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n","import {tuiIsNumber} from '@taiga-ui/cdk/utils/miscellaneous';\n\nimport {tuiNumberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\n * Return fractional part of number\n *\n * @param value the number\n * @param precision number of digits of decimal part, null to keep untouched\n * @return the fractional part of number\n */\nexport function tuiGetFractionPartPadded(\n value: number,\n precision?: number | null,\n): string {\n const [, fractionPartPadded = ''] = tuiNumberToStringWithoutExp(value).split('.');\n\n return tuiIsNumber(precision)\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk/constants';\nimport {tuiRoundWith} from '@taiga-ui/cdk/utils/math';\nimport {\n TUI_DEFAULT_NUMBER_FORMAT,\n type TuiNumberFormatSettings,\n} from '@taiga-ui/core/tokens';\n\nimport {tuiGetFractionPartPadded} from './get-fractional-part-padded';\n\n/**\n * Formats number adding a thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n *\n * @param value the input number\n * @param settings See {@link TuiNumberFormatSettings}\n * @return the formatted string\n */\nexport function tuiFormatNumber(\n value: number,\n settings: Partial<TuiNumberFormatSettings> = {},\n): string {\n const {precision, decimalSeparator, thousandSeparator, decimalMode, rounding} = {\n ...TUI_DEFAULT_NUMBER_FORMAT,\n decimalMode: 'always',\n precision: Infinity,\n ...settings,\n };\n\n const rounded = Number.isFinite(precision)\n ? tuiRoundWith({value, precision, method: rounding})\n : value;\n const integerPartString = String(Math.floor(Math.abs(rounded)));\n\n let fractionPartPadded = tuiGetFractionPartPadded(rounded, precision);\n const hasFraction = Number(fractionPartPadded) > 0;\n\n if (Number.isFinite(precision)) {\n if (decimalMode === 'always' || (hasFraction && decimalMode === 'pad')) {\n const zeroPaddingSize: number = Math.max(\n precision - fractionPartPadded.length,\n 0,\n );\n const zeroPartString = '0'.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n } else {\n fractionPartPadded = fractionPartPadded.replace(/0*$/, '');\n }\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? CHAR_HYPHEN : '';\n let result = sign + integerPartString.charAt(0);\n\n for (let i = 1; i < integerPartString.length; i++) {\n if (i % 3 === remainder && integerPartString.length > 3) {\n result += thousandSeparator;\n }\n\n result += integerPartString.charAt(i);\n }\n\n return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;\n}\n","/**\n * Converts a string to an HSL color\n * @param value string to convert\n * @return HSL color string\n */\n// @bad TODO: convert stringHashToHsl to stringHashToRgb\nexport function tuiStringHashToHsl(value: string): string {\n if (value === '') {\n return '';\n }\n\n let hash = 0;\n\n for (let i = 0; i < value.length; i++) {\n hash = value.charCodeAt(i) + ((hash << 5) - hash);\n hash &= hash;\n }\n\n const hue = hash % 360;\n const saturation = 60 + (hash % 5);\n const lightness = 80 + (hash % 5);\n\n return `hsl(${hue},${saturation}%,${lightness}%)`;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AACG,SAAU,2BAA2B,CAAC,KAAa,EAAA;AACrD,IAAA,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACpC,IAAA,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAExD,IAAI,eAAe,GAAG,aAAa,CAAC;AAEpC,IAAA,IAAI,OAAO,EAAE;AACT,QAAA,MAAM,GAAG,cAAc,GAAG,EAAE,CAAC,GAAG,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AAC7D,QAAA,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,cAAc,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;AAEtE,QAAA,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAClD,KAAA;AAED,IAAA,OAAO,eAAe,CAAC;AAC3B;;AChBA;;;;;;AAMG;AACa,SAAA,wBAAwB,CACpC,KAAa,EACb,SAAyB,EAAA;AAEzB,IAAA,MAAM,GAAG,kBAAkB,GAAG,EAAE,CAAC,GAAG,2BAA2B,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElF,OAAO,WAAW,CAAC,SAAS,CAAC;AACzB,UAAE,kBAAkB,C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GAAG,CAAC;IACvB,MAAM,UAAU,GAAG,EAAE,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC;IACnC,MAAM,SAAS,GAAG,EAAE,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC;AAElC,IAAA,OAAO,OAAO,GAAG,CAAA,CAAA,EAAI,UAAU,CAAK,EAAA,EAAA,SAAS,IAAI,CAAC;AACtD;;ACvBA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-utils-format.mjs","sources":["../../../projects/core/utils/format/number-to-string-without-exp.ts","../../../projects/core/utils/format/get-fractional-part-padded.ts","../../../projects/core/utils/format/format-number.ts","../../../projects/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\n * Convert number to string with replacing exponent part on decimals\n *\n * @param value the number\n * @return string representation of a number\n */\nexport function tuiNumberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split('e-');\n\n let valueWithoutExp = valueAsString;\n\n if (expPart) {\n const [, fractionalPart = ''] = numberPart?.split('.') ?? [];\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n","import {tuiIsNumber} from '@taiga-ui/cdk/utils/miscellaneous';\n\nimport {tuiNumberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\n * Return fractional part of number\n *\n * @param value the number\n * @param precision number of digits of decimal part, null to keep untouched\n * @return the fractional part of number\n */\nexport function tuiGetFractionPartPadded(\n value: number,\n precision?: number | null,\n): string {\n const [, fractionPartPadded = ''] = tuiNumberToStringWithoutExp(value).split('.');\n\n return tuiIsNumber(precision)\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk/constants';\nimport {tuiRoundWith} from '@taiga-ui/cdk/utils/math';\nimport {\n TUI_DEFAULT_NUMBER_FORMAT,\n type TuiNumberFormatSettings,\n} from '@taiga-ui/core/tokens';\n\nimport {tuiGetFractionPartPadded} from './get-fractional-part-padded';\n\n/**\n * Formats number adding a thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n *\n * @param value the input number\n * @param settings See {@link TuiNumberFormatSettings}\n * @return the formatted string\n */\nexport function tuiFormatNumber(\n value: number,\n settings: Partial<TuiNumberFormatSettings> = {},\n): string {\n const {precision, decimalSeparator, thousandSeparator, decimalMode, rounding} = {\n ...TUI_DEFAULT_NUMBER_FORMAT,\n decimalMode: 'always',\n precision: Infinity,\n ...settings,\n };\n\n const rounded = Number.isFinite(precision)\n ? tuiRoundWith({value, precision, method: rounding})\n : value;\n const integerPartString = String(Math.floor(Math.abs(rounded)));\n\n let fractionPartPadded = tuiGetFractionPartPadded(rounded, precision);\n const hasFraction = Number(fractionPartPadded) > 0;\n\n if (Number.isFinite(precision)) {\n if (decimalMode === 'always' || (hasFraction && decimalMode === 'pad')) {\n const zeroPaddingSize: number = Math.max(\n precision - fractionPartPadded.length,\n 0,\n );\n const zeroPartString = '0'.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n } else {\n fractionPartPadded = fractionPartPadded.replace(/0*$/, '');\n }\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? CHAR_HYPHEN : '';\n let result = sign + integerPartString.charAt(0);\n\n for (let i = 1; i < integerPartString.length; i++) {\n if (i % 3 === remainder && integerPartString.length > 3) {\n result += thousandSeparator;\n }\n\n result += integerPartString.charAt(i);\n }\n\n return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AACG,SAAU,2BAA2B,CAAC,KAAa,EAAA;AACrD,IAAA,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC;AACnC,IAAA,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,KAAK,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