@taiga-ui/legacy 4.51.0 → 4.52.0-canary.1acd1eb

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 (545) hide show
  1. package/classes/abstract-textfield-host.d.ts +1 -1
  2. package/classes/controller.d.ts +1 -1
  3. package/classes/multiple-control.d.ts +1 -1
  4. package/classes/nullable-control.d.ts +1 -1
  5. package/components/dialog/dialog.component.d.ts +20 -0
  6. package/components/dialog/dialog.directive.d.ts +7 -0
  7. package/components/dialog/dialog.factory.d.ts +16 -0
  8. package/components/dialog/dialog.interfaces.d.ts +31 -0
  9. package/components/dialog/dialog.service.d.ts +7 -0
  10. package/components/dialog/dialog.tokens.d.ts +8 -0
  11. package/components/dialog/index.d.ts +6 -0
  12. package/components/index.d.ts +2 -16
  13. package/components/input/input.module.d.ts +1 -1
  14. package/components/input-date-range/input-date-range.module.d.ts +1 -1
  15. package/components/input-date-time/input-date-time.component.d.ts +4 -3
  16. package/components/input-date-time/input-date-time.module.d.ts +1 -1
  17. package/components/input-month-range/input-month-range.module.d.ts +1 -1
  18. package/components/input-range/input-range.component.d.ts +1 -1
  19. package/components/input-tag/input-tag.module.d.ts +1 -1
  20. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
  21. package/components/multi-select/multi-select.module.d.ts +1 -1
  22. package/components/multi-select/native-multi-select/native-multi-select.d.ts +1 -1
  23. package/components/pdf-viewer/index.d.ts +4 -0
  24. package/components/pdf-viewer/pdf-viewer.component.d.ts +12 -0
  25. package/components/pdf-viewer/pdf-viewer.directive.d.ts +7 -0
  26. package/components/pdf-viewer/pdf-viewer.options.d.ts +13 -0
  27. package/components/pdf-viewer/pdf-viewer.service.d.ts +13 -0
  28. package/components/select/select.module.d.ts +1 -1
  29. package/fesm2022/taiga-ui-legacy-classes.mjs +23 -24
  30. package/fesm2022/taiga-ui-legacy-classes.mjs.map +1 -1
  31. package/fesm2022/taiga-ui-legacy-components-arrow.mjs +6 -6
  32. package/fesm2022/taiga-ui-legacy-components-arrow.mjs.map +1 -1
  33. package/fesm2022/taiga-ui-legacy-components-dialog.mjs +129 -0
  34. package/fesm2022/taiga-ui-legacy-components-dialog.mjs.map +1 -0
  35. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs +29 -29
  36. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs +31 -31
  38. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs +14 -14
  40. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs.map +1 -1
  41. package/fesm2022/taiga-ui-legacy-components-input-number.mjs +23 -23
  42. package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +1 -1
  43. package/fesm2022/taiga-ui-legacy-components-input-range.mjs +26 -26
  44. package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +1 -1
  45. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs +20 -21
  46. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +1 -1
  47. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +24 -24
  48. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +1 -1
  49. package/fesm2022/taiga-ui-legacy-components-input.mjs +17 -18
  50. package/fesm2022/taiga-ui-legacy-components-input.mjs.map +1 -1
  51. package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs +8 -8
  52. package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +51 -51
  54. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs +82 -0
  56. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs.map +1 -0
  57. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +30 -30
  58. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-legacy-components-select-option.mjs +9 -9
  60. package/fesm2022/taiga-ui-legacy-components-select-option.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-legacy-components-select.mjs +36 -37
  62. package/fesm2022/taiga-ui-legacy-components-select.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-legacy-components-tag.mjs +14 -15
  64. package/fesm2022/taiga-ui-legacy-components-tag.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-legacy-components-textarea.mjs +24 -24
  66. package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +1 -1
  67. package/fesm2022/taiga-ui-legacy-components-tooltip.mjs +8 -8
  68. package/fesm2022/taiga-ui-legacy-components-tooltip.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-legacy-components.mjs +2 -16
  70. package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs +3 -3
  72. package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs +35 -35
  74. package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs +5 -6
  76. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-legacy-directives-value-accessor.mjs +7 -7
  78. package/fesm2022/taiga-ui-legacy-directives-value-accessor.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-legacy-directives-wrapper.mjs +9 -9
  80. package/fesm2022/taiga-ui-legacy-directives-wrapper.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-legacy-tokens.mjs +1 -1
  82. package/fesm2022/taiga-ui-legacy-tokens.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-legacy-utils.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-legacy.mjs +0 -2
  85. package/fesm2022/taiga-ui-legacy.mjs.map +1 -1
  86. package/index.d.ts +0 -2
  87. package/package.json +9 -183
  88. package/styles/mixins/textfield.less +3 -1
  89. package/utils/icons-path-factory.d.ts +1 -1
  90. package/components/color-selector/color-edit/color-edit.component.d.ts +0 -18
  91. package/components/color-selector/color-edit/color-edit.module.d.ts +0 -21
  92. package/components/color-selector/color-picker/color-picker.component.d.ts +0 -22
  93. package/components/color-selector/color-picker/color-picker.module.d.ts +0 -14
  94. package/components/color-selector/color-selector.component.d.ts +0 -47
  95. package/components/color-selector/color-selector.module.d.ts +0 -24
  96. package/components/color-selector/color-selector.options.d.ts +0 -25
  97. package/components/color-selector/flat-picker/flat-picker.component.d.ts +0 -12
  98. package/components/color-selector/flat-picker/flat-picker.module.d.ts +0 -12
  99. package/components/color-selector/index.d.ts +0 -16
  100. package/components/color-selector/linear-multi-picker/linear-multi-picker.component.d.ts +0 -17
  101. package/components/color-selector/linear-multi-picker/linear-multi-picker.module.d.ts +0 -12
  102. package/components/color-selector/linear-picker/linear-picker.component.d.ts +0 -10
  103. package/components/color-selector/linear-picker/linear-picker.module.d.ts +0 -12
  104. package/components/color-selector/palette/palette.component.d.ts +0 -10
  105. package/components/color-selector/palette/palette.module.d.ts +0 -13
  106. package/components/color-selector/services/picker.service.d.ts +0 -15
  107. package/components/combo-box/combo-box-strict.directive.d.ts +0 -12
  108. package/components/combo-box/combo-box.component.d.ts +0 -52
  109. package/components/combo-box/combo-box.directive.d.ts +0 -13
  110. package/components/combo-box/combo-box.module.d.ts +0 -20
  111. package/components/combo-box/index.d.ts +0 -4
  112. package/components/input-color/index.d.ts +0 -2
  113. package/components/input-color/input-color.component.d.ts +0 -30
  114. package/components/input-color/input-color.module.d.ts +0 -17
  115. package/components/input-copy/index.d.ts +0 -4
  116. package/components/input-copy/input-copy.component.d.ts +0 -33
  117. package/components/input-copy/input-copy.directive.d.ts +0 -11
  118. package/components/input-copy/input-copy.module.d.ts +0 -18
  119. package/components/input-copy/input-copy.options.d.ts +0 -26
  120. package/components/input-date/index.d.ts +0 -3
  121. package/components/input-date/input-date.component.d.ts +0 -62
  122. package/components/input-date/input-date.directive.d.ts +0 -19
  123. package/components/input-date/input-date.module.d.ts +0 -24
  124. package/components/input-date/native-date/native-date.component.d.ts +0 -15
  125. package/components/input-date-multi/index.d.ts +0 -2
  126. package/components/input-date-multi/input-date-multi.component.d.ts +0 -66
  127. package/components/input-date-multi/input-date-multi.module.d.ts +0 -20
  128. package/components/input-month/index.d.ts +0 -3
  129. package/components/input-month/input-month.component.d.ts +0 -44
  130. package/components/input-month/input-month.directive.d.ts +0 -19
  131. package/components/input-month/input-month.module.d.ts +0 -19
  132. package/components/input-password/index.d.ts +0 -4
  133. package/components/input-password/input-password.component.d.ts +0 -33
  134. package/components/input-password/input-password.directive.d.ts +0 -15
  135. package/components/input-password/input-password.module.d.ts +0 -19
  136. package/components/input-password/input-password.options.d.ts +0 -25
  137. package/components/input-phone/index.d.ts +0 -4
  138. package/components/input-phone/input-phone.component.d.ts +0 -49
  139. package/components/input-phone/input-phone.directive.d.ts +0 -13
  140. package/components/input-phone/input-phone.module.d.ts +0 -12
  141. package/components/input-phone/input-phone.options.d.ts +0 -13
  142. package/components/input-phone/utils/complete-phone-insertion-preprocessor.d.ts +0 -9
  143. package/components/input-phone/utils/create-phone-mask-expression.d.ts +0 -7
  144. package/components/input-phone/utils/index.d.ts +0 -2
  145. package/components/input-phone-international/index.d.ts +0 -3
  146. package/components/input-phone-international/input-phone-international.component.d.ts +0 -43
  147. package/components/input-phone-international/input-phone-international.options.d.ts +0 -25
  148. package/components/input-phone-international/utils/extract-value-from-event.d.ts +0 -4
  149. package/components/input-time/index.d.ts +0 -4
  150. package/components/input-time/input-time.component.d.ts +0 -62
  151. package/components/input-time/input-time.directive.d.ts +0 -17
  152. package/components/input-time/input-time.module.d.ts +0 -23
  153. package/components/input-time/input-time.options.d.ts +0 -42
  154. package/components/input-time/native-time/native-time.component.d.ts +0 -12
  155. package/components/input-year/index.d.ts +0 -3
  156. package/components/input-year/input-year.component.d.ts +0 -36
  157. package/components/input-year/input-year.directive.d.ts +0 -14
  158. package/components/input-year/input-year.module.d.ts +0 -18
  159. package/components/island/index.d.ts +0 -1
  160. package/components/island/island.directive.d.ts +0 -20
  161. package/components/sheet/components/sheet/sheet.component.d.ts +0 -31
  162. package/components/sheet/components/sheet/sheet.providers.d.ts +0 -2
  163. package/components/sheet/components/sheet-bar/sheet-bar.component.d.ts +0 -10
  164. package/components/sheet/components/sheet-heading/sheet-heading.component.d.ts +0 -14
  165. package/components/sheet/components/sheets-host/sheets-host.component.d.ts +0 -15
  166. package/components/sheet/directives/sheet-close/sheet-close.directive.d.ts +0 -14
  167. package/components/sheet/directives/sheet-stop/sheet-stop.directive.d.ts +0 -9
  168. package/components/sheet/directives/sheet-top/sheet-top.directive.d.ts +0 -14
  169. package/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.d.ts +0 -17
  170. package/components/sheet/index.d.ts +0 -14
  171. package/components/sheet/sheet-options.d.ts +0 -27
  172. package/components/sheet/sheet-tokens.d.ts +0 -18
  173. package/components/sheet/sheet.d.ts +0 -21
  174. package/components/sheet/sheet.directive.d.ts +0 -17
  175. package/components/sheet/sheet.module.d.ts +0 -24
  176. package/components/sheet/sheet.service.d.ts +0 -17
  177. package/components/svg/content-processor.d.ts +0 -19
  178. package/components/svg/deprecated-icons.d.ts +0 -5
  179. package/components/svg/index.d.ts +0 -5
  180. package/components/svg/svg-options.d.ts +0 -50
  181. package/components/svg/svg.component.d.ts +0 -50
  182. package/components/svg/svg.service.d.ts +0 -21
  183. package/components/table-bar/index.d.ts +0 -4
  184. package/components/table-bar/table-bar.component.d.ts +0 -17
  185. package/components/table-bar/table-bar.directive.d.ts +0 -11
  186. package/components/table-bar/table-bar.options.d.ts +0 -31
  187. package/components/table-bar/table-bars-host.component.d.ts +0 -10
  188. package/components/table-bar/table-bars.service.d.ts +0 -11
  189. package/esm2022/classes/abstract-native-select.mjs +0 -49
  190. package/esm2022/classes/abstract-textfield-host.mjs +0 -37
  191. package/esm2022/classes/control.mjs +0 -181
  192. package/esm2022/classes/controller.mjs +0 -18
  193. package/esm2022/classes/index.mjs +0 -10
  194. package/esm2022/classes/interactive.mjs +0 -82
  195. package/esm2022/classes/multiple-control.mjs +0 -21
  196. package/esm2022/classes/named-day.mjs +0 -14
  197. package/esm2022/classes/nullable-control.mjs +0 -18
  198. package/esm2022/classes/stringifiable-item.mjs +0 -14
  199. package/esm2022/classes/taiga-ui-legacy-classes.mjs +0 -5
  200. package/esm2022/components/arrow/arrow.component.mjs +0 -41
  201. package/esm2022/components/arrow/arrow.options.mjs +0 -20
  202. package/esm2022/components/arrow/arrow.providers.mjs +0 -23
  203. package/esm2022/components/arrow/index.mjs +0 -4
  204. package/esm2022/components/arrow/taiga-ui-legacy-components-arrow.mjs +0 -5
  205. package/esm2022/components/color-selector/color-edit/color-edit.component.mjs +0 -59
  206. package/esm2022/components/color-selector/color-edit/color-edit.module.mjs +0 -56
  207. package/esm2022/components/color-selector/color-picker/color-picker.component.mjs +0 -70
  208. package/esm2022/components/color-selector/color-picker/color-picker.module.mjs +0 -25
  209. package/esm2022/components/color-selector/color-selector.component.mjs +0 -191
  210. package/esm2022/components/color-selector/color-selector.module.mjs +0 -67
  211. package/esm2022/components/color-selector/color-selector.options.mjs +0 -78
  212. package/esm2022/components/color-selector/flat-picker/flat-picker.component.mjs +0 -34
  213. package/esm2022/components/color-selector/flat-picker/flat-picker.module.mjs +0 -23
  214. package/esm2022/components/color-selector/index.mjs +0 -17
  215. package/esm2022/components/color-selector/linear-multi-picker/linear-multi-picker.component.mjs +0 -61
  216. package/esm2022/components/color-selector/linear-multi-picker/linear-multi-picker.module.mjs +0 -23
  217. package/esm2022/components/color-selector/linear-picker/linear-picker.component.mjs +0 -31
  218. package/esm2022/components/color-selector/linear-picker/linear-picker.module.mjs +0 -23
  219. package/esm2022/components/color-selector/palette/palette.component.mjs +0 -23
  220. package/esm2022/components/color-selector/palette/palette.module.mjs +0 -25
  221. package/esm2022/components/color-selector/services/picker.service.mjs +0 -31
  222. package/esm2022/components/color-selector/taiga-ui-legacy-components-color-selector.mjs +0 -5
  223. package/esm2022/components/combo-box/combo-box-strict.directive.mjs +0 -34
  224. package/esm2022/components/combo-box/combo-box.component.mjs +0 -183
  225. package/esm2022/components/combo-box/combo-box.directive.mjs +0 -28
  226. package/esm2022/components/combo-box/combo-box.module.mjs +0 -71
  227. package/esm2022/components/combo-box/index.mjs +0 -5
  228. package/esm2022/components/combo-box/taiga-ui-legacy-components-combo-box.mjs +0 -5
  229. package/esm2022/components/index.mjs +0 -34
  230. package/esm2022/components/input/index.mjs +0 -4
  231. package/esm2022/components/input/input.component.mjs +0 -97
  232. package/esm2022/components/input/input.directive.mjs +0 -25
  233. package/esm2022/components/input/input.module.mjs +0 -42
  234. package/esm2022/components/input/taiga-ui-legacy-components-input.mjs +0 -5
  235. package/esm2022/components/input-color/index.mjs +0 -3
  236. package/esm2022/components/input-color/input-color.component.mjs +0 -85
  237. package/esm2022/components/input-color/input-color.module.mjs +0 -43
  238. package/esm2022/components/input-color/taiga-ui-legacy-components-input-color.mjs +0 -5
  239. package/esm2022/components/input-copy/index.mjs +0 -5
  240. package/esm2022/components/input-copy/input-copy.component.mjs +0 -105
  241. package/esm2022/components/input-copy/input-copy.directive.mjs +0 -24
  242. package/esm2022/components/input-copy/input-copy.module.mjs +0 -55
  243. package/esm2022/components/input-copy/input-copy.options.mjs +0 -24
  244. package/esm2022/components/input-copy/taiga-ui-legacy-components-input-copy.mjs +0 -5
  245. package/esm2022/components/input-date/index.mjs +0 -4
  246. package/esm2022/components/input-date/input-date.component.mjs +0 -220
  247. package/esm2022/components/input-date/input-date.directive.mjs +0 -40
  248. package/esm2022/components/input-date/input-date.module.mjs +0 -75
  249. package/esm2022/components/input-date/native-date/native-date.component.mjs +0 -53
  250. package/esm2022/components/input-date/taiga-ui-legacy-components-input-date.mjs +0 -5
  251. package/esm2022/components/input-date-multi/index.mjs +0 -3
  252. package/esm2022/components/input-date-multi/input-date-multi.component.mjs +0 -207
  253. package/esm2022/components/input-date-multi/input-date-multi.module.mjs +0 -67
  254. package/esm2022/components/input-date-multi/taiga-ui-legacy-components-input-date-multi.mjs +0 -5
  255. package/esm2022/components/input-date-range/index.mjs +0 -4
  256. package/esm2022/components/input-date-range/input-date-range.component.mjs +0 -256
  257. package/esm2022/components/input-date-range/input-date-range.directive.mjs +0 -36
  258. package/esm2022/components/input-date-range/input-date-range.module.mjs +0 -71
  259. package/esm2022/components/input-date-range/taiga-ui-legacy-components-input-date-range.mjs +0 -5
  260. package/esm2022/components/input-date-time/index.mjs +0 -4
  261. package/esm2022/components/input-date-time/input-date-time.component.mjs +0 -315
  262. package/esm2022/components/input-date-time/input-date-time.directive.mjs +0 -37
  263. package/esm2022/components/input-date-time/input-date-time.module.mjs +0 -78
  264. package/esm2022/components/input-date-time/native-date-time/native-date-time.directive.mjs +0 -49
  265. package/esm2022/components/input-date-time/taiga-ui-legacy-components-input-date-time.mjs +0 -5
  266. package/esm2022/components/input-month/index.mjs +0 -4
  267. package/esm2022/components/input-month/input-month.component.mjs +0 -135
  268. package/esm2022/components/input-month/input-month.directive.mjs +0 -46
  269. package/esm2022/components/input-month/input-month.module.mjs +0 -57
  270. package/esm2022/components/input-month/taiga-ui-legacy-components-input-month.mjs +0 -5
  271. package/esm2022/components/input-month-range/index.mjs +0 -4
  272. package/esm2022/components/input-month-range/input-month-range.component.mjs +0 -123
  273. package/esm2022/components/input-month-range/input-month-range.directive.mjs +0 -52
  274. package/esm2022/components/input-month-range/input-month-range.module.mjs +0 -53
  275. package/esm2022/components/input-month-range/taiga-ui-legacy-components-input-month-range.mjs +0 -5
  276. package/esm2022/components/input-number/index.mjs +0 -5
  277. package/esm2022/components/input-number/input-number.component.mjs +0 -284
  278. package/esm2022/components/input-number/input-number.directive.mjs +0 -38
  279. package/esm2022/components/input-number/input-number.module.mjs +0 -48
  280. package/esm2022/components/input-number/input-number.options.mjs +0 -30
  281. package/esm2022/components/input-number/taiga-ui-legacy-components-input-number.mjs +0 -5
  282. package/esm2022/components/input-password/index.mjs +0 -5
  283. package/esm2022/components/input-password/input-password.component.mjs +0 -80
  284. package/esm2022/components/input-password/input-password.directive.mjs +0 -34
  285. package/esm2022/components/input-password/input-password.module.mjs +0 -59
  286. package/esm2022/components/input-password/input-password.options.mjs +0 -24
  287. package/esm2022/components/input-password/taiga-ui-legacy-components-input-password.mjs +0 -5
  288. package/esm2022/components/input-phone/index.mjs +0 -5
  289. package/esm2022/components/input-phone/input-phone.component.mjs +0 -216
  290. package/esm2022/components/input-phone/input-phone.directive.mjs +0 -34
  291. package/esm2022/components/input-phone/input-phone.module.mjs +0 -44
  292. package/esm2022/components/input-phone/input-phone.options.mjs +0 -18
  293. package/esm2022/components/input-phone/taiga-ui-legacy-components-input-phone.mjs +0 -5
  294. package/esm2022/components/input-phone/utils/complete-phone-insertion-preprocessor.mjs +0 -41
  295. package/esm2022/components/input-phone/utils/create-phone-mask-expression.mjs +0 -17
  296. package/esm2022/components/input-phone/utils/index.mjs +0 -3
  297. package/esm2022/components/input-phone-international/index.mjs +0 -4
  298. package/esm2022/components/input-phone-international/input-phone-international.component.mjs +0 -178
  299. package/esm2022/components/input-phone-international/input-phone-international.options.mjs +0 -25
  300. package/esm2022/components/input-phone-international/taiga-ui-legacy-components-input-phone-international.mjs +0 -5
  301. package/esm2022/components/input-phone-international/utils/extract-value-from-event.mjs +0 -10
  302. package/esm2022/components/input-range/index.mjs +0 -3
  303. package/esm2022/components/input-range/input-range.component.mjs +0 -207
  304. package/esm2022/components/input-range/input-range.module.mjs +0 -55
  305. package/esm2022/components/input-range/taiga-ui-legacy-components-input-range.mjs +0 -5
  306. package/esm2022/components/input-slider/index.mjs +0 -3
  307. package/esm2022/components/input-slider/input-slider.component.mjs +0 -154
  308. package/esm2022/components/input-slider/input-slider.module.mjs +0 -48
  309. package/esm2022/components/input-slider/taiga-ui-legacy-components-input-slider.mjs +0 -5
  310. package/esm2022/components/input-tag/index.mjs +0 -4
  311. package/esm2022/components/input-tag/input-tag.component.mjs +0 -436
  312. package/esm2022/components/input-tag/input-tag.module.mjs +0 -67
  313. package/esm2022/components/input-tag/input-tag.options.mjs +0 -27
  314. package/esm2022/components/input-tag/taiga-ui-legacy-components-input-tag.mjs +0 -5
  315. package/esm2022/components/input-time/index.mjs +0 -5
  316. package/esm2022/components/input-time/input-time.component.mjs +0 -238
  317. package/esm2022/components/input-time/input-time.directive.mjs +0 -40
  318. package/esm2022/components/input-time/input-time.module.mjs +0 -71
  319. package/esm2022/components/input-time/input-time.options.mjs +0 -39
  320. package/esm2022/components/input-time/native-time/native-time.component.mjs +0 -67
  321. package/esm2022/components/input-time/taiga-ui-legacy-components-input-time.mjs +0 -5
  322. package/esm2022/components/input-year/index.mjs +0 -4
  323. package/esm2022/components/input-year/input-year.component.mjs +0 -110
  324. package/esm2022/components/input-year/input-year.directive.mjs +0 -32
  325. package/esm2022/components/input-year/input-year.module.mjs +0 -53
  326. package/esm2022/components/input-year/taiga-ui-legacy-components-input-year.mjs +0 -5
  327. package/esm2022/components/island/index.mjs +0 -2
  328. package/esm2022/components/island/island.directive.mjs +0 -62
  329. package/esm2022/components/island/taiga-ui-legacy-components-island.mjs +0 -5
  330. package/esm2022/components/multi-select/hide-selected.pipe.mjs +0 -44
  331. package/esm2022/components/multi-select/index.mjs +0 -11
  332. package/esm2022/components/multi-select/multi-select-group/multi-select-group.component.mjs +0 -98
  333. package/esm2022/components/multi-select/multi-select-group/multi-select-group.directive.mjs +0 -94
  334. package/esm2022/components/multi-select/multi-select.component.mjs +0 -233
  335. package/esm2022/components/multi-select/multi-select.directive.mjs +0 -32
  336. package/esm2022/components/multi-select/multi-select.module.mjs +0 -113
  337. package/esm2022/components/multi-select/multi-select.options.mjs +0 -17
  338. package/esm2022/components/multi-select/native-multi-select/native-multi-select-group.component.mjs +0 -60
  339. package/esm2022/components/multi-select/native-multi-select/native-multi-select.component.mjs +0 -56
  340. package/esm2022/components/multi-select/native-multi-select/native-multi-select.mjs +0 -19
  341. package/esm2022/components/multi-select/taiga-ui-legacy-components-multi-select.mjs +0 -5
  342. package/esm2022/components/multi-select-option/index.mjs +0 -3
  343. package/esm2022/components/multi-select-option/multi-select-option.component.mjs +0 -25
  344. package/esm2022/components/multi-select-option/multi-select-option.module.mjs +0 -20
  345. package/esm2022/components/multi-select-option/taiga-ui-legacy-components-multi-select-option.mjs +0 -5
  346. package/esm2022/components/primitive-textfield/index.mjs +0 -7
  347. package/esm2022/components/primitive-textfield/primitive-textfield-options.mjs +0 -17
  348. package/esm2022/components/primitive-textfield/primitive-textfield-types.mjs +0 -2
  349. package/esm2022/components/primitive-textfield/primitive-textfield.component.mjs +0 -254
  350. package/esm2022/components/primitive-textfield/primitive-textfield.directive.mjs +0 -33
  351. package/esm2022/components/primitive-textfield/primitive-textfield.module.mjs +0 -66
  352. package/esm2022/components/primitive-textfield/taiga-ui-legacy-components-primitive-textfield.mjs +0 -5
  353. package/esm2022/components/primitive-textfield/textfield/textfield.component.mjs +0 -39
  354. package/esm2022/components/primitive-textfield/value-decoration/value-decoration.component.mjs +0 -66
  355. package/esm2022/components/select/index.mjs +0 -7
  356. package/esm2022/components/select/native-select/native-select-group.component.mjs +0 -64
  357. package/esm2022/components/select/native-select/native-select.component.mjs +0 -60
  358. package/esm2022/components/select/select.component.mjs +0 -119
  359. package/esm2022/components/select/select.directive.mjs +0 -34
  360. package/esm2022/components/select/select.module.mjs +0 -87
  361. package/esm2022/components/select/select.options.mjs +0 -24
  362. package/esm2022/components/select/taiga-ui-legacy-components-select.mjs +0 -5
  363. package/esm2022/components/select-option/index.mjs +0 -3
  364. package/esm2022/components/select-option/select-option.component.mjs +0 -65
  365. package/esm2022/components/select-option/select-option.module.mjs +0 -21
  366. package/esm2022/components/select-option/taiga-ui-legacy-components-select-option.mjs +0 -5
  367. package/esm2022/components/sheet/components/sheet/sheet.component.mjs +0 -117
  368. package/esm2022/components/sheet/components/sheet/sheet.providers.mjs +0 -42
  369. package/esm2022/components/sheet/components/sheet-bar/sheet-bar.component.mjs +0 -27
  370. package/esm2022/components/sheet/components/sheet-heading/sheet-heading.component.mjs +0 -31
  371. package/esm2022/components/sheet/components/sheets-host/sheets-host.component.mjs +0 -46
  372. package/esm2022/components/sheet/directives/sheet-close/sheet-close.directive.mjs +0 -39
  373. package/esm2022/components/sheet/directives/sheet-stop/sheet-stop.directive.mjs +0 -38
  374. package/esm2022/components/sheet/directives/sheet-top/sheet-top.directive.mjs +0 -52
  375. package/esm2022/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.mjs +0 -77
  376. package/esm2022/components/sheet/index.mjs +0 -14
  377. package/esm2022/components/sheet/sheet-options.mjs +0 -24
  378. package/esm2022/components/sheet/sheet-tokens.mjs +0 -17
  379. package/esm2022/components/sheet/sheet.directive.mjs +0 -40
  380. package/esm2022/components/sheet/sheet.mjs +0 -2
  381. package/esm2022/components/sheet/sheet.module.mjs +0 -75
  382. package/esm2022/components/sheet/sheet.service.mjs +0 -52
  383. package/esm2022/components/sheet/taiga-ui-legacy-components-sheet.mjs +0 -5
  384. package/esm2022/components/svg/content-processor.mjs +0 -41
  385. package/esm2022/components/svg/deprecated-icons.mjs +0 -63
  386. package/esm2022/components/svg/index.mjs +0 -6
  387. package/esm2022/components/svg/svg-options.mjs +0 -83
  388. package/esm2022/components/svg/svg.component.mjs +0 -150
  389. package/esm2022/components/svg/svg.service.mjs +0 -64
  390. package/esm2022/components/svg/taiga-ui-legacy-components-svg.mjs +0 -5
  391. package/esm2022/components/table-bar/index.mjs +0 -5
  392. package/esm2022/components/table-bar/table-bar.component.mjs +0 -37
  393. package/esm2022/components/table-bar/table-bar.directive.mjs +0 -25
  394. package/esm2022/components/table-bar/table-bar.options.mjs +0 -34
  395. package/esm2022/components/table-bar/table-bars-host.component.mjs +0 -39
  396. package/esm2022/components/table-bar/table-bars.service.mjs +0 -22
  397. package/esm2022/components/table-bar/taiga-ui-legacy-components-table-bar.mjs +0 -5
  398. package/esm2022/components/tag/index.mjs +0 -4
  399. package/esm2022/components/tag/tag.component.mjs +0 -158
  400. package/esm2022/components/tag/tag.module.mjs +0 -42
  401. package/esm2022/components/tag/tag.options.mjs +0 -26
  402. package/esm2022/components/tag/taiga-ui-legacy-components-tag.mjs +0 -5
  403. package/esm2022/components/taiga-ui-legacy-components.mjs +0 -5
  404. package/esm2022/components/textarea/index.mjs +0 -4
  405. package/esm2022/components/textarea/taiga-ui-legacy-components-textarea.mjs +0 -5
  406. package/esm2022/components/textarea/textarea.component.mjs +0 -175
  407. package/esm2022/components/textarea/textarea.directive.mjs +0 -25
  408. package/esm2022/components/textarea/textarea.module.mjs +0 -68
  409. package/esm2022/components/tooltip/index.mjs +0 -3
  410. package/esm2022/components/tooltip/taiga-ui-legacy-components-tooltip.mjs +0 -5
  411. package/esm2022/components/tooltip/tooltip.component.mjs +0 -27
  412. package/esm2022/components/tooltip/tooltip.module.mjs +0 -24
  413. package/esm2022/directives/index.mjs +0 -6
  414. package/esm2022/directives/legacy-dropdown-open-monitor/index.mjs +0 -2
  415. package/esm2022/directives/legacy-dropdown-open-monitor/legacy-dropdown-open-monitor.mjs +0 -44
  416. package/esm2022/directives/legacy-dropdown-open-monitor/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs +0 -5
  417. package/esm2022/directives/taiga-ui-legacy-directives.mjs +0 -5
  418. package/esm2022/directives/textfield-controller/index.mjs +0 -15
  419. package/esm2022/directives/textfield-controller/taiga-ui-legacy-directives-textfield-controller.mjs +0 -5
  420. package/esm2022/directives/textfield-controller/textfield-appearance.directive.mjs +0 -34
  421. package/esm2022/directives/textfield-controller/textfield-cleaner.directive.mjs +0 -28
  422. package/esm2022/directives/textfield-controller/textfield-controller.module.mjs +0 -72
  423. package/esm2022/directives/textfield-controller/textfield-controller.provider.mjs +0 -44
  424. package/esm2022/directives/textfield-controller/textfield-custom-content.directive.mjs +0 -28
  425. package/esm2022/directives/textfield-controller/textfield-filler.directive.mjs +0 -28
  426. package/esm2022/directives/textfield-controller/textfield-icon-left.directive.mjs +0 -24
  427. package/esm2022/directives/textfield-controller/textfield-icon.directive.mjs +0 -24
  428. package/esm2022/directives/textfield-controller/textfield-label-outside.directive.mjs +0 -32
  429. package/esm2022/directives/textfield-controller/textfield-postfix.directive.mjs +0 -28
  430. package/esm2022/directives/textfield-controller/textfield-prefix.directive.mjs +0 -28
  431. package/esm2022/directives/textfield-controller/textfield-size.directive.mjs +0 -28
  432. package/esm2022/directives/textfield-controller/textfield.controller.mjs +0 -49
  433. package/esm2022/directives/textfield-controller/textfield.options.mjs +0 -21
  434. package/esm2022/directives/unfinished-validator/index.mjs +0 -3
  435. package/esm2022/directives/unfinished-validator/taiga-ui-legacy-directives-unfinished-validator.mjs +0 -5
  436. package/esm2022/directives/unfinished-validator/unfinished-validator.directive.mjs +0 -30
  437. package/esm2022/directives/unfinished-validator/unfinished.validator.mjs +0 -15
  438. package/esm2022/directives/value-accessor/index.mjs +0 -4
  439. package/esm2022/directives/value-accessor/taiga-ui-legacy-directives-value-accessor.mjs +0 -5
  440. package/esm2022/directives/value-accessor/value-accessor.directive.mjs +0 -17
  441. package/esm2022/directives/value-accessor/value-accessor.module.mjs +0 -17
  442. package/esm2022/directives/value-accessor/value-accessor.provider.mjs +0 -10
  443. package/esm2022/directives/wrapper/index.mjs +0 -3
  444. package/esm2022/directives/wrapper/taiga-ui-legacy-directives-wrapper.mjs +0 -5
  445. package/esm2022/directives/wrapper/wrapper.directive.mjs +0 -77
  446. package/esm2022/directives/wrapper/wrapper.module.mjs +0 -20
  447. package/esm2022/index.mjs +0 -8
  448. package/esm2022/pipes/format-phone/format-phone.pipe.mjs +0 -54
  449. package/esm2022/pipes/format-phone/index.mjs +0 -2
  450. package/esm2022/pipes/format-phone/taiga-ui-legacy-pipes-format-phone.mjs +0 -5
  451. package/esm2022/pipes/index.mjs +0 -4
  452. package/esm2022/pipes/iso-to-country-code/index.mjs +0 -2
  453. package/esm2022/pipes/iso-to-country-code/iso-to-country-code.pipe.mjs +0 -44
  454. package/esm2022/pipes/iso-to-country-code/taiga-ui-legacy-pipes-iso-to-country-code.mjs +0 -5
  455. package/esm2022/pipes/taiga-ui-legacy-pipes.mjs +0 -5
  456. package/esm2022/pipes/to-country-code/index.mjs +0 -2
  457. package/esm2022/pipes/to-country-code/taiga-ui-legacy-pipes-to-country-code.mjs +0 -5
  458. package/esm2022/pipes/to-country-code/to-country-code.pipe.mjs +0 -74
  459. package/esm2022/services/index.mjs +0 -2
  460. package/esm2022/services/static-request.service.mjs +0 -36
  461. package/esm2022/services/taiga-ui-legacy-services.mjs +0 -5
  462. package/esm2022/taiga-ui-legacy.mjs +0 -5
  463. package/esm2022/tokens/countries-masks.mjs +0 -257
  464. package/esm2022/tokens/focusable-item-accessor.mjs +0 -14
  465. package/esm2022/tokens/fonts-ready.mjs +0 -10
  466. package/esm2022/tokens/icons.mjs +0 -9
  467. package/esm2022/tokens/index.mjs +0 -15
  468. package/esm2022/tokens/is-apple.mjs +0 -11
  469. package/esm2022/tokens/is-chromium.mjs +0 -10
  470. package/esm2022/tokens/is-firefox.mjs +0 -11
  471. package/esm2022/tokens/is-stackblitz.mjs +0 -9
  472. package/esm2022/tokens/month-formatter.mjs +0 -18
  473. package/esm2022/tokens/sanitizer.mjs +0 -7
  474. package/esm2022/tokens/taiga-ui-legacy-tokens.mjs +0 -5
  475. package/esm2022/tokens/textfield-appearance.mjs +0 -10
  476. package/esm2022/tokens/textfield-host.mjs +0 -14
  477. package/esm2022/tokens/touch-supported.mjs +0 -9
  478. package/esm2022/tokens/value-accessor.mjs +0 -7
  479. package/esm2022/utils/capitalize-first-letter.mjs +0 -7
  480. package/esm2022/utils/date-mode-maskito-adapter.mjs +0 -9
  481. package/esm2022/utils/format-phone.mjs +0 -60
  482. package/esm2022/utils/get-border.mjs +0 -23
  483. package/esm2022/utils/get-max-allowed-phone-length.mjs +0 -26
  484. package/esm2022/utils/get-safe-area-size.mjs +0 -18
  485. package/esm2022/utils/icons-path-factory.mjs +0 -22
  486. package/esm2022/utils/index.mjs +0 -14
  487. package/esm2022/utils/is-apple.mjs +0 -6
  488. package/esm2022/utils/is-presumed-html-string.mjs +0 -8
  489. package/esm2022/utils/iso-to-country-code.mjs +0 -16
  490. package/esm2022/utils/not-kz-region.mjs +0 -24
  491. package/esm2022/utils/process-icon.mjs +0 -34
  492. package/esm2022/utils/specific-dropdown-controllers.mjs +0 -9
  493. package/esm2022/utils/status.mjs +0 -2
  494. package/esm2022/utils/taiga-ui-legacy-utils.mjs +0 -5
  495. package/fesm2022/taiga-ui-legacy-components-color-selector.mjs +0 -730
  496. package/fesm2022/taiga-ui-legacy-components-color-selector.mjs.map +0 -1
  497. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs +0 -301
  498. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs.map +0 -1
  499. package/fesm2022/taiga-ui-legacy-components-input-color.mjs +0 -127
  500. package/fesm2022/taiga-ui-legacy-components-input-color.mjs.map +0 -1
  501. package/fesm2022/taiga-ui-legacy-components-input-copy.mjs +0 -197
  502. package/fesm2022/taiga-ui-legacy-components-input-copy.mjs.map +0 -1
  503. package/fesm2022/taiga-ui-legacy-components-input-date-multi.mjs +0 -272
  504. package/fesm2022/taiga-ui-legacy-components-input-date-multi.mjs.map +0 -1
  505. package/fesm2022/taiga-ui-legacy-components-input-date.mjs +0 -372
  506. package/fesm2022/taiga-ui-legacy-components-input-date.mjs.map +0 -1
  507. package/fesm2022/taiga-ui-legacy-components-input-month.mjs +0 -231
  508. package/fesm2022/taiga-ui-legacy-components-input-month.mjs.map +0 -1
  509. package/fesm2022/taiga-ui-legacy-components-input-password.mjs +0 -187
  510. package/fesm2022/taiga-ui-legacy-components-input-password.mjs.map +0 -1
  511. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs +0 -215
  512. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs.map +0 -1
  513. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs +0 -358
  514. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs.map +0 -1
  515. package/fesm2022/taiga-ui-legacy-components-input-time.mjs +0 -434
  516. package/fesm2022/taiga-ui-legacy-components-input-time.mjs.map +0 -1
  517. package/fesm2022/taiga-ui-legacy-components-input-year.mjs +0 -188
  518. package/fesm2022/taiga-ui-legacy-components-input-year.mjs.map +0 -1
  519. package/fesm2022/taiga-ui-legacy-components-island.mjs +0 -68
  520. package/fesm2022/taiga-ui-legacy-components-island.mjs.map +0 -1
  521. package/fesm2022/taiga-ui-legacy-components-sheet.mjs +0 -574
  522. package/fesm2022/taiga-ui-legacy-components-sheet.mjs.map +0 -1
  523. package/fesm2022/taiga-ui-legacy-components-svg.mjs +0 -389
  524. package/fesm2022/taiga-ui-legacy-components-svg.mjs.map +0 -1
  525. package/fesm2022/taiga-ui-legacy-components-table-bar.mjs +0 -145
  526. package/fesm2022/taiga-ui-legacy-components-table-bar.mjs.map +0 -1
  527. package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs +0 -60
  528. package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs.map +0 -1
  529. package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs +0 -50
  530. package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs.map +0 -1
  531. package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs +0 -80
  532. package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs.map +0 -1
  533. package/fesm2022/taiga-ui-legacy-pipes.mjs +0 -8
  534. package/fesm2022/taiga-ui-legacy-pipes.mjs.map +0 -1
  535. package/fesm2022/taiga-ui-legacy-services.mjs +0 -42
  536. package/fesm2022/taiga-ui-legacy-services.mjs.map +0 -1
  537. package/pipes/format-phone/format-phone.pipe.d.ts +0 -37
  538. package/pipes/format-phone/index.d.ts +0 -1
  539. package/pipes/index.d.ts +0 -3
  540. package/pipes/iso-to-country-code/index.d.ts +0 -1
  541. package/pipes/iso-to-country-code/iso-to-country-code.pipe.d.ts +0 -30
  542. package/pipes/to-country-code/index.d.ts +0 -1
  543. package/pipes/to-country-code/to-country-code.pipe.d.ts +0 -38
  544. package/services/index.d.ts +0 -1
  545. package/services/static-request.service.d.ts +0 -11
@@ -1,730 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule, inject, Injectable, InjectionToken } from '@angular/core';
3
- import { tuiRgbToHex, tuiHexToRgb, tuiRgbToHsv, tuiHsvToRgb, tuiParseGradient, tuiGetGradientData, tuiParseColor } from '@taiga-ui/cdk/utils/color';
4
- import * as i1 from '@angular/common';
5
- import { CommonModule, DOCUMENT } from '@angular/common';
6
- import * as i2 from '@angular/forms';
7
- import { FormsModule } from '@angular/forms';
8
- import * as i3 from '@maskito/angular';
9
- import { MaskitoDirective } from '@maskito/angular';
10
- import * as i4 from '@taiga-ui/legacy/components/primitive-textfield';
11
- import { TuiPrimitiveTextfieldModule } from '@taiga-ui/legacy/components/primitive-textfield';
12
- import * as i5 from '@taiga-ui/legacy/directives/textfield-controller';
13
- import { TuiTextfieldControllerModule } from '@taiga-ui/legacy/directives/textfield-controller';
14
- import * as i6 from '@taiga-ui/legacy/components/input-number';
15
- import { TuiInputNumberModule } from '@taiga-ui/legacy/components/input-number';
16
- import * as i7 from '@taiga-ui/legacy/components/select';
17
- import { TuiSelectModule } from '@taiga-ui/legacy/components/select';
18
- import * as i1$1 from '@taiga-ui/core/directives/dropdown';
19
- import { TuiDropdown } from '@taiga-ui/core/directives/dropdown';
20
- import * as i2$1 from '@taiga-ui/core/components/data-list';
21
- import { TuiDataList } from '@taiga-ui/core/components/data-list';
22
- import * as i2$2 from '@taiga-ui/core/components/button';
23
- import { TuiButton } from '@taiga-ui/core/components/button';
24
- import { __decorate } from 'tslib';
25
- import { DomSanitizer } from '@angular/platform-browser';
26
- import { tuiRound } from '@taiga-ui/cdk/utils/math';
27
- import { tuiPure, tuiProvideOptions, tuiDefaultSort } from '@taiga-ui/cdk/utils/miscellaneous';
28
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
29
- import { tuiTypedFromEvent, tuiPreventDefault } from '@taiga-ui/cdk/observables';
30
- import { tuiInjectElement, tuiGetElementPoint } from '@taiga-ui/cdk/utils/dom';
31
- import { Observable, switchMap, map, takeUntil, startWith } from 'rxjs';
32
- import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
33
- import * as i8 from '@taiga-ui/core/directives/group';
34
- import { TuiGroup } from '@taiga-ui/core/directives/group';
35
- import * as i1$2 from '@taiga-ui/core/directives/hint';
36
- import { TuiHint } from '@taiga-ui/core/directives/hint';
37
- import * as i11 from '@taiga-ui/kit/directives/chevron';
38
- import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
39
- import * as i12 from '@taiga-ui/core/components/icon';
40
- import { TuiIcon } from '@taiga-ui/core/components/icon';
41
- import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
42
- import { TuiSvgComponent } from '@taiga-ui/legacy/components/svg';
43
-
44
- const HEX_MODE_LENGTH = 6;
45
- class TuiColorEditComponent {
46
- constructor() {
47
- this.color = [0, 0, 0, 1];
48
- this.colorChange = new EventEmitter();
49
- this.hexMask = {
50
- mask: new RegExp(`^[A-F\\d]{0,${HEX_MODE_LENGTH}}$`, 'gi'),
51
- };
52
- this.modes = ['HEX', 'RGB'];
53
- this.mode = this.modes[0];
54
- }
55
- get isHex() {
56
- return this.mode === this.modes[0];
57
- }
58
- get hex() {
59
- return tuiRgbToHex(this.color[0], this.color[1], this.color[2]).replace('#', '');
60
- }
61
- get opacity() {
62
- return Math.round(this.color[3] * 100);
63
- }
64
- onHexChange(hex) {
65
- if (hex.length !== HEX_MODE_LENGTH) {
66
- return;
67
- }
68
- const rgb = tuiHexToRgb(hex);
69
- this.updateColor([rgb[0], rgb[1], rgb[2], this.color[3]]);
70
- }
71
- onRgbChange(...rgba) {
72
- this.updateColor(rgba);
73
- }
74
- updateColor(color) {
75
- this.color = color;
76
- this.colorChange.emit(color);
77
- }
78
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
79
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiColorEditComponent, selector: "tui-color-edit", inputs: { color: "color" }, outputs: { colorChange: "colorChange" }, ngImport: i0, template: "<tui-select\n tuiDropdownAlign=\"left\"\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n class=\"t-select\"\n [ngModelOptions]=\"{standalone: true}\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldLabelOutside]=\"true\"\n [(ngModel)]=\"mode\"\n>\n <tui-data-list\n *tuiDataList\n size=\"s\"\n >\n <button\n *ngFor=\"let item of modes\"\n tuiOption\n type=\"button\"\n [value]=\"item\"\n >\n {{ item }}\n </button>\n </tui-data-list>\n</tui-select>\n<tui-primitive-textfield\n *ngIf=\"isHex; else rgb\"\n tuiTextfieldSize=\"m\"\n [maskito]=\"hexMask\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"hex\"\n (valueChange)=\"onHexChange($event)\"\n/>\n<ng-template #rgb>\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[0]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange($event, color[1], color[2], color[3])\"\n />\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[1]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], $event, color[2], color[3])\"\n />\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[2]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], color[1], $event, color[3])\"\n />\n</ng-template>\n<tui-input-number\n tuiTextfieldPostfix=\"%\"\n tuiTextfieldSize=\"m\"\n class=\"t-opacity\"\n [max]=\"100\"\n [min]=\"0\"\n [ngModel]=\"opacity\"\n [ngModelOptions]=\"{standalone: true}\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], color[1], color[2], $event / 100)\"\n/>\n", styles: [":host{display:flex}.t-select{inline-size:5.875rem}.t-opacity{inline-size:4.275rem}.t-rgb,.t-opacity{text-align:center}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "component", type: i4.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "iconCleaner", "readOnly", "invalid", "disabled", "value"], outputs: ["valueChange"] }, { kind: "directive", type: i4.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { kind: "directive", type: i5.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { kind: "directive", type: i5.TuiTextfieldSizeDirective, selector: "[tuiTextfieldSize]", inputs: ["tuiTextfieldSize"] }, { kind: "directive", type: i5.TuiTextfieldPostfixDirective, selector: "[tuiTextfieldPostfix]", inputs: ["tuiTextfieldPostfix"] }, { kind: "component", type: i6.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "step"] }, { kind: "directive", type: i6.TuiInputNumberDirective, selector: "tui-input-number" }, { kind: "component", type: i7.TuiSelectComponent, selector: "tui-select", inputs: ["stringify", "identityMatcher", "valueContent"] }, { kind: "directive", type: i7.TuiSelectDirective, selector: "tui-select" }, { kind: "directive", type: i1$1.TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownAppearance], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: ["tuiDropdownAlign", "tuiDropdownAppearance", "tuiDropdownDirection", "tuiDropdownLimitWidth", "tuiDropdownMinHeight", "tuiDropdownMaxHeight", "tuiDropdownOffset"] }, { kind: "component", type: i2$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i2$1.TuiDataListDirective, selector: "ng-template[tuiDataList]" }, { kind: "component", type: i2$1.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
80
- }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorEditComponent, decorators: [{
82
- type: Component,
83
- args: [{ standalone: false, selector: 'tui-color-edit', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-select\n tuiDropdownAlign=\"left\"\n tuiDropdownLimitWidth=\"min\"\n tuiTextfieldSize=\"m\"\n class=\"t-select\"\n [ngModelOptions]=\"{standalone: true}\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldLabelOutside]=\"true\"\n [(ngModel)]=\"mode\"\n>\n <tui-data-list\n *tuiDataList\n size=\"s\"\n >\n <button\n *ngFor=\"let item of modes\"\n tuiOption\n type=\"button\"\n [value]=\"item\"\n >\n {{ item }}\n </button>\n </tui-data-list>\n</tui-select>\n<tui-primitive-textfield\n *ngIf=\"isHex; else rgb\"\n tuiTextfieldSize=\"m\"\n [maskito]=\"hexMask\"\n [tuiTextfieldLabelOutside]=\"true\"\n [value]=\"hex\"\n (valueChange)=\"onHexChange($event)\"\n/>\n<ng-template #rgb>\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[0]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange($event, color[1], color[2], color[3])\"\n />\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[1]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], $event, color[2], color[3])\"\n />\n <tui-input-number\n tuiTextfieldSize=\"m\"\n class=\"t-rgb\"\n [max]=\"255\"\n [min]=\"0\"\n [ngModel]=\"color[2]\"\n [ngModelOptions]=\"{standalone: true}\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], color[1], $event, color[3])\"\n />\n</ng-template>\n<tui-input-number\n tuiTextfieldPostfix=\"%\"\n tuiTextfieldSize=\"m\"\n class=\"t-opacity\"\n [max]=\"100\"\n [min]=\"0\"\n [ngModel]=\"opacity\"\n [ngModelOptions]=\"{standalone: true}\"\n [style.flex]=\"'0 0 auto'\"\n [tuiTextfieldLabelOutside]=\"true\"\n (ngModelChange)=\"onRgbChange(color[0], color[1], color[2], $event / 100)\"\n/>\n", styles: [":host{display:flex}.t-select{inline-size:5.875rem}.t-opacity{inline-size:4.275rem}.t-rgb,.t-opacity{text-align:center}\n"] }]
84
- }], propDecorators: { color: [{
85
- type: Input
86
- }], colorChange: [{
87
- type: Output
88
- }] } });
89
-
90
- /**
91
- * TODO(v5): delete it
92
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
93
- */
94
- class TuiColorEditModule {
95
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
96
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiColorEditModule, declarations: [TuiColorEditComponent], imports: [CommonModule,
97
- FormsModule,
98
- MaskitoDirective,
99
- TuiPrimitiveTextfieldModule,
100
- TuiTextfieldControllerModule,
101
- TuiInputNumberModule,
102
- TuiSelectModule, i1$1.TuiDropdownOptionsDirective, i1$1.TuiDropdownDriverDirective, i1$1.TuiDropdownDirective, i1$1.TuiDropdownComponent, i1$1.TuiDropdownOpen, i1$1.TuiDropdownOpenLegacy, i1$1.TuiDropdownPortal, i1$1.TuiDropdownManual, i1$1.TuiDropdownHover, i1$1.TuiDropdownContext, i1$1.TuiDropdownPosition, i1$1.TuiDropdownPositionSided, i1$1.TuiDropdownSelection, i2$1.TuiDataListComponent, i2$1.TuiDataListDirective, i2$1.TuiOption, i2$1.TuiOptionNew, i2$1.TuiOptionWithValue, i2$1.TuiOptGroup, TuiButton], exports: [TuiColorEditComponent, i1$1.TuiDropdownOptionsDirective, i1$1.TuiDropdownDriverDirective, i1$1.TuiDropdownDirective, i1$1.TuiDropdownComponent, i1$1.TuiDropdownOpen, i1$1.TuiDropdownOpenLegacy, i1$1.TuiDropdownPortal, i1$1.TuiDropdownManual, i1$1.TuiDropdownHover, i1$1.TuiDropdownContext, i1$1.TuiDropdownPosition, i1$1.TuiDropdownPositionSided, i1$1.TuiDropdownSelection, i2$1.TuiDataListComponent, i2$1.TuiDataListDirective, i2$1.TuiOption, i2$1.TuiOptionNew, i2$1.TuiOptionWithValue, i2$1.TuiOptGroup] }); }
103
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorEditModule, imports: [CommonModule,
104
- FormsModule,
105
- TuiPrimitiveTextfieldModule,
106
- TuiTextfieldControllerModule,
107
- TuiInputNumberModule,
108
- TuiSelectModule, i1$1.TuiDropdownComponent, i2$1.TuiDataListComponent, i2$1.TuiOption] }); }
109
- }
110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorEditModule, decorators: [{
111
- type: NgModule,
112
- args: [{
113
- imports: [
114
- CommonModule,
115
- FormsModule,
116
- MaskitoDirective,
117
- TuiPrimitiveTextfieldModule,
118
- TuiTextfieldControllerModule,
119
- TuiInputNumberModule,
120
- TuiSelectModule,
121
- ...TuiDropdown,
122
- ...TuiDataList,
123
- TuiButton,
124
- ],
125
- declarations: [TuiColorEditComponent],
126
- exports: [TuiColorEditComponent, ...TuiDropdown, ...TuiDataList],
127
- }]
128
- }] });
129
-
130
- /**
131
- * TODO(v5): delete it
132
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
133
- */
134
- class TuiPickerService extends Observable {
135
- constructor() {
136
- super((subscriber) => this.point$.subscribe(subscriber));
137
- this.el = tuiInjectElement();
138
- this.doc = inject(DOCUMENT);
139
- this.point$ = tuiTypedFromEvent(this.el, 'mousedown').pipe(tuiPreventDefault(), switchMap((event) => {
140
- const mouseMove$ = tuiTypedFromEvent(this.doc, 'mousemove').pipe(map(({ clientX, clientY }) => tuiGetElementPoint(clientX, clientY, this.el)), takeUntil(tuiTypedFromEvent(this.doc, 'mouseup')));
141
- return event.target === this.el
142
- ? mouseMove$.pipe(startWith(tuiGetElementPoint(event.clientX, event.clientY, this.el)))
143
- : mouseMove$;
144
- }), takeUntilDestroyed());
145
- }
146
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiPickerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
147
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiPickerService }); }
148
- }
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiPickerService, decorators: [{
150
- type: Injectable
151
- }], ctorParameters: function () { return []; } });
152
-
153
- class TuiFlatPickerComponent {
154
- constructor() {
155
- this.$ = inject(TuiPickerService)
156
- .pipe(takeUntilDestroyed())
157
- .subscribe((point) => {
158
- this.value = point;
159
- this.valueChange.emit([point[0], point[1]]);
160
- });
161
- this.value = [0, 0];
162
- this.valueChange = new EventEmitter();
163
- }
164
- get left() {
165
- return this.value[0] * 100;
166
- }
167
- get top() {
168
- return this.value[1] * 100;
169
- }
170
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFlatPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
171
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiFlatPickerComponent, selector: "tui-flat-picker", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, providers: [TuiPickerService], ngImport: i0, template: "<div\n class=\"t-circle\"\n [style.left.%]=\"left\"\n [style.top.%]=\"top\"\n></div>\n", styles: [":host{position:relative;display:block}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:-.5rem 0 0 -.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
172
- }
173
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFlatPickerComponent, decorators: [{
174
- type: Component,
175
- args: [{ standalone: false, selector: 'tui-flat-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TuiPickerService], template: "<div\n class=\"t-circle\"\n [style.left.%]=\"left\"\n [style.top.%]=\"top\"\n></div>\n", styles: [":host{position:relative;display:block}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:-.5rem 0 0 -.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"] }]
176
- }], propDecorators: { value: [{
177
- type: Input
178
- }], valueChange: [{
179
- type: Output
180
- }] } });
181
-
182
- class TuiLinearPickerComponent {
183
- constructor() {
184
- this.$ = inject(TuiPickerService)
185
- .pipe(takeUntilDestroyed())
186
- .subscribe(([x]) => {
187
- this.value = x;
188
- this.valueChange.emit(x);
189
- });
190
- this.value = 0;
191
- this.valueChange = new EventEmitter();
192
- }
193
- get left() {
194
- return this.value * 100;
195
- }
196
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
197
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiLinearPickerComponent, selector: "tui-linear-picker", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, providers: [TuiPickerService], ngImport: i0, template: "<div\n class=\"t-circle\"\n [style.left.%]=\"left\"\n></div>\n", styles: [":host{position:relative;display:block;block-size:1rem;box-sizing:border-box}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
198
- }
199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearPickerComponent, decorators: [{
200
- type: Component,
201
- args: [{ standalone: false, selector: 'tui-linear-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TuiPickerService], template: "<div\n class=\"t-circle\"\n [style.left.%]=\"left\"\n></div>\n", styles: [":host{position:relative;display:block;block-size:1rem;box-sizing:border-box}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"] }]
202
- }], propDecorators: { value: [{
203
- type: Input
204
- }], valueChange: [{
205
- type: Output
206
- }] } });
207
-
208
- class TuiColorPickerComponent {
209
- constructor() {
210
- this.sanitizer = inject(DomSanitizer);
211
- this.point = [0, 1];
212
- this.hue = 0;
213
- this.opacity = 1;
214
- this.colorChange = new EventEmitter();
215
- }
216
- set color(color) {
217
- if (this.currentColor.every((item, index) => item === color[index]) &&
218
- color[3] === this.opacity) {
219
- return;
220
- }
221
- const [h, s, v] = tuiRgbToHsv(color[0], color[1], color[2]);
222
- this.opacity = color[3];
223
- this.hue = h / 360;
224
- this.point = [s, 1 - v / 255];
225
- }
226
- get currentColor() {
227
- return this.getCurrentColor(this.hue, this.point);
228
- }
229
- get base() {
230
- return `rgb(${tuiHsvToRgb(this.hue * 360, 1, 255)})`;
231
- }
232
- get gradient() {
233
- return this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to right, rgba(${this.currentColor.join(',')}, 0), rgb(${this.currentColor.join(',')}))`);
234
- }
235
- onPointChange(point) {
236
- this.point = point;
237
- this.updateColor();
238
- }
239
- onHueChange(hue) {
240
- this.hue = hue;
241
- this.updateColor();
242
- }
243
- onOpacityChange(opacity) {
244
- this.opacity = tuiRound(opacity, 2);
245
- this.updateColor();
246
- }
247
- getCurrentColor(hue, point) {
248
- return tuiHsvToRgb(hue * 360, point[0], (1 - point[1]) * 255);
249
- }
250
- updateColor() {
251
- this.colorChange.emit([...this.currentColor, this.opacity]);
252
- }
253
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
254
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiColorPickerComponent, selector: "tui-color-picker", inputs: { color: "color" }, outputs: { colorChange: "colorChange" }, ngImport: i0, template: "<tui-flat-picker\n class=\"t-flat\"\n [style.backgroundColor]=\"base\"\n [value]=\"point\"\n (valueChange)=\"onPointChange($event)\"\n/>\n<div class=\"t-wrapper t-wrapper_hue\">\n <tui-linear-picker\n class=\"t-hue\"\n [value]=\"hue\"\n (valueChange)=\"onHueChange($event)\"\n />\n</div>\n<div\n class=\"t-wrapper t-wrapper_opacity\"\n [style.background]=\"gradient\"\n>\n <tui-linear-picker\n class=\"t-opacity\"\n [value]=\"opacity\"\n (valueChange)=\"onOpacityChange($event)\"\n />\n</div>\n", styles: [":host{position:relative;display:block;isolation:isolate}.t-flat{block-size:14rem;background:linear-gradient(#0000,#000),linear-gradient(to right,#fff,#fff0);margin-block-end:.25rem;overflow:hidden}.t-wrapper{position:relative;margin:1rem 1.25rem;border-radius:.5rem}.t-wrapper:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper_hue{background:red}.t-wrapper_opacity:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hue{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red);border-radius:inherit;margin:0 .5rem}.t-opacity{border-radius:inherit;margin:0 .5rem}\n"], dependencies: [{ kind: "component", type: TuiFlatPickerComponent, selector: "tui-flat-picker", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: TuiLinearPickerComponent, selector: "tui-linear-picker", inputs: ["value"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
255
- }
256
- __decorate([
257
- tuiPure
258
- ], TuiColorPickerComponent.prototype, "getCurrentColor", null);
259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorPickerComponent, decorators: [{
260
- type: Component,
261
- args: [{ standalone: false, selector: 'tui-color-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-flat-picker\n class=\"t-flat\"\n [style.backgroundColor]=\"base\"\n [value]=\"point\"\n (valueChange)=\"onPointChange($event)\"\n/>\n<div class=\"t-wrapper t-wrapper_hue\">\n <tui-linear-picker\n class=\"t-hue\"\n [value]=\"hue\"\n (valueChange)=\"onHueChange($event)\"\n />\n</div>\n<div\n class=\"t-wrapper t-wrapper_opacity\"\n [style.background]=\"gradient\"\n>\n <tui-linear-picker\n class=\"t-opacity\"\n [value]=\"opacity\"\n (valueChange)=\"onOpacityChange($event)\"\n />\n</div>\n", styles: [":host{position:relative;display:block;isolation:isolate}.t-flat{block-size:14rem;background:linear-gradient(#0000,#000),linear-gradient(to right,#fff,#fff0);margin-block-end:.25rem;overflow:hidden}.t-wrapper{position:relative;margin:1rem 1.25rem;border-radius:.5rem}.t-wrapper:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper_hue{background:red}.t-wrapper_opacity:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hue{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red);border-radius:inherit;margin:0 .5rem}.t-opacity{border-radius:inherit;margin:0 .5rem}\n"] }]
262
- }], propDecorators: { colorChange: [{
263
- type: Output
264
- }], color: [{
265
- type: Input
266
- }], getCurrentColor: [] } });
267
-
268
- /**
269
- * TODO(v5): delete it
270
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
271
- */
272
- class TuiFlatPickerModule {
273
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFlatPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
274
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiFlatPickerModule, declarations: [TuiFlatPickerComponent], imports: [CommonModule], exports: [TuiFlatPickerComponent] }); }
275
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFlatPickerModule, imports: [CommonModule] }); }
276
- }
277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFlatPickerModule, decorators: [{
278
- type: NgModule,
279
- args: [{
280
- imports: [CommonModule],
281
- declarations: [TuiFlatPickerComponent],
282
- exports: [TuiFlatPickerComponent],
283
- }]
284
- }] });
285
-
286
- /**
287
- * TODO(v5): delete it
288
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
289
- */
290
- class TuiLinearPickerModule {
291
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
292
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearPickerModule, declarations: [TuiLinearPickerComponent], imports: [CommonModule], exports: [TuiLinearPickerComponent] }); }
293
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearPickerModule, imports: [CommonModule] }); }
294
- }
295
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearPickerModule, decorators: [{
296
- type: NgModule,
297
- args: [{
298
- imports: [CommonModule],
299
- declarations: [TuiLinearPickerComponent],
300
- exports: [TuiLinearPickerComponent],
301
- }]
302
- }] });
303
-
304
- /**
305
- * TODO(v5): delete it
306
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
307
- */
308
- class TuiColorPickerModule {
309
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
310
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiColorPickerModule, declarations: [TuiColorPickerComponent], imports: [CommonModule, TuiFlatPickerModule, TuiLinearPickerModule], exports: [TuiColorPickerComponent] }); }
311
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorPickerModule, imports: [CommonModule, TuiFlatPickerModule, TuiLinearPickerModule] }); }
312
- }
313
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorPickerModule, decorators: [{
314
- type: NgModule,
315
- args: [{
316
- imports: [CommonModule, TuiFlatPickerModule, TuiLinearPickerModule],
317
- declarations: [TuiColorPickerComponent],
318
- exports: [TuiColorPickerComponent],
319
- }]
320
- }] });
321
-
322
- const TUI_COLOR_SELECTOR_MODE_NAMES = new InjectionToken(ngDevMode ? 'TUI_COLOR_SELECTOR_MODE_NAMES' : '', {
323
- factory: () => ['Solid color', 'Gradient'],
324
- });
325
- const TUI_DEFAULT_INPUT_COLORS = new Map([
326
- ['color-black-100', '#909090'],
327
- ['color-black-200', '#666666'],
328
- ['color-black-300', '#333333'],
329
- ['color-blue-100', '#1771e6'],
330
- ['color-blue-200', '#1464cc'],
331
- ['color-blue-300', '#0953b3'],
332
- ['color-gray-100', '#f5f5f6'],
333
- ['color-gray-200', '#e7e8ea'],
334
- ['color-gray-300', '#cbcfd3'],
335
- ['color-gray-400', '#959ba4'],
336
- ['color-gray-500', '#79818c'],
337
- ['color-gray-600', '#616871'],
338
- ['color-green-100', '#39b54a'],
339
- ['color-green-200', '#2ca53a'],
340
- ['color-green-300', '#168a21'],
341
- ['color-light-blue-100', '#ecf1f7'],
342
- ['color-light-blue-200', '#e4ebf3'],
343
- ['color-light-blue-300', '#dde4ed'],
344
- ['color-red-100', '#e01f19'],
345
- ['color-red-200', '#d3120e'],
346
- ['color-red-300', '#c40b08'],
347
- ['color-yellow-100', '#FFDD2C'],
348
- ['color-yellow-200', '#FCC521'],
349
- ['color-yellow-300', '#FAB618'],
350
- ['transparent', 'transparent'],
351
- ]);
352
- const TuiColorSelectorMode = {
353
- SolidColor: 0,
354
- Gradient: 1,
355
- };
356
- const TUI_COLOR_SELECTOR_DEFAULT_OPTIONS = {
357
- selectorMode: true,
358
- mode: TuiColorSelectorMode.SolidColor,
359
- color: [0, 0, 0, 1],
360
- colors: new Map(),
361
- gradient: {
362
- icons: {
363
- 'to top right': '@tui.move-up-right',
364
- 'to right': '@tui.move-right',
365
- 'to bottom right': '@tui.move-down-right',
366
- 'to bottom': '@tui.move-down',
367
- 'to bottom left': '@tui.move-down-left',
368
- 'to left': '@tui.move-left',
369
- 'to top left': '@tui.move-up-left',
370
- 'to top': '@tui.move-up',
371
- },
372
- steps: [
373
- [0, [0, 0, 0, 1]],
374
- [1, [255, 255, 255, 1]],
375
- ],
376
- stop: 0,
377
- direction: 'to bottom',
378
- emptyStop: [0, 0, 0, 0],
379
- buttons: [
380
- 'to top right',
381
- 'to right',
382
- 'to bottom right',
383
- 'to bottom',
384
- 'to bottom left',
385
- 'to left',
386
- 'to top left',
387
- 'to top',
388
- ],
389
- },
390
- };
391
- const TUI_COLOR_SELECTOR_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_COLOR_SELECTOR_OPTIONS' : '', {
392
- factory: () => TUI_COLOR_SELECTOR_DEFAULT_OPTIONS,
393
- });
394
- function tuiColorSelectorOptionsProvider(options) {
395
- return tuiProvideOptions(TUI_COLOR_SELECTOR_OPTIONS, options, TUI_COLOR_SELECTOR_DEFAULT_OPTIONS);
396
- }
397
-
398
- class TuiLinearMultiPickerComponent {
399
- constructor() {
400
- this.$ = inject(TuiPickerService)
401
- .pipe(takeUntilDestroyed())
402
- .subscribe(([x]) => this.onPicker(x));
403
- this.value = [0, 1];
404
- this.valueChange = new EventEmitter();
405
- this.indexChange = new EventEmitter();
406
- this.index = NaN;
407
- }
408
- onMouseUp() {
409
- this.index = NaN;
410
- }
411
- onMouseDown(index) {
412
- this.updateIndex(index);
413
- }
414
- onClick(index) {
415
- if (this.value.length > 2) {
416
- this.updateValue(this.value.filter((_, i) => i !== index));
417
- }
418
- }
419
- onPicker(x) {
420
- if (Number.isNaN(this.index)) {
421
- this.updateIndex(this.value.length);
422
- this.value = [...this.value, 0];
423
- }
424
- if (this.value.some((item, index) => item === x && index !== this.index)) {
425
- return;
426
- }
427
- this.updateValue(this.value.map((item, index) => (index === this.index ? x : item)));
428
- }
429
- updateIndex(index) {
430
- this.index = index;
431
- this.indexChange.emit(index);
432
- }
433
- updateValue(value) {
434
- this.value = value;
435
- this.valueChange.emit(value);
436
- }
437
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearMultiPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
438
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiLinearMultiPickerComponent, selector: "tui-linear-multi-picker", inputs: { value: "value" }, outputs: { valueChange: "valueChange", indexChange: "indexChange" }, host: { listeners: { "document:mouseup": "onMouseUp()" } }, providers: [TuiPickerService], ngImport: i0, template: "<div\n *ngFor=\"let item of value; let index = index\"\n class=\"t-circle\"\n [style.left.%]=\"item * 100\"\n (dblclick)=\"onClick(index)\"\n (mousedown)=\"onMouseDown(index)\"\n></div>\n", styles: [":host{position:relative;display:block;block-size:1rem;box-sizing:border-box}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
439
- }
440
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearMultiPickerComponent, decorators: [{
441
- type: Component,
442
- args: [{ standalone: false, selector: 'tui-linear-multi-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TuiPickerService], host: {
443
- '(document:mouseup)': 'onMouseUp()',
444
- }, template: "<div\n *ngFor=\"let item of value; let index = index\"\n class=\"t-circle\"\n [style.left.%]=\"item * 100\"\n (dblclick)=\"onClick(index)\"\n (mousedown)=\"onMouseDown(index)\"\n></div>\n", styles: [":host{position:relative;display:block;block-size:1rem;box-sizing:border-box}.t-circle{position:absolute;inline-size:1rem;block-size:1rem;border-radius:100%;outline:1px solid var(--tui-background-base);margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\n"] }]
445
- }], propDecorators: { value: [{
446
- type: Input
447
- }], valueChange: [{
448
- type: Output
449
- }], indexChange: [{
450
- type: Output
451
- }] } });
452
-
453
- class TuiPaletteComponent {
454
- constructor() {
455
- this.colors = new Map();
456
- this.selectedColor = new EventEmitter();
457
- this.originalOrder = (_a, _b) => 0;
458
- }
459
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiPaletteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
460
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiPaletteComponent, selector: "tui-palette", inputs: { colors: "colors" }, outputs: { selectedColor: "selectedColor" }, ngImport: i0, template: "<button\n *ngFor=\"let color of colors | keyvalue: originalOrder\"\n type=\"button\"\n class=\"t-button\"\n [id]=\"color.key\"\n [style.background]=\"color.value\"\n [tuiHint]=\"color.key\"\n [tuiHintDescribe]=\"color.key\"\n (click)=\"selectedColor.emit(color.value)\"\n></button>\n", styles: [":host{display:flex;flex-wrap:wrap;padding:.875rem}.t-button{-webkit-appearance:none;appearance:none;padding:0;background:none;font-size:inherit;line-height:inherit;inline-size:1.5625rem;block-size:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i1$2.TuiHintDescribe, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
461
- }
462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiPaletteComponent, decorators: [{
463
- type: Component,
464
- args: [{ standalone: false, selector: 'tui-palette', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n *ngFor=\"let color of colors | keyvalue: originalOrder\"\n type=\"button\"\n class=\"t-button\"\n [id]=\"color.key\"\n [style.background]=\"color.value\"\n [tuiHint]=\"color.key\"\n [tuiHintDescribe]=\"color.key\"\n (click)=\"selectedColor.emit(color.value)\"\n></button>\n", styles: [":host{display:flex;flex-wrap:wrap;padding:.875rem}.t-button{-webkit-appearance:none;appearance:none;padding:0;background:none;font-size:inherit;line-height:inherit;inline-size:1.5625rem;block-size:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}\n"] }]
465
- }], propDecorators: { colors: [{
466
- type: Input
467
- }], selectedColor: [{
468
- type: Output
469
- }] } });
470
-
471
- class TuiColorSelectorComponent {
472
- constructor() {
473
- this.selectorOptions = inject(TUI_COLOR_SELECTOR_OPTIONS);
474
- this.stops = new Map(this.selectorOptions.gradient.steps);
475
- this.currentStop = this.selectorOptions.gradient.stop;
476
- this.direction = this.selectorOptions.gradient.direction;
477
- this.sanitizer = inject(DomSanitizer);
478
- this.icons = inject(TUI_COMMON_ICONS);
479
- this.open = false;
480
- this.colors = this.selectorOptions.colors;
481
- this.colorChange = new EventEmitter();
482
- this.color = this.selectorOptions.color;
483
- this.modes = inject(TUI_COLOR_SELECTOR_MODE_NAMES);
484
- this.currentMode = this.modes[this.selectorOptions.mode];
485
- this.buttons = this.selectorOptions.gradient.buttons;
486
- }
487
- set colorSetter(color) {
488
- if (color.startsWith('linear-gradient')) {
489
- this.parseGradient(color);
490
- }
491
- else {
492
- this.parseColor(color);
493
- }
494
- }
495
- get selectorMode() {
496
- return this.selectorOptions.selectorMode;
497
- }
498
- get palette() {
499
- return this.filterPalette(this.colors, this.isGradient);
500
- }
501
- get stopsKeys() {
502
- return this.getStopsKeys(this.stops);
503
- }
504
- get currentColor() {
505
- return this.isGradient ? this.getStop(this.currentStop) : this.color;
506
- }
507
- get gradient() {
508
- return this.sanitizer.bypassSecurityTrustStyle(this.getGradient('to right'));
509
- }
510
- get isGradient() {
511
- return this.currentMode === this.modes[TuiColorSelectorMode.Gradient];
512
- }
513
- getIcon(direction) {
514
- return this.selectorOptions.gradient.icons[direction];
515
- }
516
- isModeActive(mode) {
517
- return this.currentMode === mode;
518
- }
519
- isDirectionActive(direction) {
520
- return this.direction === direction;
521
- }
522
- onPalettePick(color) {
523
- this.updateColor(color);
524
- }
525
- onDirectionChange(direction) {
526
- this.direction = direction;
527
- this.updateColor(this.getGradient(direction));
528
- }
529
- onModeSelect(mode) {
530
- this.currentMode = mode;
531
- this.open = false;
532
- this.updateColor(mode === this.modes[TuiColorSelectorMode.SolidColor]
533
- ? `rgba(${this.color.join(', ')})`
534
- : this.getGradient(this.direction));
535
- }
536
- onIndexChange(index) {
537
- this.currentStop = this.stopsKeys[index] ?? 0;
538
- }
539
- onColorChange(color) {
540
- if (!this.isGradient) {
541
- this.updateColor(`rgba(${color.join(', ')})`);
542
- return;
543
- }
544
- this.stops.set(this.currentStop, color);
545
- this.updateColor(this.getGradient(this.direction));
546
- }
547
- onStopsChange(stopsKeys) {
548
- const removed = this.stopsKeys.find((item) => !stopsKeys.includes(item));
549
- const added = stopsKeys.find((item) => !this.stopsKeys.includes(item));
550
- if (removed === undefined && added !== undefined) {
551
- this.addStop(added);
552
- }
553
- if (removed !== undefined && added === undefined) {
554
- this.removeStop(removed);
555
- }
556
- if (removed !== undefined && added !== undefined) {
557
- this.replaceStop(removed, added);
558
- }
559
- this.updateColor(this.getGradient(this.direction));
560
- }
561
- getStopsKeys(stops) {
562
- return Array.from(stops.keys());
563
- }
564
- filterPalette(colors, isGradient) {
565
- const map = new Map(colors);
566
- map.forEach((value, key) => {
567
- if ((value.startsWith('linear-gradient') && !isGradient) ||
568
- (!value.startsWith('linear-gradient') && isGradient)) {
569
- map.delete(key);
570
- }
571
- });
572
- return map;
573
- }
574
- updateColor(color) {
575
- this.colorChange.emit(color);
576
- }
577
- getGradient(direction) {
578
- return `linear-gradient(${direction}, ${[...this.stopsKeys]
579
- .sort(tuiDefaultSort)
580
- .map((key) => `rgba(${this.getStop(key).join(', ')}) ${key * 100}%`)
581
- .join(', ')})`;
582
- }
583
- getStop(stop) {
584
- return this.stops.get(stop) || this.selectorOptions.gradient.emptyStop;
585
- }
586
- addStop(stop) {
587
- const closest = this.stopsKeys.reduce((prev, curr) => (Math.abs(curr - stop) < Math.abs(prev - stop) ? curr : prev), this.stopsKeys[0] ?? 0);
588
- this.stops.set(stop, this.getStop(closest));
589
- this.stops = new Map(this.stops);
590
- this.currentStop = stop;
591
- }
592
- removeStop(stop) {
593
- this.stops.delete(stop);
594
- this.stops = new Map(this.stops);
595
- this.currentStop = this.stopsKeys[0] ?? 0;
596
- }
597
- replaceStop(removed, added) {
598
- const value = this.getStop(removed);
599
- this.currentStop = added;
600
- this.stops = new Map(this.stopsKeys.map((key) => key === removed ? [added, value] : [key, this.getStop(key)]));
601
- }
602
- parseGradient(color) {
603
- if (color === this.getGradient(this.direction)) {
604
- return;
605
- }
606
- const gradient = tuiParseGradient(tuiGetGradientData(color));
607
- this.direction = gradient.side;
608
- this.currentStop = this.selectorOptions.gradient.stop;
609
- this.stops = new Map(gradient.stops.length
610
- ? gradient.stops.map(({ color, position }) => [
611
- parseFloat(position) / 100,
612
- tuiParseColor(color),
613
- ])
614
- : this.selectorOptions.gradient.steps);
615
- }
616
- parseColor(color) {
617
- this.currentStop = this.selectorOptions.gradient.stop;
618
- this.color = tuiParseColor(color);
619
- }
620
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
621
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiColorSelectorComponent, selector: "tui-color-selector", inputs: { colors: "colors", colorSetter: ["color", "colorSetter"] }, outputs: { colorChange: "colorChange" }, ngImport: i0, template: "<ng-container *ngIf=\"selectorMode\">\n <div\n class=\"t-select\"\n [tuiDropdown]=\"menu\"\n [(tuiDropdownOpen)]=\"open\"\n >\n <button\n appearance=\"\"\n size=\"s\"\n tuiButton\n tuiChevron\n type=\"button\"\n >\n {{ currentMode }}\n </button>\n\n <ng-template #menu>\n <tui-data-list\n role=\"menu\"\n size=\"s\"\n class=\"t-menu\"\n >\n <button\n *ngFor=\"let mode of modes\"\n role=\"menuitemradio\"\n tuiOption\n type=\"button\"\n [attr.aria-checked]=\"isModeActive(mode)\"\n (click)=\"onModeSelect(mode)\"\n (keydown.enter.prevent)=\"onModeSelect(mode)\"\n (keydown.space.prevent)=\"onModeSelect(mode)\"\n >\n {{ mode }}\n <tui-icon\n *ngIf=\"isModeActive(mode)\"\n class=\"t-checkmark\"\n [icon]=\"icons.check\"\n />\n </button>\n </tui-data-list>\n </ng-template>\n </div>\n <hr class=\"t-hr\" />\n</ng-container>\n\n<ng-container *ngIf=\"isGradient\">\n <div\n class=\"t-wrapper\"\n [style.background]=\"gradient\"\n >\n <tui-linear-multi-picker\n class=\"t-gradient\"\n [value]=\"stopsKeys\"\n (indexChange)=\"onIndexChange($event)\"\n (valueChange)=\"onStopsChange($event)\"\n />\n </div>\n <div class=\"t-buttons\">\n <!-- TODO: Change to `tuiHintDescribe` when figure tuiDriver order issue -->\n <button\n *ngFor=\"let button of buttons\"\n appearance=\"\"\n size=\"xs\"\n tuiHintDescribe\n tuiIconButton\n type=\"button\"\n class=\"t-direction\"\n [class.t-direction_active]=\"isDirectionActive(button)\"\n [iconStart]=\"getIcon(button)\"\n [tuiHint]=\"button\"\n (click)=\"onDirectionChange(button)\"\n ></button>\n </div>\n</ng-container>\n<tui-color-picker\n [color]=\"currentColor\"\n (colorChange)=\"onColorChange($event)\"\n/>\n<tui-color-edit\n *ngIf=\"!isGradient\"\n orientation=\"horizontal\"\n tuiGroup\n class=\"t-edit\"\n [color]=\"color\"\n (colorChange)=\"onColorChange($event)\"\n/>\n<tui-palette\n *ngIf=\"palette.size\"\n class=\"t-palette\"\n [colors]=\"palette\"\n (selectedColor)=\"onPalettePick($event)\"\n/>\n", styles: [":host{position:relative;display:block;isolation:isolate;inline-size:22.6rem}:host :host-context(*:disabled){pointer-events:none}.t-wrapper{position:relative;margin:1.25rem;border-radius:.5rem}.t-wrapper:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hr{block-size:1px;margin:0 0 0 -1px;border:none;background:var(--tui-base-03)}.t-gradient{margin:0 .5rem;border-radius:inherit}.t-select{margin:.75rem .5rem 0}.t-arrow{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-arrow_rotated{transform:rotate(180deg)}.t-menu{inline-size:11.25rem}.t-checkmark{margin-inline-start:auto;inline-size:1rem;block-size:1rem}.t-buttons{display:flex;padding:0 .75rem 1.25rem;justify-content:space-between}.t-direction{color:var(--tui-text-02);margin:0 .375rem}.t-direction:hover,.t-direction_active{color:var(--tui-text-01);background:var(--tui-secondary-hover)}.t-edit{margin:1.25rem}.t-palette{box-sizing:border-box;box-shadow:inset 0 1px var(--tui-base-03)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiColorPickerComponent, selector: "tui-color-picker", inputs: ["color"], outputs: ["colorChange"] }, { kind: "component", type: TuiLinearMultiPickerComponent, selector: "tui-linear-multi-picker", inputs: ["value"], outputs: ["valueChange", "indexChange"] }, { kind: "component", type: TuiColorEditComponent, selector: "tui-color-edit", inputs: ["color"], outputs: ["colorChange"] }, { kind: "directive", type: i1$1.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { kind: "directive", type: i1$1.TuiDropdownOpen, selector: "[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: ["tuiDropdownEnabled", "tuiDropdownOpen"], outputs: ["tuiDropdownOpenChange"] }, { kind: "component", type: i2$1.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "component", type: i2$1.TuiOption, selector: "button[tuiOption]:not([new]), a[tuiOption]:not([new]), label[tuiOption]:not([new])", inputs: ["disabled", "value"] }, { kind: "directive", type: i8.TuiGroup, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "collapsed", "rounded", "size"] }, { kind: "component", type: TuiPaletteComponent, selector: "tui-palette", inputs: ["colors"], outputs: ["selectedColor"] }, { kind: "directive", type: i1$2.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i1$2.TuiHintDescribe, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }, { kind: "directive", type: i11.TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i12.TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
622
- }
623
- __decorate([
624
- tuiPure
625
- ], TuiColorSelectorComponent.prototype, "getStopsKeys", null);
626
- __decorate([
627
- tuiPure
628
- ], TuiColorSelectorComponent.prototype, "filterPalette", null);
629
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorSelectorComponent, decorators: [{
630
- type: Component,
631
- args: [{ standalone: false, selector: 'tui-color-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"selectorMode\">\n <div\n class=\"t-select\"\n [tuiDropdown]=\"menu\"\n [(tuiDropdownOpen)]=\"open\"\n >\n <button\n appearance=\"\"\n size=\"s\"\n tuiButton\n tuiChevron\n type=\"button\"\n >\n {{ currentMode }}\n </button>\n\n <ng-template #menu>\n <tui-data-list\n role=\"menu\"\n size=\"s\"\n class=\"t-menu\"\n >\n <button\n *ngFor=\"let mode of modes\"\n role=\"menuitemradio\"\n tuiOption\n type=\"button\"\n [attr.aria-checked]=\"isModeActive(mode)\"\n (click)=\"onModeSelect(mode)\"\n (keydown.enter.prevent)=\"onModeSelect(mode)\"\n (keydown.space.prevent)=\"onModeSelect(mode)\"\n >\n {{ mode }}\n <tui-icon\n *ngIf=\"isModeActive(mode)\"\n class=\"t-checkmark\"\n [icon]=\"icons.check\"\n />\n </button>\n </tui-data-list>\n </ng-template>\n </div>\n <hr class=\"t-hr\" />\n</ng-container>\n\n<ng-container *ngIf=\"isGradient\">\n <div\n class=\"t-wrapper\"\n [style.background]=\"gradient\"\n >\n <tui-linear-multi-picker\n class=\"t-gradient\"\n [value]=\"stopsKeys\"\n (indexChange)=\"onIndexChange($event)\"\n (valueChange)=\"onStopsChange($event)\"\n />\n </div>\n <div class=\"t-buttons\">\n <!-- TODO: Change to `tuiHintDescribe` when figure tuiDriver order issue -->\n <button\n *ngFor=\"let button of buttons\"\n appearance=\"\"\n size=\"xs\"\n tuiHintDescribe\n tuiIconButton\n type=\"button\"\n class=\"t-direction\"\n [class.t-direction_active]=\"isDirectionActive(button)\"\n [iconStart]=\"getIcon(button)\"\n [tuiHint]=\"button\"\n (click)=\"onDirectionChange(button)\"\n ></button>\n </div>\n</ng-container>\n<tui-color-picker\n [color]=\"currentColor\"\n (colorChange)=\"onColorChange($event)\"\n/>\n<tui-color-edit\n *ngIf=\"!isGradient\"\n orientation=\"horizontal\"\n tuiGroup\n class=\"t-edit\"\n [color]=\"color\"\n (colorChange)=\"onColorChange($event)\"\n/>\n<tui-palette\n *ngIf=\"palette.size\"\n class=\"t-palette\"\n [colors]=\"palette\"\n (selectedColor)=\"onPalettePick($event)\"\n/>\n", styles: [":host{position:relative;display:block;isolation:isolate;inline-size:22.6rem}:host :host-context(*:disabled){pointer-events:none}.t-wrapper{position:relative;margin:1.25rem;border-radius:.5rem}.t-wrapper:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hr{block-size:1px;margin:0 0 0 -1px;border:none;background:var(--tui-base-03)}.t-gradient{margin:0 .5rem;border-radius:inherit}.t-select{margin:.75rem .5rem 0}.t-arrow{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-arrow_rotated{transform:rotate(180deg)}.t-menu{inline-size:11.25rem}.t-checkmark{margin-inline-start:auto;inline-size:1rem;block-size:1rem}.t-buttons{display:flex;padding:0 .75rem 1.25rem;justify-content:space-between}.t-direction{color:var(--tui-text-02);margin:0 .375rem}.t-direction:hover,.t-direction_active{color:var(--tui-text-01);background:var(--tui-secondary-hover)}.t-edit{margin:1.25rem}.t-palette{box-sizing:border-box;box-shadow:inset 0 1px var(--tui-base-03)}\n"] }]
632
- }], propDecorators: { colors: [{
633
- type: Input
634
- }], colorChange: [{
635
- type: Output
636
- }], colorSetter: [{
637
- type: Input,
638
- args: ['color']
639
- }], getStopsKeys: [], filterPalette: [] } });
640
-
641
- /**
642
- * TODO(v5): delete it
643
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
644
- */
645
- class TuiLinearMultiPickerModule {
646
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearMultiPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
647
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearMultiPickerModule, declarations: [TuiLinearMultiPickerComponent], imports: [CommonModule], exports: [TuiLinearMultiPickerComponent] }); }
648
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearMultiPickerModule, imports: [CommonModule] }); }
649
- }
650
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLinearMultiPickerModule, decorators: [{
651
- type: NgModule,
652
- args: [{
653
- imports: [CommonModule],
654
- declarations: [TuiLinearMultiPickerComponent],
655
- exports: [TuiLinearMultiPickerComponent],
656
- }]
657
- }] });
658
-
659
- /**
660
- * TODO(v5): delete it
661
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
662
- */
663
- class TuiPaletteModule {
664
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiPaletteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
665
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiPaletteModule, declarations: [TuiPaletteComponent], imports: [CommonModule, i1$2.TuiHintComponent, i1$2.TuiHintDirective, i1$2.TuiHintOptionsDirective, i1$2.TuiHintUnstyled, i1$2.TuiHintDriver, i1$2.TuiHintPosition, i1$2.TuiHintHover, i1$2.TuiHintOverflow, i1$2.TuiHintDescribe, i1$2.TuiHintHost, i1$2.TuiHintManual, i1$2.TuiHintPointer], exports: [TuiPaletteComponent, i1$2.TuiHintComponent, i1$2.TuiHintDirective, i1$2.TuiHintOptionsDirective, i1$2.TuiHintUnstyled, i1$2.TuiHintDriver, i1$2.TuiHintPosition, i1$2.TuiHintHover, i1$2.TuiHintOverflow, i1$2.TuiHintDescribe, i1$2.TuiHintHost, i1$2.TuiHintManual, i1$2.TuiHintPointer] }); }
666
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiPaletteModule, imports: [CommonModule, i1$2.TuiHintComponent] }); }
667
- }
668
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiPaletteModule, decorators: [{
669
- type: NgModule,
670
- args: [{
671
- imports: [CommonModule, ...TuiHint],
672
- declarations: [TuiPaletteComponent],
673
- exports: [TuiPaletteComponent, ...TuiHint],
674
- }]
675
- }] });
676
-
677
- /**
678
- * TODO(v5): delete it
679
- * @deprecated use new version of {@link https://taiga-ui.dev/components/input-color TuiInputColor} (from @taiga-ui/kit) instead
680
- */
681
- class TuiColorSelectorModule {
682
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
683
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TuiColorSelectorModule, declarations: [TuiColorSelectorComponent], imports: [CommonModule,
684
- TuiButton,
685
- TuiSvgComponent,
686
- TuiColorPickerModule,
687
- TuiLinearMultiPickerModule,
688
- TuiActiveZone,
689
- TuiColorEditModule,
690
- TuiGroup,
691
- TuiPaletteModule,
692
- TuiChevron,
693
- TuiIcon, i1$2.TuiHintComponent, i1$2.TuiHintDirective, i1$2.TuiHintOptionsDirective, i1$2.TuiHintUnstyled, i1$2.TuiHintDriver, i1$2.TuiHintPosition, i1$2.TuiHintHover, i1$2.TuiHintOverflow, i1$2.TuiHintDescribe, i1$2.TuiHintHost, i1$2.TuiHintManual, i1$2.TuiHintPointer, i2$1.TuiDataListComponent, i2$1.TuiDataListDirective, i2$1.TuiOption, i2$1.TuiOptionNew, i2$1.TuiOptionWithValue, i2$1.TuiOptGroup], exports: [TuiColorSelectorComponent, i1$2.TuiHintComponent, i1$2.TuiHintDirective, i1$2.TuiHintOptionsDirective, i1$2.TuiHintUnstyled, i1$2.TuiHintDriver, i1$2.TuiHintPosition, i1$2.TuiHintHover, i1$2.TuiHintOverflow, i1$2.TuiHintDescribe, i1$2.TuiHintHost, i1$2.TuiHintManual, i1$2.TuiHintPointer, i2$1.TuiDataListComponent, i2$1.TuiDataListDirective, i2$1.TuiOption, i2$1.TuiOptionNew, i2$1.TuiOptionWithValue, i2$1.TuiOptGroup] }); }
694
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorSelectorModule, imports: [CommonModule,
695
- TuiSvgComponent,
696
- TuiColorPickerModule,
697
- TuiLinearMultiPickerModule,
698
- TuiColorEditModule,
699
- TuiPaletteModule,
700
- TuiIcon, i1$2.TuiHintComponent, i2$1.TuiDataListComponent, i2$1.TuiOption] }); }
701
- }
702
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiColorSelectorModule, decorators: [{
703
- type: NgModule,
704
- args: [{
705
- imports: [
706
- CommonModule,
707
- TuiButton,
708
- TuiSvgComponent,
709
- TuiColorPickerModule,
710
- TuiLinearMultiPickerModule,
711
- TuiActiveZone,
712
- TuiColorEditModule,
713
- TuiGroup,
714
- TuiPaletteModule,
715
- TuiChevron,
716
- TuiIcon,
717
- ...TuiHint,
718
- ...TuiDataList,
719
- ],
720
- declarations: [TuiColorSelectorComponent],
721
- exports: [TuiColorSelectorComponent, ...TuiHint, ...TuiDataList],
722
- }]
723
- }] });
724
-
725
- /**
726
- * Generated bundle index. Do not edit.
727
- */
728
-
729
- export { TUI_COLOR_SELECTOR_DEFAULT_OPTIONS, TUI_COLOR_SELECTOR_MODE_NAMES, TUI_COLOR_SELECTOR_OPTIONS, TUI_DEFAULT_INPUT_COLORS, TuiColorEditComponent, TuiColorEditModule, TuiColorPickerComponent, TuiColorPickerModule, TuiColorSelectorComponent, TuiColorSelectorMode, TuiColorSelectorModule, TuiFlatPickerComponent, TuiFlatPickerModule, TuiLinearMultiPickerComponent, TuiLinearMultiPickerModule, TuiLinearPickerComponent, TuiLinearPickerModule, TuiPaletteComponent, TuiPaletteModule, TuiPickerService, tuiColorSelectorOptionsProvider };
730
- //# sourceMappingURL=taiga-ui-legacy-components-color-selector.mjs.map