@cuby-ui/core 0.0.181 → 0.0.191

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 (418) hide show
  1. package/README.md +24 -24
  2. package/animations/animations.d.ts +36 -0
  3. package/animations/index.d.ts +1 -0
  4. package/classes/accessors.d.ts +17 -0
  5. package/classes/driver.d.ts +16 -0
  6. package/classes/index.d.ts +3 -0
  7. package/classes/vehicle.d.ts +6 -0
  8. package/components/accordion/accordion-item/accordion-item.component.d.ts +11 -11
  9. package/components/accordion/accordion.component.d.ts +5 -5
  10. package/components/accordion/accordion.module.d.ts +11 -11
  11. package/components/accordion/index.d.ts +3 -3
  12. package/components/alert/alert.component.d.ts +13 -13
  13. package/components/alert/alert.interfaces.d.ts +9 -9
  14. package/components/alert/alert.module.d.ts +11 -11
  15. package/components/alert/alert.service.d.ts +7 -7
  16. package/components/alert/alert.tokens.d.ts +16 -16
  17. package/components/alert/alert.types.d.ts +3 -3
  18. package/components/alert/alerts.component.d.ts +17 -17
  19. package/components/alert/index.d.ts +8 -8
  20. package/components/badge/badge.component.d.ts +10 -10
  21. package/components/badge/badge.module.d.ts +8 -8
  22. package/components/badge/badge.options.d.ts +8 -8
  23. package/components/badge/index.d.ts +2 -2
  24. package/components/banner/banner.component.d.ts +21 -21
  25. package/components/banner/banner.module.d.ts +11 -11
  26. package/components/banner/banner.options.d.ts +13 -13
  27. package/components/banner/index.d.ts +3 -3
  28. package/components/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +6 -6
  29. package/components/breadcrumbs/breadcrumbs.component.d.ts +7 -7
  30. package/components/breadcrumbs/breadcrumbs.module.d.ts +10 -10
  31. package/components/breadcrumbs/index.d.ts +3 -3
  32. package/components/button/button.component.d.ts +38 -38
  33. package/components/button/button.module.d.ts +9 -9
  34. package/components/button/button.options.d.ts +9 -9
  35. package/components/button/index.d.ts +3 -3
  36. package/components/button-group/button-group.component.d.ts +5 -5
  37. package/components/button-group/button-group.module.d.ts +7 -7
  38. package/components/button-group/index.d.ts +2 -2
  39. package/components/checkbox/checkbox.component.d.ts +5 -5
  40. package/components/checkbox/checkbox.module.d.ts +7 -7
  41. package/components/checkbox/index.d.ts +2 -2
  42. package/components/context-menu/context-menu.component.d.ts +39 -39
  43. package/components/context-menu/context-menu.module.d.ts +9 -9
  44. package/components/context-menu/index.d.ts +2 -2
  45. package/components/dialog/dialog-actions/dialog-actions.component.d.ts +5 -5
  46. package/components/dialog/dialog-header/dialog-header.component.d.ts +13 -13
  47. package/components/dialog/dialog.component.d.ts +33 -33
  48. package/components/dialog/dialog.interfaces.d.ts +11 -11
  49. package/components/dialog/dialog.module.d.ts +14 -14
  50. package/components/dialog/dialog.service.d.ts +7 -7
  51. package/components/dialog/dialog.tokens.d.ts +8 -8
  52. package/components/dialog/dialogs.component.d.ts +18 -18
  53. package/components/dialog/index.d.ts +8 -8
  54. package/components/form-field/form-field.component.d.ts +5 -5
  55. package/components/form-field/form-field.module.d.ts +7 -7
  56. package/components/form-field/index.d.ts +2 -2
  57. package/components/hint/hint.component.d.ts +7 -7
  58. package/components/hint/hint.module.d.ts +7 -7
  59. package/components/hint/index.d.ts +2 -2
  60. package/components/icon-button/icon-button.component.d.ts +13 -13
  61. package/components/icon-button/icon-button.module.d.ts +9 -9
  62. package/components/icon-button/index.d.ts +2 -2
  63. package/components/index.d.ts +26 -26
  64. package/components/input-number/index.d.ts +2 -2
  65. package/components/input-number/input-number.component.d.ts +38 -38
  66. package/components/input-number/input-number.module.d.ts +12 -12
  67. package/components/input-password/index.d.ts +2 -2
  68. package/components/input-password/input-password.component.d.ts +31 -31
  69. package/components/input-password/input-password.module.d.ts +11 -11
  70. package/components/input-text/index.d.ts +2 -2
  71. package/components/input-text/input-text.component.d.ts +31 -31
  72. package/components/input-text/input-text.module.d.ts +11 -11
  73. package/components/input-time/index.d.ts +3 -3
  74. package/components/input-time/input-time.component.d.ts +36 -36
  75. package/components/input-time/input-time.module.d.ts +12 -12
  76. package/components/input-time/input-time.options.d.ts +7 -7
  77. package/components/label/index.d.ts +2 -2
  78. package/components/label/label.component.d.ts +6 -6
  79. package/components/label/label.module.d.ts +8 -8
  80. package/components/notification/index.d.ts +3 -3
  81. package/components/notification/notification.component.d.ts +18 -18
  82. package/components/notification/notification.module.d.ts +9 -9
  83. package/components/notification/notification.options.d.ts +17 -17
  84. package/components/radio/index.d.ts +2 -2
  85. package/components/radio/radio.component.d.ts +5 -5
  86. package/components/radio/radio.module.d.ts +7 -7
  87. package/components/root/index.d.ts +3 -3
  88. package/components/root/root.component.d.ts +11 -11
  89. package/components/root/root.module.d.ts +11 -10
  90. package/components/root/root.options.d.ts +1 -1
  91. package/components/select/index.d.ts +2 -2
  92. package/components/select/select.component.d.ts +53 -53
  93. package/components/select/select.module.d.ts +11 -11
  94. package/components/svg/index.d.ts +2 -2
  95. package/components/svg/svg.component.d.ts +16 -16
  96. package/components/svg/svg.module.d.ts +8 -8
  97. package/components/tabs/index.d.ts +3 -3
  98. package/components/tabs/tab/index.d.ts +1 -1
  99. package/components/tabs/tab/tab.component.d.ts +8 -8
  100. package/components/tabs/tabs.component.d.ts +16 -16
  101. package/components/tabs/tabs.module.d.ts +8 -8
  102. package/components/textarea/index.d.ts +2 -2
  103. package/components/textarea/textarea.component.d.ts +10 -10
  104. package/components/textarea/textarea.module.d.ts +7 -7
  105. package/components/toggle/index.d.ts +2 -2
  106. package/components/toggle/toggle.component.d.ts +5 -5
  107. package/components/toggle/toggle.module.d.ts +7 -7
  108. package/directives/index.d.ts +2 -1
  109. package/directives/text-field-controller/index.d.ts +8 -8
  110. package/directives/text-field-controller/text-field-controller.module.d.ts +11 -11
  111. package/directives/text-field-controller/text-field-controller.provider.d.ts +4 -4
  112. package/directives/text-field-controller/text-field-icon-left.directive.d.ts +9 -9
  113. package/directives/text-field-controller/text-field-id.directive.d.ts +8 -8
  114. package/directives/text-field-controller/text-field-is-error.directive.d.ts +8 -8
  115. package/directives/text-field-controller/text-field-placeholder.directive.d.ts +8 -8
  116. package/directives/text-field-controller/text-field-size.directive.d.ts +9 -9
  117. package/directives/text-field-controller/text-field.controller.d.ts +20 -20
  118. package/directives/tooltip/index.d.ts +16 -0
  119. package/directives/tooltip/tooltip-describe.directive.d.ts +16 -0
  120. package/directives/tooltip/tooltip-driver.directive.d.ts +7 -0
  121. package/directives/tooltip/tooltip-host.directive.d.ts +9 -0
  122. package/directives/tooltip/tooltip-hover.directive.d.ts +21 -0
  123. package/directives/tooltip/tooltip-manual.directive.d.ts +13 -0
  124. package/directives/tooltip/tooltip-options.directive.d.ts +36 -0
  125. package/directives/tooltip/tooltip-overflow.directive.d.ts +8 -0
  126. package/directives/tooltip/tooltip-pointer.directive.d.ts +10 -0
  127. package/directives/tooltip/tooltip-position.directive.d.ts +20 -0
  128. package/directives/tooltip/tooltip-unstyled.component.d.ts +17 -0
  129. package/directives/tooltip/tooltip.component.d.ts +33 -0
  130. package/directives/tooltip/tooltip.d.ts +13 -0
  131. package/directives/tooltip/tooltip.directive.d.ts +26 -0
  132. package/directives/tooltip/tooltip.providers.d.ts +5 -0
  133. package/directives/tooltip/tooltip.service.d.ts +13 -0
  134. package/directives/tooltip/tooltips.component.d.ts +12 -0
  135. package/esm2022/animations/animations.mjs +272 -0
  136. package/esm2022/animations/index.mjs +2 -0
  137. package/esm2022/classes/accessors.mjs +31 -0
  138. package/esm2022/classes/driver.mjs +35 -0
  139. package/esm2022/classes/index.mjs +4 -0
  140. package/esm2022/classes/vehicle.mjs +7 -0
  141. package/esm2022/components/accordion/accordion-item/accordion-item.component.mjs +28 -0
  142. package/esm2022/components/accordion/accordion.component.mjs +11 -0
  143. package/esm2022/components/accordion/accordion.module.mjs +37 -0
  144. package/{esm2020 → esm2022}/components/accordion/index.mjs +4 -4
  145. package/esm2022/components/alert/alert.component.mjs +36 -0
  146. package/esm2022/components/alert/alert.interfaces.mjs +2 -0
  147. package/{esm2020 → esm2022}/components/alert/alert.module.mjs +40 -40
  148. package/esm2022/components/alert/alert.service.mjs +17 -0
  149. package/{esm2020 → esm2022}/components/alert/alert.tokens.mjs +20 -20
  150. package/{esm2020 → esm2022}/components/alert/alert.types.mjs +2 -2
  151. package/esm2022/components/alert/alerts.component.mjs +36 -0
  152. package/{esm2020 → esm2022}/components/alert/index.mjs +9 -9
  153. package/esm2022/components/badge/badge.component.mjs +31 -0
  154. package/esm2022/components/badge/badge.module.mjs +18 -0
  155. package/{esm2020 → esm2022}/components/badge/badge.options.mjs +8 -8
  156. package/{esm2020 → esm2022}/components/badge/index.mjs +3 -3
  157. package/esm2022/components/banner/banner.component.mjs +68 -0
  158. package/esm2022/components/banner/banner.module.mjs +31 -0
  159. package/esm2022/components/banner/banner.options.mjs +6 -0
  160. package/{esm2020 → esm2022}/components/banner/index.mjs +4 -4
  161. package/esm2022/components/breadcrumbs/breadcrumb/breadcrumb.component.mjs +16 -0
  162. package/esm2022/components/breadcrumbs/breadcrumbs.component.mjs +17 -0
  163. package/esm2022/components/breadcrumbs/breadcrumbs.module.mjs +33 -0
  164. package/{esm2020 → esm2022}/components/breadcrumbs/index.mjs +4 -4
  165. package/esm2022/components/button/button.component.mjs +138 -0
  166. package/esm2022/components/button/button.module.mjs +24 -0
  167. package/esm2022/components/button/button.options.mjs +10 -0
  168. package/{esm2020 → esm2022}/components/button/index.mjs +4 -4
  169. package/esm2022/components/button-group/button-group.component.mjs +11 -0
  170. package/esm2022/components/button-group/button-group.module.mjs +16 -0
  171. package/{esm2020 → esm2022}/components/button-group/index.mjs +3 -3
  172. package/esm2022/components/checkbox/checkbox.component.mjs +11 -0
  173. package/{esm2020 → esm2022}/components/checkbox/checkbox.module.mjs +16 -16
  174. package/{esm2020 → esm2022}/components/checkbox/index.mjs +3 -3
  175. package/esm2022/components/context-menu/context-menu.component.mjs +146 -0
  176. package/esm2022/components/context-menu/context-menu.module.mjs +24 -0
  177. package/{esm2020 → esm2022}/components/context-menu/index.mjs +3 -3
  178. package/esm2022/components/dialog/dialog-actions/dialog-actions.component.mjs +11 -0
  179. package/esm2022/components/dialog/dialog-header/dialog-header.component.mjs +28 -0
  180. package/esm2022/components/dialog/dialog.component.mjs +67 -0
  181. package/esm2022/components/dialog/dialog.interfaces.mjs +2 -0
  182. package/esm2022/components/dialog/dialog.module.mjs +49 -0
  183. package/esm2022/components/dialog/dialog.service.mjs +17 -0
  184. package/{esm2020 → esm2022}/components/dialog/dialog.tokens.mjs +12 -12
  185. package/esm2022/components/dialog/dialogs.component.mjs +51 -0
  186. package/{esm2020 → esm2022}/components/dialog/index.mjs +9 -9
  187. package/esm2022/components/form-field/form-field.component.mjs +11 -0
  188. package/esm2022/components/form-field/form-field.module.mjs +16 -0
  189. package/{esm2020 → esm2022}/components/form-field/index.mjs +3 -3
  190. package/esm2022/components/hint/hint.component.mjs +19 -0
  191. package/esm2022/components/hint/hint.module.mjs +16 -0
  192. package/{esm2020 → esm2022}/components/hint/index.mjs +3 -3
  193. package/esm2022/components/icon-button/icon-button.component.mjs +32 -0
  194. package/esm2022/components/icon-button/icon-button.module.mjs +24 -0
  195. package/{esm2020 → esm2022}/components/icon-button/index.mjs +3 -3
  196. package/{esm2020 → esm2022}/components/index.mjs +27 -27
  197. package/{esm2020 → esm2022}/components/input-number/index.mjs +3 -3
  198. package/esm2022/components/input-number/input-number.component.mjs +113 -0
  199. package/esm2022/components/input-number/input-number.module.mjs +36 -0
  200. package/{esm2020 → esm2022}/components/input-password/index.mjs +3 -3
  201. package/esm2022/components/input-password/input-password.component.mjs +89 -0
  202. package/esm2022/components/input-password/input-password.module.mjs +33 -0
  203. package/{esm2020 → esm2022}/components/input-text/index.mjs +3 -3
  204. package/esm2022/components/input-text/input-text.component.mjs +87 -0
  205. package/esm2022/components/input-text/input-text.module.mjs +33 -0
  206. package/{esm2020 → esm2022}/components/input-time/index.mjs +4 -4
  207. package/esm2022/components/input-time/input-time.component.mjs +99 -0
  208. package/esm2022/components/input-time/input-time.module.mjs +36 -0
  209. package/{esm2020 → esm2022}/components/input-time/input-time.options.mjs +8 -8
  210. package/{esm2020 → esm2022}/components/label/index.mjs +3 -3
  211. package/esm2022/components/label/label.component.mjs +17 -0
  212. package/{esm2020 → esm2022}/components/label/label.module.mjs +18 -18
  213. package/{esm2020 → esm2022}/components/notification/index.mjs +4 -4
  214. package/esm2022/components/notification/notification.component.mjs +47 -0
  215. package/esm2022/components/notification/notification.module.mjs +24 -0
  216. package/{esm2020 → esm2022}/components/notification/notification.options.mjs +53 -53
  217. package/{esm2020 → esm2022}/components/radio/index.mjs +3 -3
  218. package/{esm2020 → esm2022}/components/radio/radio.component.mjs +11 -11
  219. package/esm2022/components/radio/radio.module.mjs +16 -0
  220. package/{esm2020 → esm2022}/components/root/index.mjs +4 -4
  221. package/esm2022/components/root/root.component.mjs +32 -0
  222. package/esm2022/components/root/root.module.mjs +31 -0
  223. package/{esm2020 → esm2022}/components/root/root.options.mjs +1 -1
  224. package/{esm2020 → esm2022}/components/select/index.mjs +3 -3
  225. package/esm2022/components/select/select.component.mjs +172 -0
  226. package/esm2022/components/select/select.module.mjs +32 -0
  227. package/{esm2020 → esm2022}/components/svg/index.mjs +3 -3
  228. package/esm2022/components/svg/svg.component.mjs +50 -0
  229. package/esm2022/components/svg/svg.module.mjs +18 -0
  230. package/{esm2020 → esm2022}/components/tabs/index.mjs +4 -4
  231. package/{esm2020 → esm2022}/components/tabs/tab/index.mjs +1 -1
  232. package/{esm2020 → esm2022}/components/tabs/tab/tab.component.mjs +21 -21
  233. package/esm2022/components/tabs/tabs.component.mjs +49 -0
  234. package/esm2022/components/tabs/tabs.module.mjs +18 -0
  235. package/{esm2020 → esm2022}/components/textarea/index.mjs +3 -3
  236. package/{esm2020 → esm2022}/components/textarea/textarea.component.mjs +35 -35
  237. package/{esm2020 → esm2022}/components/textarea/textarea.module.mjs +16 -16
  238. package/{esm2020 → esm2022}/components/toggle/index.mjs +3 -3
  239. package/esm2022/components/toggle/toggle.component.mjs +11 -0
  240. package/esm2022/components/toggle/toggle.module.mjs +16 -0
  241. package/{esm2020 → esm2022}/cuby-ui-core.mjs +4 -4
  242. package/esm2022/directives/index.mjs +3 -0
  243. package/{esm2020 → esm2022}/directives/text-field-controller/index.mjs +9 -9
  244. package/esm2022/directives/text-field-controller/text-field-controller.module.mjs +40 -0
  245. package/esm2022/directives/text-field-controller/text-field-controller.provider.mjs +24 -0
  246. package/{esm2020 → esm2022}/directives/text-field-controller/text-field-icon-left.directive.mjs +21 -21
  247. package/{esm2020 → esm2022}/directives/text-field-controller/text-field-id.directive.mjs +21 -21
  248. package/{esm2020 → esm2022}/directives/text-field-controller/text-field-is-error.directive.mjs +24 -24
  249. package/{esm2020 → esm2022}/directives/text-field-controller/text-field-placeholder.directive.mjs +21 -21
  250. package/{esm2020 → esm2022}/directives/text-field-controller/text-field-size.directive.mjs +24 -24
  251. package/esm2022/directives/text-field-controller/text-field.controller.mjs +25 -0
  252. package/esm2022/directives/tooltip/index.mjs +17 -0
  253. package/esm2022/directives/tooltip/tooltip-describe.directive.mjs +45 -0
  254. package/esm2022/directives/tooltip/tooltip-driver.directive.mjs +18 -0
  255. package/esm2022/directives/tooltip/tooltip-host.directive.mjs +26 -0
  256. package/esm2022/directives/tooltip/tooltip-hover.directive.mjs +53 -0
  257. package/esm2022/directives/tooltip/tooltip-manual.directive.mjs +31 -0
  258. package/esm2022/directives/tooltip/tooltip-options.directive.mjs +83 -0
  259. package/esm2022/directives/tooltip/tooltip-overflow.directive.mjs +31 -0
  260. package/esm2022/directives/tooltip/tooltip-pointer.directive.mjs +31 -0
  261. package/esm2022/directives/tooltip/tooltip-position.directive.mjs +96 -0
  262. package/esm2022/directives/tooltip/tooltip-unstyled.component.mjs +40 -0
  263. package/esm2022/directives/tooltip/tooltip.component.mjs +110 -0
  264. package/esm2022/directives/tooltip/tooltip.directive.mjs +92 -0
  265. package/esm2022/directives/tooltip/tooltip.mjs +27 -0
  266. package/esm2022/directives/tooltip/tooltip.providers.mjs +7 -0
  267. package/esm2022/directives/tooltip/tooltip.service.mjs +28 -0
  268. package/esm2022/directives/tooltip/tooltips.component.mjs +33 -0
  269. package/{esm2020 → esm2022}/index.mjs +7 -7
  270. package/{esm2020 → esm2022}/interfaces/context-menu-item.mjs +2 -2
  271. package/{esm2020 → esm2022}/interfaces/index.mjs +3 -3
  272. package/{esm2020 → esm2022}/interfaces/option.mjs +2 -2
  273. package/esm2022/services/index.mjs +5 -0
  274. package/esm2022/services/position.service.mjs +23 -0
  275. package/{esm2020 → esm2022}/services/theme.options.mjs +6 -6
  276. package/{esm2020 → esm2022}/services/theme.service.mjs +30 -30
  277. package/esm2022/services/visual-viewport.service.mjs +28 -0
  278. package/esm2022/tokens/animations-speed.mjs +8 -0
  279. package/esm2022/tokens/index.mjs +4 -0
  280. package/esm2022/tokens/reduced-motion.mjs +6 -0
  281. package/esm2022/tokens/viewport.mjs +31 -0
  282. package/esm2022/types/appearance.mjs +2 -0
  283. package/{esm2020 → esm2022}/types/hint-type.mjs +2 -2
  284. package/esm2022/types/index.mjs +10 -0
  285. package/esm2022/types/point.mjs +2 -0
  286. package/esm2022/types/portal-item.mjs +2 -0
  287. package/{esm2020 → esm2022}/types/position.mjs +2 -2
  288. package/{esm2020 → esm2022}/types/resizing.mjs +2 -2
  289. package/{esm2020 → esm2022}/types/shape.mjs +2 -2
  290. package/{esm2020 → esm2022}/types/size.mjs +2 -2
  291. package/{esm2020 → esm2022}/types/status.mjs +2 -2
  292. package/{esm2020 → esm2022}/utils/format/index.mjs +3 -3
  293. package/{esm2020 → esm2022}/utils/format/remove-spaces.mjs +4 -4
  294. package/{esm2020 → esm2022}/utils/format/replace.mjs +5 -5
  295. package/esm2022/utils/index.mjs +3 -0
  296. package/esm2022/utils/miscellaneous/index.mjs +4 -0
  297. package/esm2022/utils/miscellaneous/is-obscured.mjs +8 -0
  298. package/esm2022/utils/miscellaneous/override-options.mjs +11 -0
  299. package/esm2022/utils/miscellaneous/to-animation-options.mjs +14 -0
  300. package/fesm2022/cuby-ui-core.mjs +3416 -0
  301. package/fesm2022/cuby-ui-core.mjs.map +1 -0
  302. package/fonts/Inter-Bold.svg +25443 -25443
  303. package/fonts/Inter-Medium.svg +25400 -25400
  304. package/fonts/Inter-Regular.svg +24341 -24341
  305. package/fonts/Inter-SemiBold.svg +25459 -25459
  306. package/index.d.ts +6 -6
  307. package/interfaces/context-menu-item.d.ts +7 -7
  308. package/interfaces/index.d.ts +2 -2
  309. package/interfaces/option.d.ts +5 -5
  310. package/package.json +8 -14
  311. package/services/index.d.ts +4 -2
  312. package/services/position.service.d.ts +10 -0
  313. package/services/theme.options.d.ts +5 -5
  314. package/services/theme.service.d.ts +12 -12
  315. package/services/visual-viewport.service.d.ts +9 -0
  316. package/styles/fonts.scss +51 -51
  317. package/styles/global.scss +9 -9
  318. package/styles/mixins/buttons.scss +13 -13
  319. package/styles/mixins/headings.scss +115 -115
  320. package/styles/mixins/inputs.scss +91 -91
  321. package/styles/mixins/lists.scss +5 -5
  322. package/styles/mixins/paddings.scss +35 -35
  323. package/styles/mixins/shadows.scss +38 -38
  324. package/styles/mixins/texts.scss +225 -225
  325. package/styles/theme.scss +385 -385
  326. package/styles/variables/colors.scss +253 -253
  327. package/tokens/animations-speed.d.ts +4 -0
  328. package/tokens/index.d.ts +3 -0
  329. package/tokens/reduced-motion.d.ts +1 -0
  330. package/tokens/viewport.d.ts +7 -0
  331. package/types/appearance.d.ts +8 -8
  332. package/types/hint-type.d.ts +1 -1
  333. package/types/index.d.ts +9 -7
  334. package/types/point.d.ts +1 -0
  335. package/types/portal-item.d.ts +9 -0
  336. package/types/position.d.ts +2 -2
  337. package/types/resizing.d.ts +2 -2
  338. package/types/shape.d.ts +1 -1
  339. package/types/size.d.ts +4 -4
  340. package/types/status.d.ts +1 -1
  341. package/utils/format/index.d.ts +2 -2
  342. package/utils/format/remove-spaces.d.ts +1 -1
  343. package/utils/format/replace.d.ts +1 -1
  344. package/utils/index.d.ts +2 -1
  345. package/utils/miscellaneous/index.d.ts +3 -0
  346. package/utils/miscellaneous/is-obscured.d.ts +4 -0
  347. package/utils/miscellaneous/override-options.d.ts +1 -0
  348. package/utils/miscellaneous/to-animation-options.d.ts +4 -0
  349. package/esm2020/components/accordion/accordion-item/accordion-item.component.mjs +0 -28
  350. package/esm2020/components/accordion/accordion.component.mjs +0 -11
  351. package/esm2020/components/accordion/accordion.module.mjs +0 -37
  352. package/esm2020/components/alert/alert.component.mjs +0 -36
  353. package/esm2020/components/alert/alert.interfaces.mjs +0 -2
  354. package/esm2020/components/alert/alert.service.mjs +0 -17
  355. package/esm2020/components/alert/alerts.component.mjs +0 -36
  356. package/esm2020/components/badge/badge.component.mjs +0 -31
  357. package/esm2020/components/badge/badge.module.mjs +0 -18
  358. package/esm2020/components/banner/banner.component.mjs +0 -68
  359. package/esm2020/components/banner/banner.module.mjs +0 -31
  360. package/esm2020/components/banner/banner.options.mjs +0 -6
  361. package/esm2020/components/breadcrumbs/breadcrumb/breadcrumb.component.mjs +0 -16
  362. package/esm2020/components/breadcrumbs/breadcrumbs.component.mjs +0 -17
  363. package/esm2020/components/breadcrumbs/breadcrumbs.module.mjs +0 -33
  364. package/esm2020/components/button/button.component.mjs +0 -138
  365. package/esm2020/components/button/button.module.mjs +0 -24
  366. package/esm2020/components/button/button.options.mjs +0 -10
  367. package/esm2020/components/button-group/button-group.component.mjs +0 -11
  368. package/esm2020/components/button-group/button-group.module.mjs +0 -16
  369. package/esm2020/components/checkbox/checkbox.component.mjs +0 -11
  370. package/esm2020/components/context-menu/context-menu.component.mjs +0 -146
  371. package/esm2020/components/context-menu/context-menu.module.mjs +0 -24
  372. package/esm2020/components/dialog/dialog-actions/dialog-actions.component.mjs +0 -11
  373. package/esm2020/components/dialog/dialog-header/dialog-header.component.mjs +0 -28
  374. package/esm2020/components/dialog/dialog.component.mjs +0 -67
  375. package/esm2020/components/dialog/dialog.interfaces.mjs +0 -2
  376. package/esm2020/components/dialog/dialog.module.mjs +0 -50
  377. package/esm2020/components/dialog/dialog.service.mjs +0 -17
  378. package/esm2020/components/dialog/dialogs.component.mjs +0 -51
  379. package/esm2020/components/form-field/form-field.component.mjs +0 -11
  380. package/esm2020/components/form-field/form-field.module.mjs +0 -16
  381. package/esm2020/components/hint/hint.component.mjs +0 -19
  382. package/esm2020/components/hint/hint.module.mjs +0 -16
  383. package/esm2020/components/icon-button/icon-button.component.mjs +0 -32
  384. package/esm2020/components/icon-button/icon-button.module.mjs +0 -24
  385. package/esm2020/components/input-number/input-number.component.mjs +0 -113
  386. package/esm2020/components/input-number/input-number.module.mjs +0 -36
  387. package/esm2020/components/input-password/input-password.component.mjs +0 -89
  388. package/esm2020/components/input-password/input-password.module.mjs +0 -33
  389. package/esm2020/components/input-text/input-text.component.mjs +0 -87
  390. package/esm2020/components/input-text/input-text.module.mjs +0 -33
  391. package/esm2020/components/input-time/input-time.component.mjs +0 -99
  392. package/esm2020/components/input-time/input-time.module.mjs +0 -36
  393. package/esm2020/components/label/label.component.mjs +0 -17
  394. package/esm2020/components/notification/notification.component.mjs +0 -47
  395. package/esm2020/components/notification/notification.module.mjs +0 -24
  396. package/esm2020/components/radio/radio.module.mjs +0 -16
  397. package/esm2020/components/root/root.component.mjs +0 -31
  398. package/esm2020/components/root/root.module.mjs +0 -28
  399. package/esm2020/components/select/select.component.mjs +0 -172
  400. package/esm2020/components/select/select.module.mjs +0 -32
  401. package/esm2020/components/svg/svg.component.mjs +0 -50
  402. package/esm2020/components/svg/svg.module.mjs +0 -18
  403. package/esm2020/components/tabs/tabs.component.mjs +0 -49
  404. package/esm2020/components/tabs/tabs.module.mjs +0 -18
  405. package/esm2020/components/toggle/toggle.component.mjs +0 -11
  406. package/esm2020/components/toggle/toggle.module.mjs +0 -16
  407. package/esm2020/directives/index.mjs +0 -2
  408. package/esm2020/directives/text-field-controller/text-field-controller.module.mjs +0 -40
  409. package/esm2020/directives/text-field-controller/text-field-controller.provider.mjs +0 -24
  410. package/esm2020/directives/text-field-controller/text-field.controller.mjs +0 -25
  411. package/esm2020/services/index.mjs +0 -3
  412. package/esm2020/types/appearance.mjs +0 -2
  413. package/esm2020/types/index.mjs +0 -8
  414. package/esm2020/utils/index.mjs +0 -2
  415. package/fesm2015/cuby-ui-core.mjs +0 -2326
  416. package/fesm2015/cuby-ui-core.mjs.map +0 -1
  417. package/fesm2020/cuby-ui-core.mjs +0 -2326
  418. package/fesm2020/cuby-ui-core.mjs.map +0 -1
@@ -0,0 +1,3416 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, InjectionToken, inject, Input, HostBinding, ChangeDetectorRef, ElementRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, Directive, NgZone, TemplateRef, ContentChildren, HostListener, Self, signal, INJECTOR, forwardRef, ViewContainerRef } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule, DOCUMENT, NgForOf } from '@angular/common';
5
+ import * as i1$1 from '@cuby-ui/cdk';
6
+ import { CUI_WINDOW, cuiCreateToken, cuiCreateTokenFromFactory, CuiDestroyService, CuiFilterPipe, CuiLetDirective, CuiPopoverService, cuiProvide, CUI_ANIMATION_FRAME, cuiZonefree, EMPTY_CLIENT_RECT, cuiInjectElement, CUI_LOCAL_STORAGE, CUI_IS_WEBKIT, CuiItemDirective, CuiActiveZone, CuiFocusTrapDirective, cuiGetElementObscures, CUI_IS_MOBILE, CuiHoveredService, cuiPure, cuiPointToClientRect, cuiClamp, cuiPx, cuiIfMap, cuiIsPresent, cuiTypedFromEvent, cuiZonefreeScheduler, cuiZoneOptimized, cuiIsNativeFocused, CuiClickOutsideDirective, CuiTargetDirective, CuiTime, CuiAutoResizingDirective } from '@cuby-ui/cdk';
7
+ import { DomSanitizer } from '@angular/platform-browser';
8
+ import { cuiIsIcon, CUI_ICONS } from '@cuby-ui/icons';
9
+ import { BehaviorSubject, takeUntil, Observable, merge, distinctUntilChanged, startWith, map, finalize, Subject, switchMap, of, delay, repeat, filter, tap, takeWhile, fromEvent, debounce, timer, skip, take } from 'rxjs';
10
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
11
+ import { trigger, transition, query, animateChild, style, animate, stagger } from '@angular/animations';
12
+ import * as i2 from '@taiga-ui/polymorpheus';
13
+ import { PolymorpheusOutlet, PolymorpheusTemplate, PolymorpheusComponent, injectContext } from '@taiga-ui/polymorpheus';
14
+ import { __decorate } from 'tslib';
15
+ import * as i2$1 from '@angular/forms';
16
+ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
17
+ import { maskitoParseNumber, maskitoNumberOptionsGenerator, maskitoTimeOptionsGenerator } from '@maskito/kit';
18
+ import * as i3 from '@maskito/angular';
19
+ import { MaskitoDirective } from '@maskito/angular';
20
+
21
+ class CuiAccordionComponent {
22
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiAccordionComponent, selector: "cui-accordion", ngImport: i0, template: "<ng-content select=\"cui-accordion-item\"></ng-content>\n", styles: [":host{display:flex;flex-direction:column;gap:16px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
24
+ }
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAccordionComponent, decorators: [{
26
+ type: Component,
27
+ args: [{ selector: 'cui-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"cui-accordion-item\"></ng-content>\n", styles: [":host{display:flex;flex-direction:column;gap:16px}\n"] }]
28
+ }] });
29
+
30
+ const CUI_BUTTON_DEFAULT_OPTIONS = {
31
+ appearance: 'action',
32
+ shape: null,
33
+ size: 'sm'
34
+ };
35
+ const CUI_BUTTON_OPTIONS = new InjectionToken('', {
36
+ factory: () => CUI_BUTTON_DEFAULT_OPTIONS
37
+ });
38
+
39
+ class CuiSvgComponent {
40
+ constructor() {
41
+ this.domSanitizer = inject(DomSanitizer);
42
+ }
43
+ set icon(icon) {
44
+ // TODO: В данном случае подключаются все иконки (вероятно, можно как-то оптимизировано их подключать)
45
+ this.safeSvgContent = this.domSanitizer.bypassSecurityTrustHtml(cuiIsIcon(icon)
46
+ ? CUI_ICONS[icon]
47
+ : icon);
48
+ }
49
+ get isWithStrokeWidth() {
50
+ return !!this.strokeWidth;
51
+ }
52
+ get isWithColor() {
53
+ return !!this.color;
54
+ }
55
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSvgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
56
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: { width: "width", height: "height", strokeWidth: "strokeWidth", color: "color", icon: "icon" }, host: { properties: { "style.--stroke-width": "this.strokeWidth", "style.--color": "this.color", "class._with-stroke-width": "this.isWithStrokeWidth", "class._with-color": "this.isWithColor" } }, ngImport: i0, template: "<span\n [innerHTML]=\"safeSvgContent\"\n [style.width.px]=\"width\"\n [style.height.px]=\"height\"\n></span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;line-height:0}:host ::ng-deep svg{width:100%;height:100%}:host._with-stroke-width ::ng-deep [stroke-width]{stroke-width:var(--stroke-width)}:host._with-color ::ng-deep [stroke]{stroke:var(--color)}:host._with-color ::ng-deep [fill]:not([fill=none]){fill:var(--color)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSvgComponent, decorators: [{
59
+ type: Component,
60
+ args: [{ selector: 'cui-svg[icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n [innerHTML]=\"safeSvgContent\"\n [style.width.px]=\"width\"\n [style.height.px]=\"height\"\n></span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;line-height:0}:host ::ng-deep svg{width:100%;height:100%}:host._with-stroke-width ::ng-deep [stroke-width]{stroke-width:var(--stroke-width)}:host._with-color ::ng-deep [stroke]{stroke:var(--color)}:host._with-color ::ng-deep [fill]:not([fill=none]){fill:var(--color)}\n"] }]
61
+ }], propDecorators: { width: [{
62
+ type: Input
63
+ }], height: [{
64
+ type: Input
65
+ }], strokeWidth: [{
66
+ type: Input
67
+ }, {
68
+ type: HostBinding,
69
+ args: ['style.--stroke-width']
70
+ }], color: [{
71
+ type: Input
72
+ }, {
73
+ type: HostBinding,
74
+ args: ['style.--color']
75
+ }], icon: [{
76
+ type: Input
77
+ }], isWithStrokeWidth: [{
78
+ type: HostBinding,
79
+ args: ['class._with-stroke-width']
80
+ }], isWithColor: [{
81
+ type: HostBinding,
82
+ args: ['class._with-color']
83
+ }] } });
84
+
85
+ class CuiButtonComponent {
86
+ constructor() {
87
+ this.changeDetectorRef = inject(ChangeDetectorRef);
88
+ this.element = inject(ElementRef).nativeElement;
89
+ this.window = inject(CUI_WINDOW);
90
+ this.cuiButtonOptions = inject(CUI_BUTTON_OPTIONS);
91
+ this.AppearanceIconColors = {
92
+ action: '--c-action-icon-color',
93
+ secondary: '--c-secondary-icon-color',
94
+ outlined: '--c-outlined-icon-color',
95
+ 'outlined-gray': '--c-outlined-gray-icon-color',
96
+ ghost: '--c-ghost-icon-color',
97
+ flat: '--c-flat-icon-color',
98
+ destructive: '--c-destructive-icon-color',
99
+ link: '--c-link-icon-color'
100
+ };
101
+ this.COLOR_BASE_500 = 'var(--cui-base-500)';
102
+ this.BUTTON_ICONS_COLOR_BASE_500 = [
103
+ 'secondary',
104
+ 'outlined',
105
+ 'outlined-gray',
106
+ 'ghost'
107
+ ];
108
+ this._appearance = this.cuiButtonOptions.appearance;
109
+ this.iconColor = this.getIconColor(this._appearance);
110
+ this._size = this.cuiButtonOptions.size;
111
+ this.iconDimensions = {
112
+ width: 20,
113
+ height: 20
114
+ };
115
+ this.shape = this.cuiButtonOptions.shape;
116
+ this.disabled = false;
117
+ this.isLoaderShown = false;
118
+ this.containsOnlyIcon = false;
119
+ }
120
+ get appearance() {
121
+ return this._appearance;
122
+ }
123
+ set appearance(appearance) {
124
+ this._appearance = appearance;
125
+ this.changeIconColor();
126
+ }
127
+ get size() {
128
+ return this._size;
129
+ }
130
+ set size(size) {
131
+ this._size = size;
132
+ if (size === 'xxs') {
133
+ this.iconDimensions = {
134
+ width: 16,
135
+ height: 16
136
+ };
137
+ return;
138
+ }
139
+ this.iconDimensions = {
140
+ width: 20,
141
+ height: 20
142
+ };
143
+ }
144
+ get isDisabled() {
145
+ return this.disabled || this.isLoaderShown;
146
+ }
147
+ ngOnInit() {
148
+ this.initIconColor();
149
+ }
150
+ initIconColor() {
151
+ this.changeIconColor();
152
+ }
153
+ changeIconColor() {
154
+ Promise.resolve().then(() => {
155
+ this.iconColor = this.getIconColor(this._appearance);
156
+ this.changeDetectorRef.markForCheck();
157
+ });
158
+ }
159
+ getIconColor(appearance) {
160
+ const customIconColor = this.window
161
+ .getComputedStyle(this.element)
162
+ .getPropertyValue(this.AppearanceIconColors[appearance]);
163
+ if (customIconColor) {
164
+ return customIconColor;
165
+ }
166
+ if (this.BUTTON_ICONS_COLOR_BASE_500.includes(appearance)) {
167
+ return this.COLOR_BASE_500;
168
+ }
169
+ return 'currentColor';
170
+ }
171
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
172
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: { shape: "shape", disabled: "disabled", isLoaderShown: "isLoaderShown", icon: "icon", iconRight: "iconRight", appearance: "appearance", size: "size" }, host: { properties: { "attr.data-shape": "this.shape", "class._disabled": "this.disabled", "class._loading": "this.isLoaderShown", "attr.data-appearance": "this.appearance", "attr.data-size": "this.size", "class._only-icon": "this.containsOnlyIcon", "disabled": "this.isDisabled" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<span\n class=\"c-wrapper\"\n [class.c-wrapper_invisible]=\"isLoaderShown\"\n>\n <cui-svg\n *ngIf=\"icon\"\n [icon]=\"icon\"\n [width]=\"iconDimensions.width\"\n [height]=\"iconDimensions.height\"\n [color]=\"iconColor\"\n ></cui-svg>\n <span\n #content\n class=\"c-content\"\n ><ng-content></ng-content></span>\n <cui-svg\n *ngIf=\"iconRight\"\n [icon]=\"iconRight\"\n [width]=\"iconDimensions.width\"\n [height]=\"iconDimensions.height\"\n [color]=\"iconColor\"\n ></cui-svg>\n</span>\n<cui-svg\n *ngIf=\"isLoaderShown\"\n icon=\"cuiIconLoading\"\n class=\"c-loader\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;font-weight:500;font-size:14px;line-height:20px;display:inline-block;position:relative;box-sizing:border-box;border-radius:8px;font-family:var(--cui-main-font)}:host:disabled{cursor:not-allowed}:host[data-shape=rounded]{border-radius:20px}:host[data-appearance=action]{background:var(--c-action-background);color:var(--cui-gray-0);border:1px solid var(--c-action-border-color)}@media (hover: hover){:host[data-appearance=action]:hover{background:var(--c-action-background-hover);border-color:var(--c-action-background-hover)}}:host[data-appearance=action]:active{background:var(--c-action-background-hover);border-color:var(--c-action-background-hover)}:host[data-appearance=action]:disabled{background:var(--c-action-background);border-color:var(--c-action-border-color)}:host[data-appearance=secondary]{background:var(--cui-base-100);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=secondary]:hover{background:var(--cui-base-200)}}:host[data-appearance=secondary]:active{background:var(--cui-base-200)}:host[data-appearance=secondary]:disabled{background:var(--cui-base-100)}:host[data-appearance=outlined]{border:1px solid var(--cui-base-200);background:var(--cui-base-0);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=outlined]:hover{background:var(--cui-base-50)}}:host[data-appearance=outlined]:active{background:var(--cui-base-50)}:host[data-appearance=outlined]:disabled{background:var(--cui-base-0)}:host[data-appearance=outlined-gray]{border:1px solid var(--cui-base-200);background:var(--cui-base-10);color:var(--c-outlined-gray-color)}@media (hover: hover){:host[data-appearance=outlined-gray]:hover{background:var(--cui-base-50)}}:host[data-appearance=outlined-gray]:active{background:var(--cui-base-50)}:host[data-appearance=outlined-gray]:disabled{background:var(--cui-base-10)}:host[data-appearance=ghost]{color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=ghost]:hover{background:var(--cui-base-50)}}:host[data-appearance=ghost]:active{background:var(--cui-base-50)}:host[data-appearance=ghost]:disabled{background:inherit}:host[data-appearance=flat]{color:var(--cui-light-blue-600)}@media (hover: hover){:host[data-appearance=flat]:hover{background:var(--cui-base-50)}}:host[data-appearance=flat]:active{background:var(--cui-base-50)}:host[data-appearance=flat]:disabled{background:inherit}:host[data-appearance=destructive]{background:var(--cui-danger);color:var(--cui-gray-0)}@media (hover: hover){:host[data-appearance=destructive]:hover{background:var(--cui-red-600)}}:host[data-appearance=destructive]:active{background:var(--cui-red-600)}:host[data-appearance=destructive]:disabled{background:var(--cui-danger)}:host[data-appearance=link]{height:24px!important;padding:0 4px!important;color:var(--cui-info)}@media (hover: hover){:host[data-appearance=link]:hover{color:var(--cui-blue-800)}}:host[data-appearance=link]:active{color:var(--cui-blue-800)}:host[data-appearance=link]:disabled{color:var(--cui-info)}:host[data-size=xxs]{font-size:12px;line-height:14px;height:28px;padding:0 12px}:host[data-size=xxs][data-appearance=action],:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xxs]:has(.c-content:empty){width:28px}:host[data-size=xxs] .c-wrapper{gap:6px}:host[data-size=xs]{font-size:13px;line-height:16px;height:32px;padding:0 12px}:host[data-size=xs][data-appearance=action],:host[data-size=xs][data-appearance=outlined],:host[data-size=xs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xs]:has(.c-content:empty){width:32px}:host[data-size=sm]{height:36px;padding:0 14px}:host[data-size=sm][data-appearance=action],:host[data-size=sm][data-appearance=outlined],:host[data-size=sm][data-appearance=outlined-gray]{padding:0 13px}:host[data-size=sm]:has(.c-content:empty){width:36px}:host[data-size=md]{height:40px;padding:0 16px}:host[data-size=md][data-appearance=action],:host[data-size=md][data-appearance=outlined],:host[data-size=md][data-appearance=outlined-gray]{padding:0 15px}:host[data-size=md]:has(.c-content:empty){width:40px}:host._disabled{opacity:.5}@media (hover: hover){:host-context([cuiTheme=dark])[data-appearance=destructive]:hover{background:var(--cui-red-300)}}:host-context([cuiTheme=dark])[data-appearance=destructive]:active{background:var(--cui-red-300)}:host-context([cuiTheme=dark])[data-appearance=destructive]:disabled{background:var(--cui-danger)}.c-content:empty{display:contents}.c-wrapper{display:flex;justify-content:center;align-items:center;gap:8px;height:100%}.c-wrapper_invisible{opacity:0}.c-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
173
+ }
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonComponent, decorators: [{
175
+ type: Component,
176
+ args: [{ selector: 'button[cuiButton], a[cuiButton]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"c-wrapper\"\n [class.c-wrapper_invisible]=\"isLoaderShown\"\n>\n <cui-svg\n *ngIf=\"icon\"\n [icon]=\"icon\"\n [width]=\"iconDimensions.width\"\n [height]=\"iconDimensions.height\"\n [color]=\"iconColor\"\n ></cui-svg>\n <span\n #content\n class=\"c-content\"\n ><ng-content></ng-content></span>\n <cui-svg\n *ngIf=\"iconRight\"\n [icon]=\"iconRight\"\n [width]=\"iconDimensions.width\"\n [height]=\"iconDimensions.height\"\n [color]=\"iconColor\"\n ></cui-svg>\n</span>\n<cui-svg\n *ngIf=\"isLoaderShown\"\n icon=\"cuiIconLoading\"\n class=\"c-loader\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;font-weight:500;font-size:14px;line-height:20px;display:inline-block;position:relative;box-sizing:border-box;border-radius:8px;font-family:var(--cui-main-font)}:host:disabled{cursor:not-allowed}:host[data-shape=rounded]{border-radius:20px}:host[data-appearance=action]{background:var(--c-action-background);color:var(--cui-gray-0);border:1px solid var(--c-action-border-color)}@media (hover: hover){:host[data-appearance=action]:hover{background:var(--c-action-background-hover);border-color:var(--c-action-background-hover)}}:host[data-appearance=action]:active{background:var(--c-action-background-hover);border-color:var(--c-action-background-hover)}:host[data-appearance=action]:disabled{background:var(--c-action-background);border-color:var(--c-action-border-color)}:host[data-appearance=secondary]{background:var(--cui-base-100);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=secondary]:hover{background:var(--cui-base-200)}}:host[data-appearance=secondary]:active{background:var(--cui-base-200)}:host[data-appearance=secondary]:disabled{background:var(--cui-base-100)}:host[data-appearance=outlined]{border:1px solid var(--cui-base-200);background:var(--cui-base-0);color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=outlined]:hover{background:var(--cui-base-50)}}:host[data-appearance=outlined]:active{background:var(--cui-base-50)}:host[data-appearance=outlined]:disabled{background:var(--cui-base-0)}:host[data-appearance=outlined-gray]{border:1px solid var(--cui-base-200);background:var(--cui-base-10);color:var(--c-outlined-gray-color)}@media (hover: hover){:host[data-appearance=outlined-gray]:hover{background:var(--cui-base-50)}}:host[data-appearance=outlined-gray]:active{background:var(--cui-base-50)}:host[data-appearance=outlined-gray]:disabled{background:var(--cui-base-10)}:host[data-appearance=ghost]{color:var(--cui-base-900)}@media (hover: hover){:host[data-appearance=ghost]:hover{background:var(--cui-base-50)}}:host[data-appearance=ghost]:active{background:var(--cui-base-50)}:host[data-appearance=ghost]:disabled{background:inherit}:host[data-appearance=flat]{color:var(--cui-light-blue-600)}@media (hover: hover){:host[data-appearance=flat]:hover{background:var(--cui-base-50)}}:host[data-appearance=flat]:active{background:var(--cui-base-50)}:host[data-appearance=flat]:disabled{background:inherit}:host[data-appearance=destructive]{background:var(--cui-danger);color:var(--cui-gray-0)}@media (hover: hover){:host[data-appearance=destructive]:hover{background:var(--cui-red-600)}}:host[data-appearance=destructive]:active{background:var(--cui-red-600)}:host[data-appearance=destructive]:disabled{background:var(--cui-danger)}:host[data-appearance=link]{height:24px!important;padding:0 4px!important;color:var(--cui-info)}@media (hover: hover){:host[data-appearance=link]:hover{color:var(--cui-blue-800)}}:host[data-appearance=link]:active{color:var(--cui-blue-800)}:host[data-appearance=link]:disabled{color:var(--cui-info)}:host[data-size=xxs]{font-size:12px;line-height:14px;height:28px;padding:0 12px}:host[data-size=xxs][data-appearance=action],:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xxs]:has(.c-content:empty){width:28px}:host[data-size=xxs] .c-wrapper{gap:6px}:host[data-size=xs]{font-size:13px;line-height:16px;height:32px;padding:0 12px}:host[data-size=xs][data-appearance=action],:host[data-size=xs][data-appearance=outlined],:host[data-size=xs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xs]:has(.c-content:empty){width:32px}:host[data-size=sm]{height:36px;padding:0 14px}:host[data-size=sm][data-appearance=action],:host[data-size=sm][data-appearance=outlined],:host[data-size=sm][data-appearance=outlined-gray]{padding:0 13px}:host[data-size=sm]:has(.c-content:empty){width:36px}:host[data-size=md]{height:40px;padding:0 16px}:host[data-size=md][data-appearance=action],:host[data-size=md][data-appearance=outlined],:host[data-size=md][data-appearance=outlined-gray]{padding:0 15px}:host[data-size=md]:has(.c-content:empty){width:40px}:host._disabled{opacity:.5}@media (hover: hover){:host-context([cuiTheme=dark])[data-appearance=destructive]:hover{background:var(--cui-red-300)}}:host-context([cuiTheme=dark])[data-appearance=destructive]:active{background:var(--cui-red-300)}:host-context([cuiTheme=dark])[data-appearance=destructive]:disabled{background:var(--cui-danger)}.c-content:empty{display:contents}.c-wrapper{display:flex;justify-content:center;align-items:center;gap:8px;height:100%}.c-wrapper_invisible{opacity:0}.c-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
177
+ }], propDecorators: { shape: [{
178
+ type: Input
179
+ }, {
180
+ type: HostBinding,
181
+ args: ['attr.data-shape']
182
+ }], disabled: [{
183
+ type: Input
184
+ }, {
185
+ type: HostBinding,
186
+ args: ['class._disabled']
187
+ }], isLoaderShown: [{
188
+ type: Input
189
+ }, {
190
+ type: HostBinding,
191
+ args: ['class._loading']
192
+ }], icon: [{
193
+ type: Input
194
+ }], iconRight: [{
195
+ type: Input
196
+ }], appearance: [{
197
+ type: Input
198
+ }, {
199
+ type: HostBinding,
200
+ args: ['attr.data-appearance']
201
+ }], size: [{
202
+ type: Input
203
+ }, {
204
+ type: HostBinding,
205
+ args: ['attr.data-size']
206
+ }], containsOnlyIcon: [{
207
+ type: HostBinding,
208
+ args: ['class._only-icon']
209
+ }], isDisabled: [{
210
+ type: HostBinding,
211
+ args: ['disabled']
212
+ }], content: [{
213
+ type: ViewChild,
214
+ args: ['content']
215
+ }] } });
216
+
217
+ class CuiAccordionItemComponent {
218
+ constructor() {
219
+ this.isOpen = true;
220
+ this.isOpenChange = new EventEmitter();
221
+ }
222
+ get buttonIcon() {
223
+ return this.isOpen ? 'cuiIconChevronDown' : 'cuiIconChevronRight';
224
+ }
225
+ onRowToggle() {
226
+ this.isOpen = !this.isOpen;
227
+ this.isOpenChange.emit(this.isOpen);
228
+ }
229
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
230
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiAccordionItemComponent, selector: "cui-accordion-item", inputs: { isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngImport: i0, template: "<header class=\"c-header\">\n <button\n cuiButton\n appearance=\"ghost\"\n size=\"xxs\"\n [icon]=\"buttonIcon\"\n (click)=\"onRowToggle()\"\n ></button>\n <div class=\"c-header__wrapper\">\n <ng-content></ng-content>\n </div>\n</header>\n<div *ngIf=\"isOpen\">\n <ng-content select=\"[cuiAccordionItemContent]\"></ng-content>\n</div>\n", styles: [":host{padding:16px;display:flex;flex-direction:column;gap:8px;background:var(--cui-base-10);border-radius:8px}.c-header{font-weight:400;font-size:12px;line-height:14px;display:flex;align-items:center;gap:8px;color:var(--cui-base-900);font-family:var(--cui-main-font);text-transform:uppercase}.c-header__wrapper{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
231
+ }
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAccordionItemComponent, decorators: [{
233
+ type: Component,
234
+ args: [{ selector: 'cui-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"c-header\">\n <button\n cuiButton\n appearance=\"ghost\"\n size=\"xxs\"\n [icon]=\"buttonIcon\"\n (click)=\"onRowToggle()\"\n ></button>\n <div class=\"c-header__wrapper\">\n <ng-content></ng-content>\n </div>\n</header>\n<div *ngIf=\"isOpen\">\n <ng-content select=\"[cuiAccordionItemContent]\"></ng-content>\n</div>\n", styles: [":host{padding:16px;display:flex;flex-direction:column;gap:8px;background:var(--cui-base-10);border-radius:8px}.c-header{font-weight:400;font-size:12px;line-height:14px;display:flex;align-items:center;gap:8px;color:var(--cui-base-900);font-family:var(--cui-main-font);text-transform:uppercase}.c-header__wrapper{width:100%}\n"] }]
235
+ }], propDecorators: { isOpen: [{
236
+ type: Input
237
+ }], isOpenChange: [{
238
+ type: Output
239
+ }] } });
240
+
241
+ class CuiSvgModule {
242
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSvgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
243
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiSvgModule, declarations: [CuiSvgComponent], imports: [CommonModule], exports: [CuiSvgComponent] }); }
244
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSvgModule, imports: [CommonModule] }); }
245
+ }
246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSvgModule, decorators: [{
247
+ type: NgModule,
248
+ args: [{
249
+ imports: [CommonModule],
250
+ declarations: [CuiSvgComponent],
251
+ exports: [CuiSvgComponent]
252
+ }]
253
+ }] });
254
+
255
+ class CuiButtonModule {
256
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
257
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonModule, declarations: [CuiButtonComponent], imports: [CommonModule,
258
+ CuiSvgModule], exports: [CuiButtonComponent] }); }
259
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonModule, imports: [CommonModule,
260
+ CuiSvgModule] }); }
261
+ }
262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonModule, decorators: [{
263
+ type: NgModule,
264
+ args: [{
265
+ imports: [
266
+ CommonModule,
267
+ CuiSvgModule
268
+ ],
269
+ declarations: [CuiButtonComponent],
270
+ exports: [CuiButtonComponent]
271
+ }]
272
+ }] });
273
+
274
+ class CuiAccordionModule {
275
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
276
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiAccordionModule, declarations: [CuiAccordionComponent,
277
+ CuiAccordionItemComponent], imports: [CommonModule,
278
+ CuiSvgModule,
279
+ CuiButtonModule], exports: [CuiAccordionComponent,
280
+ CuiAccordionItemComponent] }); }
281
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAccordionModule, imports: [CommonModule,
282
+ CuiSvgModule,
283
+ CuiButtonModule] }); }
284
+ }
285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAccordionModule, decorators: [{
286
+ type: NgModule,
287
+ args: [{
288
+ imports: [
289
+ CommonModule,
290
+ CuiSvgModule,
291
+ CuiButtonModule,
292
+ ],
293
+ declarations: [
294
+ CuiAccordionComponent,
295
+ CuiAccordionItemComponent
296
+ ],
297
+ exports: [
298
+ CuiAccordionComponent,
299
+ CuiAccordionItemComponent
300
+ ]
301
+ }]
302
+ }] });
303
+
304
+ const CUI_NOTIFICATION_DEFAULT_OPTIONS = {
305
+ status: 'info',
306
+ mode: 'default'
307
+ };
308
+ const CUI_NOTIFICATION_OPTIONS = cuiCreateToken(CUI_NOTIFICATION_DEFAULT_OPTIONS);
309
+ const CUI_NOTIFICATION_ICONS = {
310
+ info: {
311
+ icon: 'cuiIconInfo'
312
+ },
313
+ success: {
314
+ icon: 'cuiIconCheckCircle'
315
+ },
316
+ alert: {
317
+ icon: 'cuiIconAlertTriangle'
318
+ },
319
+ error: {
320
+ icon: 'cuiIconXCircle'
321
+ },
322
+ };
323
+ const CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE = {
324
+ info: {
325
+ color: 'var(--c-info-icon-color)'
326
+ },
327
+ success: {
328
+ color: 'var(--cui-green-500)'
329
+ },
330
+ alert: {
331
+ color: 'var(--cui-yellow-400)'
332
+ },
333
+ error: {
334
+ color: 'var(--cui-danger)'
335
+ },
336
+ };
337
+ const CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE = {
338
+ info: {
339
+ color: 'var(--cui-info)'
340
+ },
341
+ success: {
342
+ color: 'var(--cui-green-700)'
343
+ },
344
+ alert: {
345
+ color: 'var(--cui-yellow-400)'
346
+ },
347
+ error: {
348
+ color: 'var(--cui-danger)'
349
+ },
350
+ };
351
+ const CUI_NOTIFICATION_ICON_OPTIONS = {
352
+ default: CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE,
353
+ light: CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE
354
+ };
355
+
356
+ class CuiNotificationComponent {
357
+ constructor() {
358
+ this.cuiNotificationOptions = inject(CUI_NOTIFICATION_OPTIONS);
359
+ this.ICONS = CUI_NOTIFICATION_ICONS;
360
+ this.ICON_OPTIONS = CUI_NOTIFICATION_ICON_OPTIONS;
361
+ this.status = this.cuiNotificationOptions.status;
362
+ this.mode = this.cuiNotificationOptions.mode;
363
+ this.isCloseable = false;
364
+ this.closed = new EventEmitter();
365
+ }
366
+ ngOnInit() {
367
+ this.initIconOptions();
368
+ }
369
+ onClose() {
370
+ this.closed.next();
371
+ }
372
+ initIconOptions() {
373
+ this.iconOptions = this.ICON_OPTIONS[this.mode];
374
+ }
375
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
376
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiNotificationComponent, selector: "cui-notification", inputs: { status: "status", mode: "mode", isCloseable: "isCloseable" }, outputs: { closed: "closed" }, host: { properties: { "attr.data-status": "this.status", "attr.data-mode": "this.mode" } }, ngImport: i0, template: "<cui-svg\n class=\"c-icon\"\n [icon]=\"ICONS[status].icon\"\n [color]=\"iconOptions[status].color\"\n></cui-svg>\n<div class=\"c-content\">\n <ng-content></ng-content>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n icon=\"cuiIconX\"\n color=\"var(--cui-gray-0)\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-blue-600);padding:16px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:flex-start;border-radius:12px;background:var(--cui-gray-800);color:var(--cui-gray-0);font-family:var(--cui-main-font)}:host[data-mode=light]{padding:15px;border:1px solid;color:var(--cui-base-900)}:host[data-mode=light][data-status=info]{border-color:var(--cui-info);background:var(--cui-badge-info-bg)}:host[data-mode=light][data-status=success]{border-color:var(--cui-green-700);background:var(--cui-badge-success-bg)}:host[data-mode=light][data-status=alert]{border-color:var(--cui-yellow-400);background:var(--cui-badge-warning-bg)}:host[data-mode=light][data-status=error]{border-color:var(--cui-danger);background:var(--cui-badge-danger-bg)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400)}:host-context([cuiTheme=dark])[data-status=info]{background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}.c-content{flex:1;margin-left:12px;margin-right:16px;margin-top:5px;overflow-wrap:anywhere}.c-icon{margin-top:6px}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:#fff3}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
377
+ }
378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiNotificationComponent, decorators: [{
379
+ type: Component,
380
+ args: [{ selector: 'cui-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n class=\"c-icon\"\n [icon]=\"ICONS[status].icon\"\n [color]=\"iconOptions[status].color\"\n></cui-svg>\n<div class=\"c-content\">\n <ng-content></ng-content>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n icon=\"cuiIconX\"\n color=\"var(--cui-gray-0)\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-blue-600);padding:16px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:flex-start;border-radius:12px;background:var(--cui-gray-800);color:var(--cui-gray-0);font-family:var(--cui-main-font)}:host[data-mode=light]{padding:15px;border:1px solid;color:var(--cui-base-900)}:host[data-mode=light][data-status=info]{border-color:var(--cui-info);background:var(--cui-badge-info-bg)}:host[data-mode=light][data-status=success]{border-color:var(--cui-green-700);background:var(--cui-badge-success-bg)}:host[data-mode=light][data-status=alert]{border-color:var(--cui-yellow-400);background:var(--cui-badge-warning-bg)}:host[data-mode=light][data-status=error]{border-color:var(--cui-danger);background:var(--cui-badge-danger-bg)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400)}:host-context([cuiTheme=dark])[data-status=info]{background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}.c-content{flex:1;margin-left:12px;margin-right:16px;margin-top:5px;overflow-wrap:anywhere}.c-icon{margin-top:6px}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:#fff3}\n"] }]
381
+ }], propDecorators: { status: [{
382
+ type: Input
383
+ }, {
384
+ type: HostBinding,
385
+ args: ['attr.data-status']
386
+ }], mode: [{
387
+ type: Input
388
+ }, {
389
+ type: HostBinding,
390
+ args: ['attr.data-mode']
391
+ }], isCloseable: [{
392
+ type: Input
393
+ }], closed: [{
394
+ type: Output
395
+ }] } });
396
+
397
+ class CuiNotificationModule {
398
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
399
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiNotificationModule, declarations: [CuiNotificationComponent], imports: [CommonModule,
400
+ CuiSvgModule], exports: [CuiNotificationComponent] }); }
401
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiNotificationModule, imports: [CommonModule,
402
+ CuiSvgModule] }); }
403
+ }
404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiNotificationModule, decorators: [{
405
+ type: NgModule,
406
+ args: [{
407
+ imports: [
408
+ CommonModule,
409
+ CuiSvgModule
410
+ ],
411
+ declarations: [CuiNotificationComponent],
412
+ exports: [CuiNotificationComponent]
413
+ }]
414
+ }] });
415
+
416
+ const CUI_ALERTS = cuiCreateToken(new BehaviorSubject([]));
417
+ const CUI_ALERT_DEFAULT_OPTIONS = {
418
+ label: '',
419
+ needAutoClose: true,
420
+ isCloseable: true,
421
+ mode: 'default',
422
+ position: 'right',
423
+ resizing: 'fixed'
424
+ };
425
+ const CUI_ALERT_OPTIONS = cuiCreateTokenFromFactory(() => ({
426
+ ...CUI_ALERT_DEFAULT_OPTIONS,
427
+ ...inject(CUI_NOTIFICATION_OPTIONS)
428
+ }));
429
+ const CUI_ALERT_CONTEXT = new InjectionToken('');
430
+
431
+ class CuiAlertComponent {
432
+ constructor() {
433
+ this.context = inject(CUI_ALERT_CONTEXT);
434
+ this.AUTO_CLOSE_DURATION_IN_MILLISECONDS = 3000;
435
+ }
436
+ get resizing() {
437
+ return this.context.resizing;
438
+ }
439
+ ngOnInit() {
440
+ this.initAutoClose();
441
+ }
442
+ onClosed() {
443
+ this.context.$implicit.complete();
444
+ }
445
+ initAutoClose() {
446
+ if (!this.context.needAutoClose) {
447
+ return;
448
+ }
449
+ setTimeout(this.onClosed.bind(this), this.AUTO_CLOSE_DURATION_IN_MILLISECONDS);
450
+ }
451
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
452
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiAlertComponent, selector: "cui-alert", host: { properties: { "attr.data-resizing": "this.resizing" } }, ngImport: i0, template: "<cui-notification\n [status]=\"context.status\"\n [mode]=\"context.mode\"\n [isCloseable]=\"context.isCloseable\"\n (closed)=\"onClosed()\"\n>\n <h2\n *ngIf=\"context.label\"\n class=\"c-heading\"\n >\n {{ context.label }}\n </h2>\n {{ context.content }}\n</cui-notification>\n", styles: [":host{font-weight:400;font-size:14px;line-height:20px;max-width:470px}:host[data-resizing=hug]{width:-moz-fit-content;width:fit-content}:host[data-resizing=fixed]{width:470px}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0 0 8px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiNotificationComponent, selector: "cui-notification", inputs: ["status", "mode", "isCloseable"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
453
+ }
454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertComponent, decorators: [{
455
+ type: Component,
456
+ args: [{ selector: 'cui-alert', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-notification\n [status]=\"context.status\"\n [mode]=\"context.mode\"\n [isCloseable]=\"context.isCloseable\"\n (closed)=\"onClosed()\"\n>\n <h2\n *ngIf=\"context.label\"\n class=\"c-heading\"\n >\n {{ context.label }}\n </h2>\n {{ context.content }}\n</cui-notification>\n", styles: [":host{font-weight:400;font-size:14px;line-height:20px;max-width:470px}:host[data-resizing=hug]{width:-moz-fit-content;width:fit-content}:host[data-resizing=fixed]{width:470px}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0 0 8px}\n"] }]
457
+ }], propDecorators: { resizing: [{
458
+ type: HostBinding,
459
+ args: ['attr.data-resizing']
460
+ }] } });
461
+
462
+ class CuiAlertsComponent {
463
+ constructor() {
464
+ this.destroy$ = inject(CuiDestroyService, { self: true });
465
+ this.alerts$ = inject(CUI_ALERTS);
466
+ }
467
+ ngOnInit() {
468
+ this.initAlertInjectorsSubscription();
469
+ }
470
+ trackByFn(_, alert) {
471
+ return alert.id;
472
+ }
473
+ alertsMatcher(alert, position) {
474
+ return alert.position === position;
475
+ }
476
+ initAlertInjectorsSubscription() {
477
+ this.alerts$
478
+ .pipe(takeUntil(this.destroy$))
479
+ .subscribe(dialogs => this.alertInjectors = dialogs.map(useValue => Injector.create({
480
+ providers: [{ provide: CUI_ALERT_CONTEXT, useValue }]
481
+ })));
482
+ }
483
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
484
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiAlertsComponent, selector: "cui-alerts", providers: [CuiDestroyService], ngImport: i0, template: "<ng-container *cuiLet=\"alerts$ | async as alerts\">\n <div class=\"c-wrapper c-wrapper_position_center\">\n <ng-container *ngFor=\"let alert of alerts! | cuiFilter: alertsMatcher: 'center'; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"alert.component; injector: alertInjectors[i]\" />\n </ng-container>\n </div>\n <div class=\"c-wrapper c-wrapper_position_right\">\n <ng-container *ngFor=\"let alert of alerts! | cuiFilter: alertsMatcher: 'right'; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"alert.component; injector: alertInjectors[i]\" />\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;position:fixed;right:20px;bottom:20px}.c-wrapper{position:fixed;bottom:20px;display:flex;flex-direction:column;gap:16px;pointer-events:none}.c-wrapper_position_center{align-items:center;left:50%;transform:translate(-50%)}.c-wrapper_position_right{align-items:flex-end;right:20px}.c-wrapper ::ng-deep>*{pointer-events:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.CuiFilterPipe, name: "cuiFilter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
485
+ }
486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertsComponent, decorators: [{
487
+ type: Component,
488
+ args: [{ selector: 'cui-alerts', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<ng-container *cuiLet=\"alerts$ | async as alerts\">\n <div class=\"c-wrapper c-wrapper_position_center\">\n <ng-container *ngFor=\"let alert of alerts! | cuiFilter: alertsMatcher: 'center'; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"alert.component; injector: alertInjectors[i]\" />\n </ng-container>\n </div>\n <div class=\"c-wrapper c-wrapper_position_right\">\n <ng-container *ngFor=\"let alert of alerts! | cuiFilter: alertsMatcher: 'right'; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"alert.component; injector: alertInjectors[i]\" />\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;position:fixed;right:20px;bottom:20px}.c-wrapper{position:fixed;bottom:20px;display:flex;flex-direction:column;gap:16px;pointer-events:none}.c-wrapper_position_center{align-items:center;left:50%;transform:translate(-50%)}.c-wrapper_position_right{align-items:flex-end;right:20px}.c-wrapper ::ng-deep>*{pointer-events:auto}\n"] }]
489
+ }] });
490
+
491
+ class CuiAlertModule {
492
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
493
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertModule, declarations: [CuiAlertComponent,
494
+ CuiAlertsComponent], imports: [CommonModule,
495
+ CuiFilterPipe,
496
+ CuiNotificationModule,
497
+ CuiLetDirective], exports: [CuiAlertComponent,
498
+ CuiAlertComponent,
499
+ CuiAlertsComponent] }); }
500
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertModule, imports: [CommonModule,
501
+ CuiNotificationModule] }); }
502
+ }
503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertModule, decorators: [{
504
+ type: NgModule,
505
+ args: [{
506
+ imports: [
507
+ CommonModule,
508
+ CuiFilterPipe,
509
+ CuiNotificationModule,
510
+ CuiLetDirective
511
+ ],
512
+ declarations: [
513
+ CuiAlertComponent,
514
+ CuiAlertsComponent
515
+ ],
516
+ exports: [
517
+ CuiAlertComponent,
518
+ CuiAlertComponent,
519
+ CuiAlertsComponent
520
+ ]
521
+ }]
522
+ }] });
523
+
524
+ class CuiAlertService extends CuiPopoverService {
525
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
526
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertService, providedIn: 'root', useFactory: () => new CuiAlertService(CUI_ALERTS, CuiAlertComponent, inject(CUI_ALERT_OPTIONS)) }); }
527
+ }
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiAlertService, decorators: [{
529
+ type: Injectable,
530
+ args: [{
531
+ providedIn: 'root',
532
+ useFactory: () => new CuiAlertService(CUI_ALERTS, CuiAlertComponent, inject(CUI_ALERT_OPTIONS))
533
+ }]
534
+ }] });
535
+
536
+ const CUI_BADGE_DEFAULT_OPTIONS = {
537
+ color: 'light-blue',
538
+ size: 'sm',
539
+ isWithDot: false
540
+ };
541
+ const CUI_BADGE_OPTIONS = cuiCreateToken(CUI_BADGE_DEFAULT_OPTIONS);
542
+
543
+ class CuiBadgeComponent {
544
+ constructor() {
545
+ this.options = inject(CUI_BADGE_OPTIONS);
546
+ this.color = this.options.color;
547
+ this.size = this.options.size;
548
+ this.isWithDot = this.options.isWithDot;
549
+ }
550
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
551
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiBadgeComponent, selector: "cui-badge", inputs: { color: "color", size: "size", isWithDot: "isWithDot" }, host: { properties: { "attr.data-color": "this.color", "attr.data-size": "this.size" } }, ngImport: i0, template: "<span\n *ngIf=\"isWithDot\"\n class=\"c-dots\"\n></span>\n<ng-content />", styles: [":host{padding-top:2px;padding-bottom:2px;display:inline-flex;align-items:center;gap:4px;flex-shrink:0;border-radius:25px;color:var(--cui-gray-900);font-family:var(--cui-main-font)}:host[data-color=light-blue]{color:var(--cui-badge-info-label);background:var(--cui-badge-info-bg)}:host[data-color=light-blue] .c-dots{background:var(--cui-info)}:host[data-color=yellow]{color:var(--cui-badge-warning-label);background:var(--cui-badge-warning-bg)}:host[data-color=yellow] .c-dots{background:var(--cui-warning)}:host[data-color=green]{color:var(--cui-badge-success-label);background:var(--cui-badge-success-bg)}:host[data-color=green] .c-dots{background:var(--cui-success)}:host[data-color=gray]{color:var(--cui-badge-gray-label);background:var(--cui-badge-gray-bg)}:host[data-color=gray] .c-dots{background:var(--cui-base-500)}:host[data-color=dark-gray]{color:var(--cui-base-900);background:var(--cui-base-200)}:host[data-color=dark-gray] .c-dots{background:var(--cui-base-500)}:host[data-color=red]{color:var(--cui-badge-danger-label);background:var(--cui-badge-danger-bg)}:host[data-color=red] .c-dots{background:var(--cui-danger)}:host[data-color=violet]{color:var(--cui-badge-violet-label);background:var(--cui-badge-violet-bg);outline:1px solid var(--cui-violet-400);outline-offset:-1px}:host[data-color=violet] .c-dots{background:var(--cui-violet-400)}:host[data-size=sm]{font-size:12px;line-height:14px;padding-right:6px;padding-left:6px}:host[data-size=md]{font-size:14px;line-height:20px;padding-right:8px;padding-left:8px}.c-dots{width:6px;height:6px;border-radius:50%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
552
+ }
553
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBadgeComponent, decorators: [{
554
+ type: Component,
555
+ args: [{ selector: 'cui-badge', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n *ngIf=\"isWithDot\"\n class=\"c-dots\"\n></span>\n<ng-content />", styles: [":host{padding-top:2px;padding-bottom:2px;display:inline-flex;align-items:center;gap:4px;flex-shrink:0;border-radius:25px;color:var(--cui-gray-900);font-family:var(--cui-main-font)}:host[data-color=light-blue]{color:var(--cui-badge-info-label);background:var(--cui-badge-info-bg)}:host[data-color=light-blue] .c-dots{background:var(--cui-info)}:host[data-color=yellow]{color:var(--cui-badge-warning-label);background:var(--cui-badge-warning-bg)}:host[data-color=yellow] .c-dots{background:var(--cui-warning)}:host[data-color=green]{color:var(--cui-badge-success-label);background:var(--cui-badge-success-bg)}:host[data-color=green] .c-dots{background:var(--cui-success)}:host[data-color=gray]{color:var(--cui-badge-gray-label);background:var(--cui-badge-gray-bg)}:host[data-color=gray] .c-dots{background:var(--cui-base-500)}:host[data-color=dark-gray]{color:var(--cui-base-900);background:var(--cui-base-200)}:host[data-color=dark-gray] .c-dots{background:var(--cui-base-500)}:host[data-color=red]{color:var(--cui-badge-danger-label);background:var(--cui-badge-danger-bg)}:host[data-color=red] .c-dots{background:var(--cui-danger)}:host[data-color=violet]{color:var(--cui-badge-violet-label);background:var(--cui-badge-violet-bg);outline:1px solid var(--cui-violet-400);outline-offset:-1px}:host[data-color=violet] .c-dots{background:var(--cui-violet-400)}:host[data-size=sm]{font-size:12px;line-height:14px;padding-right:6px;padding-left:6px}:host[data-size=md]{font-size:14px;line-height:20px;padding-right:8px;padding-left:8px}.c-dots{width:6px;height:6px;border-radius:50%}\n"] }]
556
+ }], propDecorators: { color: [{
557
+ type: Input
558
+ }, {
559
+ type: HostBinding,
560
+ args: ['attr.data-color']
561
+ }], size: [{
562
+ type: Input
563
+ }, {
564
+ type: HostBinding,
565
+ args: ['attr.data-size']
566
+ }], isWithDot: [{
567
+ type: Input
568
+ }] } });
569
+
570
+ class CuiBadgeModule {
571
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
572
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiBadgeModule, declarations: [CuiBadgeComponent], imports: [CommonModule], exports: [CuiBadgeComponent] }); }
573
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBadgeModule, imports: [CommonModule] }); }
574
+ }
575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBadgeModule, decorators: [{
576
+ type: NgModule,
577
+ args: [{
578
+ imports: [CommonModule],
579
+ declarations: [CuiBadgeComponent],
580
+ exports: [CuiBadgeComponent]
581
+ }]
582
+ }] });
583
+
584
+ const CUI_BANNER_DEFAULT_OPTIONS = {
585
+ status: 'info'
586
+ };
587
+ const CUI_BANNER_OPTIONS = cuiCreateToken(CUI_BANNER_DEFAULT_OPTIONS);
588
+
589
+ class CuiAccessor {
590
+ }
591
+ class CuiPositionAccessor extends CuiAccessor {
592
+ }
593
+ class CuiRectAccessor extends CuiAccessor {
594
+ }
595
+ function cuiProvideAccessor(provide, type, fallback) {
596
+ return {
597
+ provide,
598
+ deps: [[new SkipSelf(), new Optional(), provide], fallback],
599
+ useFactory: cuiFallbackAccessor(type),
600
+ };
601
+ }
602
+ function cuiFallbackAccessor(type) {
603
+ return (accessors, fallback) => accessors?.find?.((accessor) => accessor !== fallback && accessor.type === type) || fallback;
604
+ }
605
+ function cuiPositionAccessorFor(type, fallback) {
606
+ return cuiProvideAccessor(CuiPositionAccessor, type, fallback);
607
+ }
608
+ function cuiRectAccessorFor(type, fallback) {
609
+ return cuiProvideAccessor(CuiRectAccessor, type, fallback);
610
+ }
611
+ function cuiAsPositionAccessor(accessor) {
612
+ return cuiProvide(CuiPositionAccessor, accessor, true);
613
+ }
614
+ function cuiAsRectAccessor(accessor) {
615
+ return cuiProvide(CuiRectAccessor, accessor, true);
616
+ }
617
+
618
+ class CuiVehicle {
619
+ }
620
+ function cuiAsVehicle(vehicle) {
621
+ return cuiProvide(CuiVehicle, vehicle, true);
622
+ }
623
+
624
+ class CuiDriver extends Observable {
625
+ }
626
+ function cuiAsDriver(driver) {
627
+ return cuiProvide(CuiDriver, driver, true);
628
+ }
629
+ class CuiDriverDirective {
630
+ constructor() {
631
+ this.destroyRef = inject(DestroyRef);
632
+ this.drivers = inject(CuiDriver, { self: true, optional: true }) || [];
633
+ this.vehicles = inject(CuiVehicle, {
634
+ self: true,
635
+ optional: true,
636
+ });
637
+ }
638
+ ngAfterViewInit() {
639
+ const vehicle = this.vehicles?.find(({ type }) => type === this.type);
640
+ merge(...this.drivers.filter(({ type }) => type === this.type))
641
+ .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
642
+ .subscribe((value) => {
643
+ vehicle?.toggle(value);
644
+ });
645
+ }
646
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDriverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
647
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiDriverDirective, ngImport: i0 }); }
648
+ }
649
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDriverDirective, decorators: [{
650
+ type: Directive
651
+ }] });
652
+
653
+ class CuiPositionService extends Observable {
654
+ constructor() {
655
+ const animationFrame$ = inject(CUI_ANIMATION_FRAME);
656
+ const zone = inject(NgZone);
657
+ super((subscriber) => animationFrame$
658
+ .pipe(startWith(null), map(() => this.accessor.getPosition(this.el.getBoundingClientRect(), this.el)), cuiZonefree(zone), finalize(() => this.accessor.getPosition(EMPTY_CLIENT_RECT)))
659
+ .subscribe(subscriber));
660
+ this.el = cuiInjectElement();
661
+ this.accessor = inject(CuiPositionAccessor);
662
+ }
663
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiPositionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
664
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiPositionService }); }
665
+ }
666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiPositionService, decorators: [{
667
+ type: Injectable
668
+ }], ctorParameters: function () { return []; } });
669
+
670
+ const CUI_THEME_STORAGE_DEFAULT_KEY = 'cuiTheme';
671
+ const CUI_DEFAULT_THEME = 'light';
672
+ const CUI_THEME_STORAGE_KEY = cuiCreateToken(CUI_THEME_STORAGE_DEFAULT_KEY);
673
+ const CUI_THEME = cuiCreateToken(CUI_DEFAULT_THEME);
674
+
675
+ class CuiThemeService extends BehaviorSubject {
676
+ constructor() {
677
+ super(inject(CUI_LOCAL_STORAGE).getItem(inject(CUI_THEME_STORAGE_KEY))
678
+ ?? inject(CUI_THEME));
679
+ this.localStorage = inject(CUI_LOCAL_STORAGE);
680
+ this.key = inject(CUI_THEME_STORAGE_KEY);
681
+ }
682
+ next(theme) {
683
+ this.localStorage.setItem(this.key, theme);
684
+ super.next(theme);
685
+ }
686
+ // При работе только двух тем
687
+ switch() {
688
+ this.next(this.value === 'light' ? 'dark' : 'light');
689
+ }
690
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
691
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiThemeService, providedIn: 'root' }); }
692
+ }
693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiThemeService, decorators: [{
694
+ type: Injectable,
695
+ args: [{
696
+ providedIn: 'root'
697
+ }]
698
+ }], ctorParameters: function () { return []; } });
699
+
700
+ class CuiVisualViewportService {
701
+ constructor() {
702
+ this.isWebkit = inject(CUI_IS_WEBKIT);
703
+ this.win = inject(CUI_WINDOW);
704
+ }
705
+ // https://bugs.webkit.org/show_bug.cgi?id=207089
706
+ correct(point) {
707
+ return this.isWebkit
708
+ ? [
709
+ point[0] + (this.win.visualViewport?.offsetTop ?? 0),
710
+ point[1] + (this.win.visualViewport?.offsetLeft ?? 0),
711
+ ]
712
+ : point;
713
+ }
714
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiVisualViewportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
715
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiVisualViewportService, providedIn: 'root' }); }
716
+ }
717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiVisualViewportService, decorators: [{
718
+ type: Injectable,
719
+ args: [{
720
+ providedIn: 'root',
721
+ }]
722
+ }] });
723
+
724
+ class CuiBannerComponent {
725
+ constructor() {
726
+ this.options = inject(CUI_BANNER_OPTIONS);
727
+ this.theme$ = inject(CuiThemeService);
728
+ this.ICON_OPTIONS = {
729
+ info: {
730
+ icon: 'cuiIconInfo',
731
+ color: 'var(--c-info-icon-color)'
732
+ },
733
+ success: {
734
+ icon: 'cuiIconCheckCircle',
735
+ color: 'var(--cui-success)'
736
+ },
737
+ alert: {
738
+ icon: 'cuiIconAlertTriangle',
739
+ color: 'var(--c-alert-icon-color)'
740
+ },
741
+ error: {
742
+ icon: 'cuiIconAlertCircle',
743
+ color: 'var(--cui-danger)'
744
+ },
745
+ };
746
+ this.THEME_CLOSE_BUTTON_ICON_COLORS = {
747
+ light: 'var(--cui-gray-500)',
748
+ dark: 'var(--cui-gray-0)'
749
+ };
750
+ this.status = this.options.status;
751
+ this.isCloseable = true;
752
+ this.actionButtonClicked = new EventEmitter();
753
+ this.closed = new EventEmitter();
754
+ }
755
+ onAction() {
756
+ this.actionButtonClicked.emit();
757
+ }
758
+ onClose() {
759
+ this.closed.emit();
760
+ }
761
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
762
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiBannerComponent, selector: "cui-banner", inputs: { status: "status", isCloseable: "isCloseable", label: "label", actionButtonText: "actionButtonText" }, outputs: { actionButtonClicked: "actionButtonClicked", closed: "closed" }, host: { properties: { "attr.data-status": "this.status" } }, ngImport: i0, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:#fff3}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
763
+ }
764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBannerComponent, decorators: [{
765
+ type: Component,
766
+ args: [{ selector: 'cui-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.color\"\n class=\"c-icon\"\n></cui-svg>\n<div class=\"c-wrapper\">\n <h2\n *ngIf=\"label\"\n class=\"c-heading\"\n >\n {{ label }}\n </h2>\n <ng-content></ng-content>\n <button\n cuiButton\n *ngIf=\"actionButtonText\"\n appearance=\"link\"\n class=\"c-action\"\n (click)=\"onAction()\"\n >\n {{ actionButtonText }}\n </button>\n</div>\n<button\n *ngIf=\"isCloseable\"\n class=\"c-button\"\n (click)=\"onClose()\"\n>\n <cui-svg\n *cuiLet=\"theme$ | async as theme\"\n icon=\"cuiIconX\"\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\n />\n</button>\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:8px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;gap:16px;align-items:center;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host[data-status=info]{color:var(--cui-light-blue-800);background:var(--cui-blue-50)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=alert]{color:var(--cui-orange-800);background:var(--cui-yellow-100)}:host[data-status=error]{background:var(--cui-red-50)}:host-context([cuiTheme=dark]){--c-info-icon-color: var(--cui-light-blue-400);--c-alert-icon-color: var(--cui-yellow-300);color:var(--cui-gray-0)}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-400);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=info] .c-action:hover{color:var(--cui-blue-500)}:host-context([cuiTheme=dark])[data-status=success]{background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=success] .c-action{color:var(--cui-green-500)}:host-context([cuiTheme=dark])[data-status=alert]{background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=alert] .c-action{color:var(--cui-yellow-300)}:host-context([cuiTheme=dark])[data-status=error]{background:var(--cui-red-900)}:host-context([cuiTheme=dark])[data-status=error] .c-action{color:var(--cui-red-400)}.c-icon{height:28px}.c-wrapper{flex:1;display:flex;align-items:center;gap:16px;overflow-wrap:anywhere}.c-heading{font-weight:500;font-size:14px;line-height:20px;margin:0}.c-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}.c-button:hover{background:#fff3}\n"] }]
767
+ }], propDecorators: { status: [{
768
+ type: Input
769
+ }, {
770
+ type: HostBinding,
771
+ args: ['attr.data-status']
772
+ }], isCloseable: [{
773
+ type: Input
774
+ }], label: [{
775
+ type: Input
776
+ }], actionButtonText: [{
777
+ type: Input
778
+ }], actionButtonClicked: [{
779
+ type: Output
780
+ }], closed: [{
781
+ type: Output
782
+ }] } });
783
+
784
+ class CuiBannerModule {
785
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBannerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
786
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiBannerModule, declarations: [CuiBannerComponent], imports: [CommonModule,
787
+ CuiLetDirective,
788
+ CuiSvgModule,
789
+ CuiButtonModule], exports: [CuiBannerComponent] }); }
790
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBannerModule, imports: [CommonModule,
791
+ CuiSvgModule,
792
+ CuiButtonModule] }); }
793
+ }
794
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBannerModule, decorators: [{
795
+ type: NgModule,
796
+ args: [{
797
+ imports: [
798
+ CommonModule,
799
+ CuiLetDirective,
800
+ CuiSvgModule,
801
+ CuiButtonModule
802
+ ],
803
+ declarations: [CuiBannerComponent],
804
+ exports: [CuiBannerComponent]
805
+ }]
806
+ }] });
807
+
808
+ class CuiBreadcrumbsComponent {
809
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
810
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiBreadcrumbsComponent, selector: "cui-breadcrumbs", queries: [{ propertyName: "breadcrumbs", predicate: CuiItemDirective, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"breadcrumbs.changes | async\"/>\n<ng-container *ngFor=\"let breadcrumb of breadcrumbs; let isLast = last\">\n <ng-container *ngTemplateOutlet=\"breadcrumb\" />\n <cui-svg\n *ngIf=\"!isLast\"\n icon=\"cuiIconSlashDivider\"\n color=\"var(--cui-base-500)\"\n />\n</ng-container>\n", styles: [":host{display:flex;align-items:center;flex-wrap:wrap;gap:2px}\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: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
811
+ }
812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBreadcrumbsComponent, decorators: [{
813
+ type: Component,
814
+ args: [{ selector: 'cui-breadcrumbs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"breadcrumbs.changes | async\"/>\n<ng-container *ngFor=\"let breadcrumb of breadcrumbs; let isLast = last\">\n <ng-container *ngTemplateOutlet=\"breadcrumb\" />\n <cui-svg\n *ngIf=\"!isLast\"\n icon=\"cuiIconSlashDivider\"\n color=\"var(--cui-base-500)\"\n />\n</ng-container>\n", styles: [":host{display:flex;align-items:center;flex-wrap:wrap;gap:2px}\n"] }]
815
+ }], propDecorators: { breadcrumbs: [{
816
+ type: ContentChildren,
817
+ args: [CuiItemDirective, { read: TemplateRef }]
818
+ }] } });
819
+
820
+ class CuiBreadcrumbComponent {
821
+ constructor() {
822
+ this.isLast = false;
823
+ }
824
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
825
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiBreadcrumbComponent, selector: "[cuiBreadcrumb]", inputs: { isLast: "isLast" }, ngImport: i0, template: "<ng-content />\n", styles: [":host{font-weight:400;font-size:12px;line-height:14px;cursor:pointer;color:var(--cui-base-500);font-family:var(--cui-main-font)}:host:hover{color:var(--cui-base-900);text-decoration:underline}:host:last-of-type{cursor:default;color:var(--cui-base-900);text-decoration:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
826
+ }
827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBreadcrumbComponent, decorators: [{
828
+ type: Component,
829
+ args: [{ selector: '[cuiBreadcrumb]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n", styles: [":host{font-weight:400;font-size:12px;line-height:14px;cursor:pointer;color:var(--cui-base-500);font-family:var(--cui-main-font)}:host:hover{color:var(--cui-base-900);text-decoration:underline}:host:last-of-type{cursor:default;color:var(--cui-base-900);text-decoration:none}\n"] }]
830
+ }], propDecorators: { isLast: [{
831
+ type: Input
832
+ }] } });
833
+
834
+ class CuiBreadcrumbsModule {
835
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBreadcrumbsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
836
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiBreadcrumbsModule, declarations: [CuiBreadcrumbsComponent,
837
+ CuiBreadcrumbComponent], imports: [CommonModule,
838
+ CuiSvgModule], exports: [CuiBreadcrumbsComponent,
839
+ CuiBreadcrumbComponent] }); }
840
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBreadcrumbsModule, imports: [CommonModule,
841
+ CuiSvgModule] }); }
842
+ }
843
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiBreadcrumbsModule, decorators: [{
844
+ type: NgModule,
845
+ args: [{
846
+ imports: [
847
+ CommonModule,
848
+ CuiSvgModule
849
+ ],
850
+ declarations: [
851
+ CuiBreadcrumbsComponent,
852
+ CuiBreadcrumbComponent
853
+ ],
854
+ exports: [
855
+ CuiBreadcrumbsComponent,
856
+ CuiBreadcrumbComponent
857
+ ]
858
+ }]
859
+ }] });
860
+
861
+ class CuiButtonGroupComponent {
862
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
863
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiButtonGroupComponent, selector: "cui-button-group", ngImport: i0, template: "<ng-content select=\"button[cuiButton], a[cuiButton]\"></ng-content>\n", styles: [":host{display:inline-flex}:host ::ng-deep [cuiButton]:after{z-index:1;content:\"\";position:absolute;top:50%;right:-.5px;height:80%;width:1px;border-radius:.5px;transform:translateY(-50%);background:currentColor;opacity:.5}:host ::ng-deep [cuiButton]:first-child{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}:host ::ng-deep [cuiButton]:last-child{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}:host ::ng-deep [cuiButton]:last-child:after{content:none}:host ::ng-deep [cuiButton]:not(:first-child):not(:last-child){border-left:none;border-right:none;border-radius:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
864
+ }
865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonGroupComponent, decorators: [{
866
+ type: Component,
867
+ args: [{ selector: 'cui-button-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"button[cuiButton], a[cuiButton]\"></ng-content>\n", styles: [":host{display:inline-flex}:host ::ng-deep [cuiButton]:after{z-index:1;content:\"\";position:absolute;top:50%;right:-.5px;height:80%;width:1px;border-radius:.5px;transform:translateY(-50%);background:currentColor;opacity:.5}:host ::ng-deep [cuiButton]:first-child{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}:host ::ng-deep [cuiButton]:last-child{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}:host ::ng-deep [cuiButton]:last-child:after{content:none}:host ::ng-deep [cuiButton]:not(:first-child):not(:last-child){border-left:none;border-right:none;border-radius:0}\n"] }]
868
+ }] });
869
+
870
+ class CuiButtonGroupModule {
871
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
872
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonGroupModule, declarations: [CuiButtonGroupComponent], exports: [CuiButtonGroupComponent] }); }
873
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonGroupModule }); }
874
+ }
875
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiButtonGroupModule, decorators: [{
876
+ type: NgModule,
877
+ args: [{
878
+ declarations: [CuiButtonGroupComponent],
879
+ exports: [CuiButtonGroupComponent]
880
+ }]
881
+ }] });
882
+
883
+ class CuiCheckboxComponent {
884
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
885
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiCheckboxComponent, selector: "input[type=\"checkbox\"][cuiCheckbox]", ngImport: i0, template: '', isInline: true, styles: [":host{position:relative;width:16px;height:16px;border:1px solid var(--cui-base-200);border-radius:4px;outline:none;margin:0;appearance:none;cursor:pointer;background:var(--cui-base-0)}:host:before{content:\"\";position:absolute;transform:translate(-50%,-50%);top:50%;left:50%;width:12px;height:12px;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\"><path d=\"M10 3L4.5 8.5L2 6\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\"><path d=\"M10 3L4.5 8.5L2 6\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>')}:host:checked{border:none;background:var(--cui-info)}:host:checked:before{background:#fff}:host:focus{box-shadow:0 0 0 2px var(--cui-focus)}@media (hover: hover){:host:hover{border-color:var(--cui-base-400)}}:host:active{border-color:var(--cui-base-400);box-shadow:none}:host:disabled{cursor:not-allowed;border:1px solid var(--cui-base-200);background:var(--cui-base-100)}:host:disabled:checked:before{border:1px solid var(--cui-info);background:var(--cui-gray-500)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
886
+ }
887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiCheckboxComponent, decorators: [{
888
+ type: Component,
889
+ args: [{ selector: 'input[type="checkbox"][cuiCheckbox]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{position:relative;width:16px;height:16px;border:1px solid var(--cui-base-200);border-radius:4px;outline:none;margin:0;appearance:none;cursor:pointer;background:var(--cui-base-0)}:host:before{content:\"\";position:absolute;transform:translate(-50%,-50%);top:50%;left:50%;width:12px;height:12px;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\"><path d=\"M10 3L4.5 8.5L2 6\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\"><path d=\"M10 3L4.5 8.5L2 6\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>')}:host:checked{border:none;background:var(--cui-info)}:host:checked:before{background:#fff}:host:focus{box-shadow:0 0 0 2px var(--cui-focus)}@media (hover: hover){:host:hover{border-color:var(--cui-base-400)}}:host:active{border-color:var(--cui-base-400);box-shadow:none}:host:disabled{cursor:not-allowed;border:1px solid var(--cui-base-200);background:var(--cui-base-100)}:host:disabled:checked:before{border:1px solid var(--cui-info);background:var(--cui-gray-500)}\n"] }]
890
+ }] });
891
+
892
+ class CuiCheckboxModule {
893
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
894
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiCheckboxModule, declarations: [CuiCheckboxComponent], exports: [CuiCheckboxComponent] }); }
895
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiCheckboxModule }); }
896
+ }
897
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiCheckboxModule, decorators: [{
898
+ type: NgModule,
899
+ args: [{
900
+ declarations: [CuiCheckboxComponent],
901
+ exports: [CuiCheckboxComponent]
902
+ }]
903
+ }] });
904
+
905
+ const CUI_ROOT_SELECTOR = 'cui-root';
906
+
907
+ const CUI_DIALOGS = cuiCreateToken(new BehaviorSubject([]));
908
+ const CUI_DIALOG_DEFAULT_OPTIONS = {
909
+ size: 'auto',
910
+ data: undefined,
911
+ dismissible: true
912
+ };
913
+ const CUI_DIALOG_OPTIONS = cuiCreateToken(CUI_DIALOG_DEFAULT_OPTIONS);
914
+ const CUI_DIALOG_CONTEXT = new InjectionToken('');
915
+
916
+ class CuiDialogsComponent {
917
+ constructor() {
918
+ this.document = inject(DOCUMENT);
919
+ this.destroy$ = inject(CuiDestroyService, { self: true });
920
+ this.dialogs$ = inject(CUI_DIALOGS);
921
+ this.dialogInjectorCache = new Map();
922
+ }
923
+ ngOnInit() {
924
+ this.initDialogsSubscription();
925
+ }
926
+ trackByFn(_, dialog) {
927
+ return dialog.id;
928
+ }
929
+ initDialogsSubscription() {
930
+ this.dialogs$
931
+ .pipe(takeUntil(this.destroy$))
932
+ .subscribe(dialogs => {
933
+ this.document.body.style.overflow = dialogs.length ? 'hidden' : '';
934
+ this.dialogInjectors = dialogs.map(dialog => {
935
+ if (!this.dialogInjectorCache.has(dialog.id)) {
936
+ this.dialogInjectorCache.set(dialog.id, Injector.create({
937
+ providers: [{ provide: CUI_DIALOG_CONTEXT, useValue: dialog }],
938
+ parent: dialog.injector
939
+ }));
940
+ }
941
+ return this.dialogInjectorCache.get(dialog.id);
942
+ });
943
+ this.dialogInjectorCache.forEach((_, dialogId) => {
944
+ if (dialogs.find(dialog => dialog.id === dialogId)) {
945
+ return;
946
+ }
947
+ this.dialogInjectorCache.delete(dialogId);
948
+ });
949
+ });
950
+ }
951
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
952
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiDialogsComponent, selector: "cui-dialogs", providers: [CuiDestroyService], ngImport: i0, template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n</ng-container>\n", styles: [":host{isolation:isolate}.c-overlay{position:fixed;inset:0;background:var(--cui-base);opacity:.3}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { 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: i1$1.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
953
+ }
954
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogsComponent, decorators: [{
955
+ type: Component,
956
+ args: [{ selector: 'cui-dialogs', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n</ng-container>\n", styles: [":host{isolation:isolate}.c-overlay{position:fixed;inset:0;background:var(--cui-base);opacity:.3}\n"] }]
957
+ }] });
958
+
959
+ const TRANSITION = '{{duration}}ms ease-in-out';
960
+ const DURATION = { params: { duration: 300 } };
961
+ const STAGGER = 300;
962
+ /**
963
+ * Add to enable child :leave animation (fixes https://github.com/angular/angular/issues/15753)
964
+ */
965
+ const cuiParentAnimation = trigger('cuiParentAnimation', [
966
+ transition(':leave', [query(':scope > *', [animateChild()], { optional: true })]),
967
+ ]);
968
+ /**
969
+ * Add on parent to stop initial :enter animation for children
970
+ */
971
+ const cuiParentStop = trigger('cuiParentStop', [transition(':enter', [])]);
972
+ const cuiHost = trigger('cuiHost', [
973
+ transition(':enter', [
974
+ style({ overflow: 'clip' }),
975
+ query(':scope > *', [animateChild()], { optional: true }),
976
+ ]),
977
+ transition(':leave', [query(':scope > *', [animateChild()], { optional: true })]),
978
+ ]);
979
+ const cuiHeightCollapse = trigger('cuiHeightCollapse', [
980
+ transition(':enter', [style({ height: 0 }), animate(TRANSITION, style({ height: '*' }))], DURATION),
981
+ transition(':leave', [style({ height: '*' }), animate(TRANSITION, style({ height: 0 }))], DURATION),
982
+ ]);
983
+ const cuiHeightCollapseList = trigger('cuiHeightCollapseList', [
984
+ transition('* => *', [
985
+ query(':enter', [
986
+ style({ height: 0 }),
987
+ stagger(STAGGER, [animate(TRANSITION, style({ height: '*' }))]),
988
+ ], {
989
+ optional: true,
990
+ }),
991
+ query(':leave', [
992
+ style({ height: '*' }),
993
+ stagger(STAGGER, [animate(TRANSITION, style({ height: 0 }))]),
994
+ ], {
995
+ optional: true,
996
+ }),
997
+ ], DURATION),
998
+ ]);
999
+ const cuiWidthCollapse = trigger('cuiWidthCollapse', [
1000
+ transition(':enter', [style({ width: 0 }), animate(TRANSITION, style({ width: '*' }))], DURATION),
1001
+ transition(':leave', [style({ width: '*' }), animate(TRANSITION, style({ width: 0 }))], DURATION),
1002
+ ]);
1003
+ const cuiWidthCollapseList = trigger('cuiWidthCollapseList', [
1004
+ transition('* => *', [
1005
+ query(':enter', [
1006
+ style({ width: 0 }),
1007
+ stagger(STAGGER, [animate(TRANSITION, style({ width: '*' }))]),
1008
+ ], {
1009
+ optional: true,
1010
+ }),
1011
+ query(':leave', [
1012
+ style({ width: '*' }),
1013
+ stagger(STAGGER, [animate(TRANSITION, style({ width: 0 }))]),
1014
+ ], {
1015
+ optional: true,
1016
+ }),
1017
+ ], DURATION),
1018
+ ]);
1019
+ const cuiFadeIn = trigger('cuiFadeIn', [
1020
+ transition(':enter', [style({ opacity: 0 }), animate(TRANSITION, style({ opacity: 1 }))], DURATION),
1021
+ transition(':leave', [style({ opacity: 1 }), animate(TRANSITION, style({ opacity: 0 }))], DURATION),
1022
+ ]);
1023
+ const cuiFadeInList = trigger('cuiFadeInList', [
1024
+ transition('* => *', [
1025
+ query(':enter', [
1026
+ style({ opacity: 0 }),
1027
+ stagger(STAGGER, [animate(TRANSITION, style({ opacity: 1 }))]),
1028
+ ], {
1029
+ optional: true,
1030
+ }),
1031
+ query(':leave', [
1032
+ style({ opacity: 1 }),
1033
+ stagger(STAGGER, [animate(TRANSITION, style({ opacity: 0 }))]),
1034
+ ], {
1035
+ optional: true,
1036
+ }),
1037
+ ], DURATION),
1038
+ ]);
1039
+ const cuiFadeInTop = trigger('cuiFadeInTop', [
1040
+ transition(':enter', [
1041
+ style({ transform: 'translateY(-{{start}}px)', opacity: 0 }),
1042
+ animate(TRANSITION, style({ transform: 'translateY({{end}})', opacity: 1 })),
1043
+ ], { params: { end: 0, start: 10, duration: 300 } }),
1044
+ transition(':leave', [
1045
+ style({ transform: 'translateY({{end}})', opacity: 1 }),
1046
+ animate(TRANSITION, style({ transform: 'translateY(-{{start}}px)', opacity: 0 })),
1047
+ ], { params: { end: 0, start: 10, duration: 300 } }),
1048
+ ]);
1049
+ const cuiFadeInBottom = trigger('cuiFadeInBottom', [
1050
+ transition(':enter', [
1051
+ style({ transform: 'translateY({{start}}px)', opacity: 0 }),
1052
+ animate(TRANSITION, style({ transform: 'translateY({{end}})', opacity: 1 })),
1053
+ ], { params: { end: 0, start: 10, duration: 300 } }),
1054
+ transition(':leave', [
1055
+ style({ transform: 'translateY({{end}})', opacity: 1 }),
1056
+ animate(TRANSITION, style({ transform: 'translateY({{start}}px)', opacity: 0 })),
1057
+ ], { params: { end: 0, start: 10, duration: 300 } }),
1058
+ ]);
1059
+ const cuiDropdownAnimation = trigger('cuiDropdownAnimation', [
1060
+ transition(':enter', [
1061
+ style({ transform: 'translateY(-{{start}}px)', opacity: 0 }),
1062
+ animate(TRANSITION, style({ transform: 'translateY({{end}})', opacity: 1 })),
1063
+ ], { params: { end: 0, start: 10, duration: 300 } }),
1064
+ transition(':leave', [
1065
+ style({ transform: 'translateY({{end}})', opacity: 1 }),
1066
+ animate(TRANSITION, style({ transform: 'translateY(-{{start}}px)', opacity: 0 })),
1067
+ ], { params: { end: 0, start: 10, duration: 300 } }),
1068
+ ]);
1069
+ const cuiScaleIn = trigger('cuiScaleIn', [
1070
+ transition(':enter', [
1071
+ style({ transform: 'scale({{start}})' }),
1072
+ animate('{{duration}}ms {{easing}}', style({ transform: 'scale({{end}})' })),
1073
+ ], { params: { end: 1, start: 0, duration: 300, easing: 'ease-in-out' } }),
1074
+ transition(':leave', [
1075
+ style({ transform: 'scale({{end}})' }),
1076
+ animate(TRANSITION, style({ transform: 'scale({{start}})' })),
1077
+ ], { params: { end: 1, start: 0, duration: 300 } }),
1078
+ ]);
1079
+ const cuiPop = trigger('cuiPop', [
1080
+ transition(':enter', [
1081
+ style({ transform: 'scale({{start}})' }),
1082
+ animate(TRANSITION, style({ transform: 'scale({{middle}})' })),
1083
+ animate(TRANSITION, style({ transform: 'scale({{end}})' })),
1084
+ ], { params: { end: 1, middle: 1.1, start: 0, duration: 300 } }),
1085
+ transition(':leave', [
1086
+ style({ transform: 'scale({{end}})' }),
1087
+ animate(TRANSITION, style({ transform: 'scale({{middle}})' })),
1088
+ animate(TRANSITION, style({ transform: 'scale({{start}})' })),
1089
+ ], { params: { end: 1, middle: 1.1, start: 0, duration: 300 } }),
1090
+ ]);
1091
+ const cuiScaleInList = trigger('cuiScaleInList', [
1092
+ transition('* => *', [
1093
+ query(':enter', [
1094
+ style({ transform: 'scale({{start}})' }),
1095
+ stagger(STAGGER, [
1096
+ animate(TRANSITION, style({ transform: 'scale({{end}})' })),
1097
+ ]),
1098
+ ], { optional: true }),
1099
+ query(':leave', [
1100
+ style({ transform: 'scale({{end}})' }),
1101
+ stagger(STAGGER, [
1102
+ animate(TRANSITION, style({ transform: 'scale({{start}})' })),
1103
+ ]),
1104
+ ], { optional: true }),
1105
+ ], { params: { end: 1, start: 0, duration: 300 } }),
1106
+ ]);
1107
+ const cuiSlideIn = trigger('cuiSlideIn', [
1108
+ transition('* => left', [
1109
+ style({ transform: 'translateX(-{{start}})' }),
1110
+ animate(TRANSITION, style({ transform: 'translateX({{end}})' })),
1111
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1112
+ transition('left => *', [
1113
+ style({ transform: 'translateX({{end}})' }),
1114
+ animate(TRANSITION, style({ transform: 'translateX(-{{start}})' })),
1115
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1116
+ transition('* => right', [
1117
+ style({ transform: 'translateX({{start}})' }),
1118
+ animate(TRANSITION, style({ transform: 'translateX({{end}})' })),
1119
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1120
+ transition('right => *', [
1121
+ style({ transform: 'translateX({{end}})' }),
1122
+ animate(TRANSITION, style({ transform: 'translateX({{start}})' })),
1123
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1124
+ ]);
1125
+ const cuiSlideInLeft = trigger('cuiSlideInLeft', [
1126
+ transition(':enter', [
1127
+ style({ transform: 'translateX(-{{start}})' }),
1128
+ animate(TRANSITION, style({ transform: 'translateX({{end}})' })),
1129
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1130
+ transition(':leave', [
1131
+ style({ transform: 'translateX({{end}})' }),
1132
+ animate(TRANSITION, style({ transform: 'translateX(-{{start}})' })),
1133
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1134
+ ]);
1135
+ const cuiSlideInLeftList = trigger('cuiSlideInLeftList', [
1136
+ transition('* => *', [
1137
+ query(':enter', [
1138
+ style({ transform: 'translateX(-{{start}})' }),
1139
+ stagger(STAGGER, [
1140
+ animate(TRANSITION, style({ transform: 'translateX({{end}})' })),
1141
+ ]),
1142
+ ], { optional: true }),
1143
+ query(':leave', [
1144
+ style({ transform: 'translateX({{end}})' }),
1145
+ stagger(STAGGER, [
1146
+ animate(TRANSITION, style({ transform: 'translateX(-{{start}})' })),
1147
+ ]),
1148
+ ], { optional: true }),
1149
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1150
+ ]);
1151
+ const cuiSlideInRight = trigger('cuiSlideInRight', [
1152
+ transition(':enter', [
1153
+ style({ transform: 'translateX({{start}})' }),
1154
+ animate(TRANSITION, style({ transform: 'translateX({{end}})' })),
1155
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1156
+ transition(':leave', [
1157
+ style({ transform: 'translateX({{end}})' }),
1158
+ animate(TRANSITION, style({ transform: 'translateX({{start}})' })),
1159
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1160
+ ]);
1161
+ const cuiSlideInRightList = trigger('cuiSlideInRightList', [
1162
+ transition('* => *', [
1163
+ query(':enter', [
1164
+ style({ transform: 'translateX({{start}})' }),
1165
+ stagger(STAGGER, [
1166
+ animate(TRANSITION, style({ transform: 'translateX({{end}})' })),
1167
+ ]),
1168
+ ], { optional: true }),
1169
+ query(':leave', [
1170
+ style({ transform: 'translateX({{end}})' }),
1171
+ stagger(STAGGER, [
1172
+ animate(TRANSITION, style({ transform: 'translateX({{start}})' })),
1173
+ ]),
1174
+ ], { optional: true }),
1175
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1176
+ ]);
1177
+ const cuiSlideInTop = trigger('cuiSlideInTop', [
1178
+ transition(':enter', [
1179
+ style({ transform: 'translate3d(0,{{start}},0)', pointerEvents: 'none' }),
1180
+ animate(TRANSITION, style({ transform: 'translate3d(0,{{end}},0)' })),
1181
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1182
+ transition(':leave', [
1183
+ style({ transform: 'translate3d(0,{{end}},0)' }),
1184
+ animate(TRANSITION, style({ transform: 'translate3d(0,{{start}},0)' })),
1185
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1186
+ ]);
1187
+ const cuiSlideInTopList = trigger('cuiSlideInTopList', [
1188
+ transition('* => *', [
1189
+ query(':enter', [
1190
+ style({ transform: 'translateY({{start}})' }),
1191
+ stagger(STAGGER, [
1192
+ animate(TRANSITION, style({ transform: 'translateY({{end}})' })),
1193
+ ]),
1194
+ ], { optional: true }),
1195
+ query(':leave', [
1196
+ style({ transform: 'translateY({{end}})' }),
1197
+ stagger(STAGGER, [
1198
+ animate(TRANSITION, style({ transform: 'translateY({{start}})' })),
1199
+ ]),
1200
+ ], { optional: true }),
1201
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1202
+ ]);
1203
+ const cuiSlideInBottom = trigger('cuiSlideInBottom', [
1204
+ transition(':enter', [
1205
+ style({ transform: 'translateY(-{{start}})' }),
1206
+ animate(TRANSITION, style({ transform: 'translateY({{end}})' })),
1207
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1208
+ transition(':leave', [
1209
+ style({ transform: 'translateY({{end}})' }),
1210
+ animate(TRANSITION, style({ transform: 'translateY(-{{start}})' })),
1211
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1212
+ ]);
1213
+ const cuiSlideInBottomList = trigger('cuiSlideInBottomList', [
1214
+ transition('* => *', [
1215
+ query(':enter', [
1216
+ style({ transform: 'translateY(-{{start}})' }),
1217
+ stagger(STAGGER, [
1218
+ animate(TRANSITION, style({ transform: 'translateY({{end}})' })),
1219
+ ]),
1220
+ ], { optional: true }),
1221
+ query(':leave', [
1222
+ style({ transform: 'translateY({{end}})' }),
1223
+ stagger(STAGGER, [
1224
+ animate(TRANSITION, style({ transform: 'translateY(-{{start}})' })),
1225
+ ]),
1226
+ ], { optional: true }),
1227
+ ], { params: { end: 0, start: '100%', duration: 300 } }),
1228
+ ]);
1229
+
1230
+ /**
1231
+ * Service for displaying hints/tooltips
1232
+ */
1233
+ class CuiTooltipService extends BehaviorSubject {
1234
+ constructor() {
1235
+ super([]);
1236
+ }
1237
+ add(directive) {
1238
+ this.next(this.value.concat(directive));
1239
+ }
1240
+ remove(directive) {
1241
+ if (this.value.includes(directive)) {
1242
+ this.next(this.value.filter((hint) => hint !== directive));
1243
+ }
1244
+ }
1245
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1246
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipService, providedIn: 'root' }); }
1247
+ }
1248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipService, decorators: [{
1249
+ type: Injectable,
1250
+ args: [{
1251
+ providedIn: 'root',
1252
+ }]
1253
+ }], ctorParameters: function () { return []; } });
1254
+
1255
+ class CuiTooltips {
1256
+ constructor() {
1257
+ this.hints$ = inject(CuiTooltipService);
1258
+ this.destroyRef = inject(DestroyRef);
1259
+ this.cdr = inject(ChangeDetectorRef);
1260
+ this.hints = [];
1261
+ }
1262
+ ngOnInit() {
1263
+ // Due to this view being parallel to app content, `markForCheck` from `async` pipe
1264
+ // can happen after view was checked, so calling `detectChanges` instead
1265
+ this.hints$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((hints) => {
1266
+ this.hints = hints;
1267
+ this.cdr.detectChanges();
1268
+ });
1269
+ }
1270
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltips, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1271
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltips, isStandalone: true, selector: "cui-tooltips", host: { attributes: { "aria-live": "polite" } }, ngImport: i0, template: "<div\n *ngFor=\"let hint of hints\"\n role=\"tooltip\"\n @cuiParentAnimation\n [cuiActiveZoneParent]=\"hint.activeZone || null\"\n\n>\n <ng-container *polymorpheusOutlet=\"hint.component; context: {$implicit: hint}\" />\n</div>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:0}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: CuiActiveZone, selector: "[cuiActiveZone]:not(ng-container), [cuiActiveZoneChange]:not(ng-container), [cuiActiveZoneParent]:not(ng-container)", inputs: ["cuiActiveZoneParent"], outputs: ["cuiActiveZoneChange"], exportAs: ["cuiActiveZone"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [cuiParentAnimation], changeDetection: i0.ChangeDetectionStrategy.Default }); }
1272
+ }
1273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltips, decorators: [{
1274
+ type: Component,
1275
+ args: [{ standalone: true, selector: 'cui-tooltips', imports: [NgForOf, PolymorpheusTemplate, CuiActiveZone, PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.Default, animations: [cuiParentAnimation], host: {
1276
+ 'aria-live': 'polite',
1277
+ }, template: "<div\n *ngFor=\"let hint of hints\"\n role=\"tooltip\"\n @cuiParentAnimation\n [cuiActiveZoneParent]=\"hint.activeZone || null\"\n\n>\n <ng-container *polymorpheusOutlet=\"hint.component; context: {$implicit: hint}\" />\n</div>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:0}\n"] }]
1278
+ }] });
1279
+
1280
+ class CuiRootComponent {
1281
+ constructor() {
1282
+ this.document = inject(DOCUMENT);
1283
+ this.theme$ = inject(CuiThemeService);
1284
+ this.destroy$ = inject(CuiDestroyService);
1285
+ }
1286
+ ngOnInit() {
1287
+ this.initThemeSubscription();
1288
+ }
1289
+ initThemeSubscription() {
1290
+ this.theme$
1291
+ .pipe(takeUntil(this.destroy$))
1292
+ .subscribe(theme => this.document.documentElement.setAttribute('cuiTheme', theme));
1293
+ }
1294
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1295
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiRootComponent, selector: "cui-root", providers: [CuiDestroyService], ngImport: i0, template: "<div class=\"c-content\">\n <ng-content />\n</div>\n<cui-dialogs />\n<cui-alerts />\n<cui-tooltips />\n", styles: [".c-content{overflow:auto;min-height:100vh;isolation:isolate}\n"], dependencies: [{ kind: "component", type: CuiDialogsComponent, selector: "cui-dialogs" }, { kind: "component", type: CuiAlertsComponent, selector: "cui-alerts" }, { kind: "component", type: CuiTooltips, selector: "cui-tooltips" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1296
+ }
1297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRootComponent, decorators: [{
1298
+ type: Component,
1299
+ args: [{ selector: CUI_ROOT_SELECTOR, changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<div class=\"c-content\">\n <ng-content />\n</div>\n<cui-dialogs />\n<cui-alerts />\n<cui-tooltips />\n", styles: [".c-content{overflow:auto;min-height:100vh;isolation:isolate}\n"] }]
1300
+ }] });
1301
+
1302
+ // TODO: сделать структурную директиву
1303
+ const ContentType = {
1304
+ String: 'string',
1305
+ Template: 'template',
1306
+ Component: 'component'
1307
+ };
1308
+ class CuiDialogComponent {
1309
+ constructor() {
1310
+ this.element = inject(ElementRef).nativeElement;
1311
+ this.context = inject(CUI_DIALOG_CONTEXT);
1312
+ this.LAST_OF_TYPE_SELECTOR = ':last-of-type';
1313
+ this.ContentType = ContentType;
1314
+ this.contentType = ContentType.Component;
1315
+ }
1316
+ get size() {
1317
+ return this.context.size;
1318
+ }
1319
+ ngOnInit() {
1320
+ this.initContentType();
1321
+ }
1322
+ get contentTemplateRef() {
1323
+ return this.context.content;
1324
+ }
1325
+ get componentType() {
1326
+ return this.context.content;
1327
+ }
1328
+ onEscape() {
1329
+ if (!this.context.dismissible) {
1330
+ return;
1331
+ }
1332
+ if (!this.element.matches(this.LAST_OF_TYPE_SELECTOR)) {
1333
+ return;
1334
+ }
1335
+ this.context.completeWith();
1336
+ }
1337
+ initContentType() {
1338
+ const content = this.context.content;
1339
+ switch (true) {
1340
+ case (typeof content === 'string'):
1341
+ this.contentType = ContentType.String;
1342
+ return;
1343
+ case (content instanceof TemplateRef):
1344
+ this.contentType = ContentType.Template;
1345
+ return;
1346
+ }
1347
+ }
1348
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1349
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiDialogComponent, selector: "cui-dialog", host: { listeners: { "document:keydown.escape": "onEscape($event)" }, properties: { "attr.data-size": "this.size" } }, hostDirectives: [{ directive: i1$1.CuiFocusTrapDirective }], ngImport: i0, template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh - 40px);width:100%;border-radius:12px;outline:none;background:var(--cui-base-0);font-family:var(--cui-main-font);border:1px solid var(--cui-base-200)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}:host[data-size=sm]{max-width:620px}:host[data-size=xl]{max-width:1080px}.c-component-container{display:contents}.c-component-container ::ng-deep>*{display:contents}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1350
+ }
1351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogComponent, decorators: [{
1352
+ type: Component,
1353
+ args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [CuiFocusTrapDirective], template: "<ng-container [ngSwitch]=\"contentType\">\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <div class=\"c-component-container\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;max-height:calc(100vh - 40px);width:100%;border-radius:12px;outline:none;background:var(--cui-base-0);font-family:var(--cui-main-font);border:1px solid var(--cui-base-200)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}:host[data-size=sm]{max-width:620px}:host[data-size=xl]{max-width:1080px}.c-component-container{display:contents}.c-component-container ::ng-deep>*{display:contents}\n"] }]
1354
+ }], propDecorators: { size: [{
1355
+ type: HostBinding,
1356
+ args: ['attr.data-size']
1357
+ }], onEscape: [{
1358
+ type: HostListener,
1359
+ args: ['document:keydown.escape', ['$event']]
1360
+ }] } });
1361
+
1362
+ class CuiDialogActionsComponent {
1363
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1364
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiDialogActionsComponent, selector: "cui-dialog-actions", ngImport: i0, template: "<div class=\"c-divider\"></div>\n<div class=\"c-content\">\n <ng-content />\n</div>\n", styles: [":host{padding-right:24px;padding-left:24px;padding-bottom:16px;display:block}.c-divider{position:relative;left:-24px;width:calc(100% + 48px);height:1px;margin-bottom:15px;background:var(--cui-base-200)}.c-content{display:flex;align-items:center;justify-content:flex-end;gap:12px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1365
+ }
1366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogActionsComponent, decorators: [{
1367
+ type: Component,
1368
+ args: [{ selector: 'cui-dialog-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"c-divider\"></div>\n<div class=\"c-content\">\n <ng-content />\n</div>\n", styles: [":host{padding-right:24px;padding-left:24px;padding-bottom:16px;display:block}.c-divider{position:relative;left:-24px;width:calc(100% + 48px);height:1px;margin-bottom:15px;background:var(--cui-base-200)}.c-content{display:flex;align-items:center;justify-content:flex-end;gap:12px}\n"] }]
1369
+ }] });
1370
+
1371
+ class CuiDialogHeaderComponent {
1372
+ constructor() {
1373
+ this.closed = new EventEmitter();
1374
+ }
1375
+ onClose(event) {
1376
+ this.closed.emit(event);
1377
+ }
1378
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1379
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiDialogHeaderComponent, selector: "header[cuiDialogHeader][heading]", inputs: { heading: "heading", headingContext: "headingContext", subheading: "subheading" }, outputs: { closed: "closed" }, ngImport: i0, template: "<div class=\"c-heading\">\n <ng-container *polymorpheusOutlet=\"heading as heading; context: headingContext\">{{ heading }}</ng-container>\n</div>\n<button\n cuiButton\n type=\"button\"\n appearance=\"ghost\"\n icon=\"cuiIconClearSm\"\n class=\"c-button\"\n (click)=\"onClose($event)\"\n></button>\n<span *ngIf=\"subheading\">{{ subheading }}</span>\n<ng-content />\n", styles: [":host{padding:16px 24px;position:relative;display:flex;flex-direction:column;gap:4px;font-family:var(--cui-main-font);color:var(--cui-base-500)}.c-heading{font-weight:500;font-size:16px;line-height:24px;width:calc(100% - 36px);color:var(--cui-base-900)}.c-button{position:absolute;top:12px;right:12px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1380
+ }
1381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogHeaderComponent, decorators: [{
1382
+ type: Component,
1383
+ args: [{ selector: 'header[cuiDialogHeader][heading]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"c-heading\">\n <ng-container *polymorpheusOutlet=\"heading as heading; context: headingContext\">{{ heading }}</ng-container>\n</div>\n<button\n cuiButton\n type=\"button\"\n appearance=\"ghost\"\n icon=\"cuiIconClearSm\"\n class=\"c-button\"\n (click)=\"onClose($event)\"\n></button>\n<span *ngIf=\"subheading\">{{ subheading }}</span>\n<ng-content />\n", styles: [":host{padding:16px 24px;position:relative;display:flex;flex-direction:column;gap:4px;font-family:var(--cui-main-font);color:var(--cui-base-500)}.c-heading{font-weight:500;font-size:16px;line-height:24px;width:calc(100% - 36px);color:var(--cui-base-900)}.c-button{position:absolute;top:12px;right:12px}\n"] }]
1384
+ }], propDecorators: { heading: [{
1385
+ type: Input
1386
+ }], headingContext: [{
1387
+ type: Input
1388
+ }], subheading: [{
1389
+ type: Input
1390
+ }], closed: [{
1391
+ type: Output
1392
+ }] } });
1393
+
1394
+ class CuiDialogModule {
1395
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1396
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogModule, declarations: [CuiDialogComponent,
1397
+ CuiDialogsComponent,
1398
+ CuiDialogActionsComponent,
1399
+ CuiDialogHeaderComponent], imports: [CommonModule,
1400
+ PolymorpheusOutlet,
1401
+ CuiLetDirective,
1402
+ CuiButtonModule], exports: [CuiDialogComponent,
1403
+ CuiDialogsComponent,
1404
+ CuiDialogActionsComponent,
1405
+ CuiDialogHeaderComponent] }); }
1406
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogModule, imports: [CommonModule,
1407
+ CuiButtonModule] }); }
1408
+ }
1409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogModule, decorators: [{
1410
+ type: NgModule,
1411
+ args: [{
1412
+ imports: [
1413
+ CommonModule,
1414
+ PolymorpheusOutlet,
1415
+ CuiLetDirective,
1416
+ CuiButtonModule
1417
+ ],
1418
+ declarations: [
1419
+ CuiDialogComponent,
1420
+ CuiDialogsComponent,
1421
+ CuiDialogActionsComponent,
1422
+ CuiDialogHeaderComponent
1423
+ ],
1424
+ exports: [
1425
+ CuiDialogComponent,
1426
+ CuiDialogsComponent,
1427
+ CuiDialogActionsComponent,
1428
+ CuiDialogHeaderComponent
1429
+ ]
1430
+ }]
1431
+ }] });
1432
+
1433
+ class CuiDialogService extends CuiPopoverService {
1434
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1435
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogService, providedIn: 'root', useFactory: () => new CuiDialogService(CUI_DIALOGS, CuiDialogComponent, inject(CUI_DIALOG_OPTIONS)) }); }
1436
+ }
1437
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiDialogService, decorators: [{
1438
+ type: Injectable,
1439
+ args: [{
1440
+ providedIn: 'root',
1441
+ useFactory: () => new CuiDialogService(CUI_DIALOGS, CuiDialogComponent, inject(CUI_DIALOG_OPTIONS))
1442
+ }]
1443
+ }] });
1444
+
1445
+ const CUI_REDUCED_MOTION = cuiCreateTokenFromFactory(() => inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')
1446
+ .matches ?? false);
1447
+
1448
+ /**
1449
+ * Speed of all Taiga UI animations. 1 equals 300ms.
1450
+ */
1451
+ const CUI_ANIMATIONS_SPEED = cuiCreateTokenFromFactory(() => inject(CUI_REDUCED_MOTION) ? 0 : 1);
1452
+
1453
+ /**
1454
+ * Viewport accessor
1455
+ */
1456
+ const CUI_VIEWPORT = cuiCreateTokenFromFactory(() => {
1457
+ const win = inject(CUI_WINDOW);
1458
+ return {
1459
+ type: 'viewport',
1460
+ getClientRect() {
1461
+ const rect = {
1462
+ top: 0,
1463
+ left: 0,
1464
+ right: win.innerWidth,
1465
+ bottom: win.innerHeight,
1466
+ width: win.innerWidth,
1467
+ height: win.innerHeight,
1468
+ x: 0,
1469
+ y: 0,
1470
+ };
1471
+ return {
1472
+ ...rect,
1473
+ toJSON: () => JSON.stringify(rect),
1474
+ };
1475
+ },
1476
+ };
1477
+ });
1478
+ function cuiAsViewport(accessor) {
1479
+ return cuiProvide(CUI_VIEWPORT, accessor);
1480
+ }
1481
+
1482
+ function cuiRemoveSpaces(value) {
1483
+ return value.replace(/\s+/g, '');
1484
+ }
1485
+
1486
+ function cuiReplace(value, search, replace) {
1487
+ const regex = new RegExp(search.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g');
1488
+ return value.replace(regex, replace);
1489
+ }
1490
+
1491
+ /**
1492
+ * @internal
1493
+ */
1494
+ function cuiIsObscured(el, exceptSelector = 'cui-hints') {
1495
+ return !!cuiGetElementObscures(el)?.some((el) => !el.closest(exceptSelector));
1496
+ }
1497
+
1498
+ function cuiOverrideOptions(override, fallback) {
1499
+ return (directive, options) => {
1500
+ const result = directive || { ...(options || fallback) };
1501
+ Object.keys(override).forEach((key) => {
1502
+ // Update directive props with new defaults before inputs are processed
1503
+ result[key] = override[key];
1504
+ });
1505
+ return result;
1506
+ };
1507
+ }
1508
+
1509
+ const CUI_ANIMATIONS_DEFAULT_DURATION = 300;
1510
+ function cuiToAnimationOptions(speed, easing) {
1511
+ return {
1512
+ value: '',
1513
+ params: {
1514
+ duration: cuiGetDuration(speed),
1515
+ easing,
1516
+ },
1517
+ };
1518
+ }
1519
+ function cuiGetDuration(speed) {
1520
+ return speed && CUI_ANIMATIONS_DEFAULT_DURATION / speed;
1521
+ }
1522
+
1523
+ /**
1524
+ * A component to display a tooltip
1525
+ */
1526
+ const CUI_TOOLTIP_COMPONENT = cuiCreateTokenFromFactory(() => CuiTooltipComponent);
1527
+
1528
+ class CuiTooltipDriver extends CuiDriverDirective {
1529
+ constructor() {
1530
+ super(...arguments);
1531
+ this.type = 'hint';
1532
+ }
1533
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipDriver, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1534
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipDriver, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
1535
+ }
1536
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipDriver, decorators: [{
1537
+ type: Directive,
1538
+ args: [{
1539
+ standalone: true,
1540
+ }]
1541
+ }] });
1542
+
1543
+ const CUI_TOOLTIP_DIRECTIONS = [
1544
+ 'bottom-left',
1545
+ 'bottom',
1546
+ 'bottom-right',
1547
+ 'top-left',
1548
+ 'top',
1549
+ 'top-right',
1550
+ 'left-top',
1551
+ 'left',
1552
+ 'left-bottom',
1553
+ 'right-top',
1554
+ 'right',
1555
+ 'right-bottom',
1556
+ ];
1557
+ /** Default values for tooltip options */
1558
+ const CUI_TOOLTIP_DEFAULT_OPTIONS = {
1559
+ direction: 'top',
1560
+ showDelay: 500,
1561
+ hideDelay: 200,
1562
+ appearance: '',
1563
+ /** TODO @deprecated use {@link CUI_TOOLTIP_OPTIONS} instead **/
1564
+ icon: '@cui.circle-help',
1565
+ };
1566
+ /**
1567
+ * Default parameters for tooltip directive
1568
+ */
1569
+ const CUI_TOOLTIP_OPTIONS = cuiCreateToken(CUI_TOOLTIP_DEFAULT_OPTIONS);
1570
+ const cuiTooltipOptionsProvider = (override) => ({
1571
+ provide: CUI_TOOLTIP_OPTIONS,
1572
+ deps: [
1573
+ [new Optional(), new Self(), CuiTooltipOptionsDirective],
1574
+ [new Optional(), new SkipSelf(), CUI_TOOLTIP_OPTIONS],
1575
+ ],
1576
+ useFactory: cuiOverrideOptions(override, CUI_TOOLTIP_DEFAULT_OPTIONS),
1577
+ });
1578
+ /**
1579
+ * @deprecated: drop in 5.0
1580
+ */
1581
+ class CuiTooltipOptionsDirective {
1582
+ constructor() {
1583
+ this.options = inject(CUI_TOOLTIP_OPTIONS, { skipSelf: true });
1584
+ this.direction = this.options.direction;
1585
+ this.appearance = this.options.appearance;
1586
+ this.showDelay = this.options.showDelay;
1587
+ this.hideDelay = this.options.hideDelay;
1588
+ this.icon = this.options.icon;
1589
+ this.change$ = new Subject();
1590
+ }
1591
+ ngOnChanges() {
1592
+ this.change$.next();
1593
+ }
1594
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipOptionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1595
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipOptionsDirective, isStandalone: true, selector: "[cuiTooltipContent]", inputs: { content: ["cuiTooltipContent", "content"], direction: ["cuiTooltipDirection", "direction"], appearance: ["cuiTooltipAppearance", "appearance"], showDelay: ["cuiTooltipShowDelay", "showDelay"], hideDelay: ["cuiTooltipHideDelay", "hideDelay"] }, providers: [cuiProvide(CUI_TOOLTIP_OPTIONS, CuiTooltipOptionsDirective)], usesOnChanges: true, ngImport: i0 }); }
1596
+ }
1597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipOptionsDirective, decorators: [{
1598
+ type: Directive,
1599
+ args: [{
1600
+ standalone: true,
1601
+ selector: '[cuiTooltipContent]',
1602
+ providers: [cuiProvide(CUI_TOOLTIP_OPTIONS, CuiTooltipOptionsDirective)],
1603
+ }]
1604
+ }], propDecorators: { content: [{
1605
+ type: Input,
1606
+ args: ['cuiTooltipContent']
1607
+ }], direction: [{
1608
+ type: Input,
1609
+ args: ['cuiTooltipDirection']
1610
+ }], appearance: [{
1611
+ type: Input,
1612
+ args: ['cuiTooltipAppearance']
1613
+ }], showDelay: [{
1614
+ type: Input,
1615
+ args: ['cuiTooltipShowDelay']
1616
+ }], hideDelay: [{
1617
+ type: Input,
1618
+ args: ['cuiTooltipHideDelay']
1619
+ }] } });
1620
+
1621
+ class CuiTooltipHover extends CuiDriver {
1622
+ constructor() {
1623
+ super((subscriber) => this.stream$.subscribe(subscriber));
1624
+ this.isMobile = inject(CUI_IS_MOBILE);
1625
+ this.el = cuiInjectElement();
1626
+ this.hovered$ = inject(CuiHoveredService);
1627
+ this.options = inject(CUI_TOOLTIP_OPTIONS);
1628
+ this.visible = false;
1629
+ this.toggle$ = new Subject();
1630
+ this.stream$ = merge(this.toggle$.pipe(switchMap((visible) => this.isMobile
1631
+ ? of(visible)
1632
+ : of(visible).pipe(delay(visible ? 0 : this.cuiTooltipHideDelay))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap((visible) => this.isMobile
1633
+ ? of(visible)
1634
+ : of(visible).pipe(delay(visible ? this.cuiTooltipShowDelay : this.cuiTooltipHideDelay))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled), map((value) => value &&
1635
+ (this.el.hasAttribute('cuiTooltipPointer') || !cuiIsObscured(this.el))), tap((visible) => {
1636
+ this.visible = visible;
1637
+ }));
1638
+ this.parent = inject(CuiTooltipHover, {
1639
+ optional: true,
1640
+ skipSelf: true,
1641
+ });
1642
+ this.cuiTooltipShowDelay = this.options.showDelay;
1643
+ this.cuiTooltipHideDelay = this.options.hideDelay;
1644
+ this.type = 'hint';
1645
+ this.enabled = true;
1646
+ }
1647
+ toggle(visible = !this.visible) {
1648
+ this.toggle$.next(visible);
1649
+ this.parent?.toggle(visible);
1650
+ }
1651
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1652
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipHover, isStandalone: true, inputs: { cuiTooltipShowDelay: "cuiTooltipShowDelay", cuiTooltipHideDelay: "cuiTooltipHideDelay" }, providers: [cuiAsDriver(CuiTooltipHover), CuiHoveredService], exportAs: ["cuiTooltipHover"], usesInheritance: true, ngImport: i0 }); }
1653
+ }
1654
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipHover, decorators: [{
1655
+ type: Directive,
1656
+ args: [{
1657
+ standalone: true,
1658
+ providers: [cuiAsDriver(CuiTooltipHover), CuiHoveredService],
1659
+ exportAs: 'cuiTooltipHover',
1660
+ }]
1661
+ }], ctorParameters: function () { return []; }, propDecorators: { cuiTooltipShowDelay: [{
1662
+ type: Input
1663
+ }], cuiTooltipHideDelay: [{
1664
+ type: Input
1665
+ }] } });
1666
+
1667
+ const GAP$1 = 8;
1668
+ const ARROW_OFFSET = 24;
1669
+ const TOP = 0;
1670
+ const LEFT = 1;
1671
+ class CuiTooltipPosition extends CuiPositionAccessor {
1672
+ constructor() {
1673
+ super(...arguments);
1674
+ this.offset = inject(CUI_IS_MOBILE) ? 16 : 5;
1675
+ this.viewport = inject(CUI_VIEWPORT);
1676
+ this.accessor = cuiFallbackAccessor('hint')(inject(CuiRectAccessor), inject(CuiTooltipDirective));
1677
+ this.points = CUI_TOOLTIP_DIRECTIONS.reduce((acc, direction) => ({ ...acc, [direction]: [0, 0] }), {});
1678
+ this.direction = inject(CUI_TOOLTIP_OPTIONS).direction;
1679
+ this.directionChange = new EventEmitter();
1680
+ this.type = 'hint';
1681
+ }
1682
+ emitDirection(direction) {
1683
+ this.directionChange.emit(direction);
1684
+ }
1685
+ getPosition(rect, el) {
1686
+ const width = el?.clientWidth ?? rect.width;
1687
+ const height = el?.clientHeight ?? rect.height;
1688
+ const hostRect = this.accessor.getClientRect() ?? EMPTY_CLIENT_RECT;
1689
+ const leftCenter = hostRect.left + hostRect.width / 2;
1690
+ const topCenter = hostRect.top + hostRect.height / 2;
1691
+ this.points['top-left'][TOP] = hostRect.top - height - this.offset;
1692
+ this.points['top-left'][LEFT] = leftCenter - width + ARROW_OFFSET;
1693
+ this.points.top[TOP] = this.points['top-left'][TOP];
1694
+ this.points.top[LEFT] = leftCenter - width / 2;
1695
+ this.points['top-right'][TOP] = this.points['top-left'][TOP];
1696
+ this.points['top-right'][LEFT] = leftCenter - ARROW_OFFSET;
1697
+ this.points['bottom-left'][TOP] = hostRect.bottom + this.offset;
1698
+ this.points['bottom-left'][LEFT] = this.points['top-left'][LEFT];
1699
+ this.points.bottom[TOP] = this.points['bottom-left'][TOP];
1700
+ this.points.bottom[LEFT] = this.points.top[LEFT];
1701
+ this.points['bottom-right'][TOP] = this.points['bottom-left'][TOP];
1702
+ this.points['bottom-right'][LEFT] = this.points['top-right'][LEFT];
1703
+ this.points['left-top'][TOP] = topCenter - height + ARROW_OFFSET;
1704
+ this.points['left-top'][LEFT] = hostRect.left - width - this.offset;
1705
+ this.points.left[TOP] = topCenter - height / 2;
1706
+ this.points.left[LEFT] = this.points['left-top'][LEFT];
1707
+ this.points['left-bottom'][TOP] = topCenter - ARROW_OFFSET;
1708
+ this.points['left-bottom'][LEFT] = this.points['left-top'][LEFT];
1709
+ this.points['right-top'][TOP] = this.points['left-top'][TOP];
1710
+ this.points['right-top'][LEFT] = hostRect.right + this.offset;
1711
+ this.points.right[TOP] = this.points.left[TOP];
1712
+ this.points.right[LEFT] = this.points['right-top'][LEFT];
1713
+ this.points['right-bottom'][TOP] = this.points['left-bottom'][TOP];
1714
+ this.points['right-bottom'][LEFT] = this.points['right-top'][LEFT];
1715
+ const priorityDirections = Array.isArray(this.direction)
1716
+ ? this.direction
1717
+ : [this.direction];
1718
+ const sortedDirections = priorityDirections.concat(CUI_TOOLTIP_DIRECTIONS);
1719
+ const direction = sortedDirections.find((direction) => this.checkPosition(this.points[direction], width, height));
1720
+ this.emitDirection(direction || this.fallback);
1721
+ return this.points[direction || this.fallback];
1722
+ }
1723
+ get fallback() {
1724
+ return this.points.top[TOP] >
1725
+ this.viewport.getClientRect().bottom - this.points.bottom[TOP]
1726
+ ? 'top'
1727
+ : 'bottom';
1728
+ }
1729
+ checkPosition([top, left], width, height) {
1730
+ const viewport = this.viewport.getClientRect();
1731
+ return (top > GAP$1 &&
1732
+ left > GAP$1 &&
1733
+ top + height < viewport.bottom - GAP$1 &&
1734
+ left + width < viewport.right - GAP$1);
1735
+ }
1736
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipPosition, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1737
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipPosition, isStandalone: true, inputs: { direction: ["cuiTooltipDirection", "direction"] }, outputs: { directionChange: "cuiTooltipDirectionChange" }, usesInheritance: true, ngImport: i0 }); }
1738
+ }
1739
+ __decorate([
1740
+ cuiPure
1741
+ ], CuiTooltipPosition.prototype, "emitDirection", null);
1742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipPosition, decorators: [{
1743
+ type: Directive,
1744
+ args: [{
1745
+ standalone: true,
1746
+ }]
1747
+ }], propDecorators: { direction: [{
1748
+ type: Input,
1749
+ args: ['cuiTooltipDirection']
1750
+ }], directionChange: [{
1751
+ type: Output,
1752
+ args: ['cuiTooltipDirectionChange']
1753
+ }], emitDirection: [] } });
1754
+
1755
+ class CuiTooltipDirective {
1756
+ constructor() {
1757
+ this.service = inject(CuiTooltipService);
1758
+ this.appearance = inject(CUI_TOOLTIP_OPTIONS).appearance;
1759
+ this.content = signal(null);
1760
+ this.component = inject((PolymorpheusComponent));
1761
+ this.el = cuiInjectElement();
1762
+ this.activeZone = inject(CuiActiveZone, { optional: true });
1763
+ this.type = 'hint';
1764
+ }
1765
+ set cuiTooltip(content) {
1766
+ this.content.set(content);
1767
+ if (!content) {
1768
+ this.toggle(false);
1769
+ }
1770
+ }
1771
+ ngOnDestroy() {
1772
+ this.toggle(false);
1773
+ }
1774
+ getClientRect() {
1775
+ return this.el.getBoundingClientRect();
1776
+ }
1777
+ toggle(show) {
1778
+ if (show && this.content()) {
1779
+ this.service.add(this);
1780
+ }
1781
+ else {
1782
+ this.service.remove(this);
1783
+ }
1784
+ }
1785
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1786
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipDirective, isStandalone: true, selector: "[cuiTooltip]:not(ng-container):not(ng-template)", inputs: { context: ["cuiTooltipContext", "context"], appearance: ["cuiTooltipAppearance", "appearance"], cuiTooltip: "cuiTooltip" }, providers: [
1787
+ cuiAsRectAccessor(CuiTooltipDirective),
1788
+ cuiAsVehicle(CuiTooltipDirective),
1789
+ {
1790
+ provide: PolymorpheusComponent,
1791
+ deps: [CUI_TOOLTIP_COMPONENT, INJECTOR],
1792
+ useClass: PolymorpheusComponent,
1793
+ },
1794
+ ], hostDirectives: [{ directive: CuiTooltipDriver }, { directive: CuiTooltipHover, inputs: ["cuiTooltipHideDelay", "cuiTooltipHideDelay", "cuiTooltipShowDelay", "cuiTooltipShowDelay"] }, { directive: CuiTooltipPosition, inputs: ["cuiTooltipDirection", "cuiTooltipDirection"], outputs: ["cuiTooltipDirectionChange", "cuiTooltipDirectionChange"] }], ngImport: i0 }); }
1795
+ }
1796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipDirective, decorators: [{
1797
+ type: Directive,
1798
+ args: [{
1799
+ standalone: true,
1800
+ selector: '[cuiTooltip]:not(ng-container):not(ng-template)',
1801
+ providers: [
1802
+ cuiAsRectAccessor(CuiTooltipDirective),
1803
+ cuiAsVehicle(CuiTooltipDirective),
1804
+ {
1805
+ provide: PolymorpheusComponent,
1806
+ deps: [CUI_TOOLTIP_COMPONENT, INJECTOR],
1807
+ useClass: PolymorpheusComponent,
1808
+ },
1809
+ ],
1810
+ hostDirectives: [
1811
+ CuiTooltipDriver,
1812
+ {
1813
+ directive: CuiTooltipHover,
1814
+ inputs: ['cuiTooltipHideDelay', 'cuiTooltipShowDelay'],
1815
+ },
1816
+ {
1817
+ directive: CuiTooltipPosition,
1818
+ inputs: ['cuiTooltipDirection'],
1819
+ outputs: ['cuiTooltipDirectionChange'],
1820
+ },
1821
+ ],
1822
+ }]
1823
+ }], propDecorators: { context: [{
1824
+ type: Input,
1825
+ args: ['cuiTooltipContext']
1826
+ }], appearance: [{
1827
+ type: Input,
1828
+ args: ['cuiTooltipAppearance']
1829
+ }], cuiTooltip: [{
1830
+ type: Input
1831
+ }] } });
1832
+
1833
+ class CuiTooltipPointer extends CuiTooltipHover {
1834
+ constructor() {
1835
+ super(...arguments);
1836
+ this.currentRect = EMPTY_CLIENT_RECT;
1837
+ }
1838
+ getClientRect() {
1839
+ return this.currentRect;
1840
+ }
1841
+ onMove({ clientX, clientY }) {
1842
+ this.currentRect = cuiPointToClientRect(clientX, clientY);
1843
+ }
1844
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipPointer, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1845
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipPointer, isStandalone: true, selector: "[cuiTooltip][cuiTooltipPointer]", host: { listeners: { "mousemove.silent": "onMove($event)" } }, providers: [cuiAsRectAccessor(CuiTooltipPointer), cuiAsDriver(CuiTooltipPointer)], usesInheritance: true, ngImport: i0 }); }
1846
+ }
1847
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipPointer, decorators: [{
1848
+ type: Directive,
1849
+ args: [{
1850
+ standalone: true,
1851
+ selector: '[cuiTooltip][cuiTooltipPointer]',
1852
+ providers: [cuiAsRectAccessor(CuiTooltipPointer), cuiAsDriver(CuiTooltipPointer)],
1853
+ host: {
1854
+ '(mousemove.silent)': 'onMove($event)',
1855
+ },
1856
+ }]
1857
+ }] });
1858
+
1859
+ class CuiTooltipUnstyledComponent {
1860
+ constructor() {
1861
+ this.context = injectContext();
1862
+ }
1863
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipUnstyledComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1864
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipUnstyledComponent, isStandalone: true, selector: "ng-component", host: { properties: { "@cuiParentAnimation": "" } }, ngImport: i0, template: '<ng-container *polymorpheusOutlet="context.$implicit.content()" />', isInline: true, dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [cuiParentAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1865
+ }
1866
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipUnstyledComponent, decorators: [{
1867
+ type: Component,
1868
+ args: [{
1869
+ standalone: true,
1870
+ imports: [PolymorpheusOutlet],
1871
+ template: '<ng-container *polymorpheusOutlet="context.$implicit.content()" />',
1872
+ changeDetection: ChangeDetectionStrategy.OnPush,
1873
+ animations: [cuiParentAnimation],
1874
+ host: { '[@cuiParentAnimation]': '' },
1875
+ }]
1876
+ }] });
1877
+ class CuiTooltipUnstyled {
1878
+ constructor() {
1879
+ const hint = inject((CuiTooltipDirective));
1880
+ hint.component = new PolymorpheusComponent(CuiTooltipUnstyledComponent);
1881
+ hint.content.set(inject((TemplateRef)));
1882
+ }
1883
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipUnstyled, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1884
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipUnstyled, isStandalone: true, selector: "ng-template[cuiTooltip]", ngImport: i0 }); }
1885
+ }
1886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipUnstyled, decorators: [{
1887
+ type: Directive,
1888
+ args: [{
1889
+ standalone: true,
1890
+ selector: 'ng-template[cuiTooltip]',
1891
+ }]
1892
+ }], ctorParameters: function () { return []; } });
1893
+
1894
+ const GAP = 8;
1895
+ const CUI_TOOLTIP_PROVIDERS = [
1896
+ CuiPositionService,
1897
+ CuiHoveredService,
1898
+ cuiPositionAccessorFor('hint', CuiTooltipPosition),
1899
+ cuiRectAccessorFor('hint', forwardRef(() => CuiTooltipDirective)),
1900
+ ];
1901
+ class CuiTooltipComponent {
1902
+ constructor() {
1903
+ this.el = cuiInjectElement();
1904
+ this.hover = inject(CuiTooltipHover);
1905
+ this.vvs = inject(CuiVisualViewportService);
1906
+ this.viewport = inject(CUI_VIEWPORT);
1907
+ this.desktop = { value: '', params: { end: 1, start: 1 } };
1908
+ this.options = cuiToAnimationOptions(inject(CUI_ANIMATIONS_SPEED), 'cubic-bezier(0.35, 1.3, 0.25, 1)');
1909
+ this.pointer = inject(CuiTooltipPointer, { optional: true });
1910
+ this.accessor = inject(CuiRectAccessor);
1911
+ this.hint = injectContext().$implicit;
1912
+ this.isMobile = inject(CUI_IS_MOBILE);
1913
+ this.content = this.hint.component.component === CuiTooltipUnstyledComponent
1914
+ ? signal('')
1915
+ : this.hint.content;
1916
+ this.appearance = this.hint.appearance ||
1917
+ this.hint.el.closest('[cuiTheme]')?.getAttribute('cuiTheme');
1918
+ inject(CuiPositionService)
1919
+ .pipe(takeWhile(() => this.hint.el.isConnected), map((point) => this.vvs.correct(point)), takeUntilDestroyed())
1920
+ .subscribe({
1921
+ next: ([top, left]) => this.update(top, left),
1922
+ complete: () => this.hover.toggle(false),
1923
+ });
1924
+ inject(CuiHoveredService)
1925
+ .pipe(takeUntilDestroyed())
1926
+ .subscribe((hover) => this.hover.toggle(hover));
1927
+ }
1928
+ onClick(target) {
1929
+ if ((!target.closest('cui-hint') && !this.hint.el.contains(target)) ||
1930
+ cuiIsObscured(this.hint.el)) {
1931
+ this.hover.toggle(false);
1932
+ }
1933
+ }
1934
+ apply(top, left, beakTop, beakLeft) {
1935
+ this.el.style.top = top;
1936
+ this.el.style.left = left;
1937
+ this.el.style.setProperty('--top', `${beakTop}%`);
1938
+ this.el.style.setProperty('--left', `${beakLeft}%`);
1939
+ this.el.style.setProperty('--rotate', !beakLeft || Math.ceil(beakLeft) === 100 ? '90deg' : '0deg');
1940
+ }
1941
+ update(top, left) {
1942
+ const { clientHeight, clientWidth } = this.el;
1943
+ const rect = this.accessor.getClientRect();
1944
+ const viewport = this.viewport.getClientRect();
1945
+ if (rect === EMPTY_CLIENT_RECT || !clientHeight || !clientWidth) {
1946
+ return;
1947
+ }
1948
+ const safeLeft = cuiClamp(left, GAP, viewport.width - clientWidth - GAP);
1949
+ const [beakTop, beakLeft] = this.vvs.correct([
1950
+ rect.top + rect.height / 2 - top,
1951
+ rect.left + rect.width / 2 - safeLeft,
1952
+ ]);
1953
+ this.apply(cuiPx(Math.round(top)), cuiPx(Math.round(safeLeft)), Math.round((cuiClamp(beakTop, 0, clientHeight) / clientHeight) * 100), Math.round((cuiClamp(beakLeft, 0, clientWidth) / clientWidth) * 100));
1954
+ }
1955
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1956
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipComponent, isStandalone: true, selector: "cui-tooltip", host: { listeners: { "document:click": "onClick($event.target)" }, properties: { "@cuiScaleIn": "isMobile ? options : desktop", "@cuiFadeIn": "options", "class._untouchable": "pointer", "class._mobile": "isMobile", "attr.data-appearance": "appearance", "attr.cuiTheme": "appearance" } }, providers: CUI_TOOLTIP_PROVIDERS, ngImport: i0, template: `
1957
+ <ng-content />
1958
+ <span
1959
+ *polymorpheusOutlet="content() as text; context: hint.context"
1960
+ [innerHTML]="text"
1961
+ ></span>
1962
+ `, isInline: true, styles: [":host{padding:4px 8px;font-weight:400;font-size:14px;line-height:20px;position:absolute;max-inline-size:400px;background:var(--cui-gray-900);border-radius:6px;color:var(--cui-gray-0);box-sizing:border-box;font-family:var(--cui-main-font);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--left) var(--top)}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [cuiFadeIn, cuiScaleIn], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1963
+ }
1964
+ __decorate([
1965
+ cuiPure
1966
+ ], CuiTooltipComponent.prototype, "apply", null);
1967
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipComponent, decorators: [{
1968
+ type: Component,
1969
+ args: [{ standalone: true, selector: 'cui-tooltip', imports: [PolymorpheusOutlet], template: `
1970
+ <ng-content />
1971
+ <span
1972
+ *polymorpheusOutlet="content() as text; context: hint.context"
1973
+ [innerHTML]="text"
1974
+ ></span>
1975
+ `, changeDetection: ChangeDetectionStrategy.OnPush, providers: CUI_TOOLTIP_PROVIDERS, animations: [cuiFadeIn, cuiScaleIn], host: {
1976
+ '[@cuiScaleIn]': 'isMobile ? options : desktop',
1977
+ '[@cuiFadeIn]': 'options',
1978
+ '[class._untouchable]': 'pointer',
1979
+ '[class._mobile]': 'isMobile',
1980
+ '[attr.data-appearance]': 'appearance',
1981
+ '[attr.cuiTheme]': 'appearance',
1982
+ '(document:click)': 'onClick($event.target)',
1983
+ }, styles: [":host{padding:4px 8px;font-weight:400;font-size:14px;line-height:20px;position:absolute;max-inline-size:400px;background:var(--cui-gray-900);border-radius:6px;color:var(--cui-gray-0);box-sizing:border-box;font-family:var(--cui-main-font);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--left) var(--top)}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}\n"] }]
1984
+ }], ctorParameters: function () { return []; }, propDecorators: { apply: [] } });
1985
+
1986
+ class CuiTooltipDescribe extends CuiDriver {
1987
+ constructor() {
1988
+ super((subscriber) => this.stream$.subscribe(subscriber));
1989
+ this.doc = inject(DOCUMENT);
1990
+ this.el = cuiInjectElement();
1991
+ this.zone = inject(NgZone);
1992
+ this.id$ = new BehaviorSubject('');
1993
+ this.stream$ = this.id$.pipe(distinctUntilChanged(), cuiIfMap(() => fromEvent(this.doc, 'keydown', { capture: true }), cuiIsPresent), switchMap(() => this.focused
1994
+ ? of(false)
1995
+ : merge(cuiTypedFromEvent(this.doc, 'keyup'), cuiTypedFromEvent(this.element, 'blur')).pipe(map(() => this.focused))), debounce((visible) => visible ? timer(1000, cuiZonefreeScheduler(this.zone)) : of(null)), startWith(false), distinctUntilChanged(), skip(1), cuiZoneOptimized());
1996
+ this.type = 'hint';
1997
+ }
1998
+ set cuiTooltipDescribe(id) {
1999
+ this.id$.next(id || '');
2000
+ }
2001
+ get element() {
2002
+ return this.doc.getElementById(this.id$.value || '') || this.el;
2003
+ }
2004
+ get focused() {
2005
+ return cuiIsNativeFocused(this.element);
2006
+ }
2007
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipDescribe, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2008
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipDescribe, isStandalone: true, selector: "[cuiTooltipDescribe]", inputs: { cuiTooltipDescribe: "cuiTooltipDescribe" }, providers: [cuiAsDriver(CuiTooltipDescribe)], usesInheritance: true, ngImport: i0 }); }
2009
+ }
2010
+ __decorate([
2011
+ cuiPure
2012
+ ], CuiTooltipDescribe.prototype, "element", null);
2013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipDescribe, decorators: [{
2014
+ type: Directive,
2015
+ args: [{
2016
+ standalone: true,
2017
+ selector: '[cuiTooltipDescribe]',
2018
+ providers: [cuiAsDriver(CuiTooltipDescribe)],
2019
+ }]
2020
+ }], ctorParameters: function () { return []; }, propDecorators: { cuiTooltipDescribe: [{
2021
+ type: Input
2022
+ }], element: [] } });
2023
+
2024
+ class CuiTooltipHost extends CuiRectAccessor {
2025
+ constructor() {
2026
+ super(...arguments);
2027
+ this.type = 'hint';
2028
+ }
2029
+ getClientRect() {
2030
+ return this.cuiTooltipHost?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
2031
+ }
2032
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipHost, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2033
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipHost, isStandalone: true, selector: "[cuiTooltip][cuiTooltipHost]", inputs: { cuiTooltipHost: "cuiTooltipHost" }, providers: [cuiAsRectAccessor(CuiTooltipHost)], usesInheritance: true, ngImport: i0 }); }
2034
+ }
2035
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipHost, decorators: [{
2036
+ type: Directive,
2037
+ args: [{
2038
+ standalone: true,
2039
+ selector: '[cuiTooltip][cuiTooltipHost]',
2040
+ providers: [cuiAsRectAccessor(CuiTooltipHost)],
2041
+ }]
2042
+ }], propDecorators: { cuiTooltipHost: [{
2043
+ type: Input
2044
+ }] } });
2045
+
2046
+ class CuiTooltipManual extends CuiDriver {
2047
+ constructor() {
2048
+ super((subscriber) => this.stream$.subscribe(subscriber));
2049
+ this.hover = inject(CuiTooltipHover);
2050
+ this.stream$ = new BehaviorSubject(false);
2051
+ this.cuiTooltipManual = false;
2052
+ this.type = 'hint';
2053
+ this.hover.enabled = false;
2054
+ }
2055
+ ngOnChanges() {
2056
+ this.stream$.next(this.cuiTooltipManual);
2057
+ }
2058
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipManual, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2059
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipManual, isStandalone: true, selector: "[cuiTooltip][cuiTooltipManual]", inputs: { cuiTooltipManual: "cuiTooltipManual" }, providers: [cuiAsDriver(CuiTooltipManual)], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
2060
+ }
2061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipManual, decorators: [{
2062
+ type: Directive,
2063
+ args: [{
2064
+ standalone: true,
2065
+ selector: '[cuiTooltip][cuiTooltipManual]',
2066
+ providers: [cuiAsDriver(CuiTooltipManual)],
2067
+ }]
2068
+ }], ctorParameters: function () { return []; }, propDecorators: { cuiTooltipManual: [{
2069
+ type: Input
2070
+ }] } });
2071
+
2072
+ class CuiTooltipOverflow {
2073
+ constructor() {
2074
+ this.hint = inject(CuiTooltipDirective);
2075
+ }
2076
+ onMouseEnter({ scrollWidth, clientWidth, textContent }) {
2077
+ this.hint.cuiTooltip = scrollWidth > clientWidth ? textContent : '';
2078
+ }
2079
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipOverflow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2080
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTooltipOverflow, isStandalone: true, selector: "[cuiTooltipOverflow]", host: { listeners: { "mouseenter": "onMouseEnter($event.currentTarget)" } }, hostDirectives: [{ directive: CuiTooltipDirective, inputs: ["cuiTooltipAppearance", "cuiTooltipAppearance"] }], ngImport: i0 }); }
2081
+ }
2082
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTooltipOverflow, decorators: [{
2083
+ type: Directive,
2084
+ args: [{
2085
+ standalone: true,
2086
+ selector: '[cuiTooltipOverflow]',
2087
+ hostDirectives: [
2088
+ {
2089
+ directive: CuiTooltipDirective,
2090
+ inputs: ['cuiTooltipAppearance'],
2091
+ },
2092
+ ],
2093
+ host: {
2094
+ '(mouseenter)': 'onMouseEnter($event.currentTarget)',
2095
+ },
2096
+ }]
2097
+ }] });
2098
+
2099
+ const CuiTooltip = [
2100
+ CuiTooltipComponent,
2101
+ CuiTooltipDirective,
2102
+ CuiTooltipOptionsDirective,
2103
+ CuiTooltipUnstyled,
2104
+ CuiTooltipDriver,
2105
+ CuiTooltipPosition,
2106
+ CuiTooltipHover,
2107
+ CuiTooltipOverflow,
2108
+ CuiTooltipDescribe,
2109
+ CuiTooltipHost,
2110
+ CuiTooltipManual,
2111
+ CuiTooltipPointer,
2112
+ ];
2113
+
2114
+ class CuiRootModule {
2115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRootModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2116
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiRootModule, declarations: [CuiRootComponent], imports: [CommonModule,
2117
+ CuiDialogModule,
2118
+ CuiAlertModule,
2119
+ CuiTooltips], exports: [CuiRootComponent] }); }
2120
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRootModule, imports: [CommonModule,
2121
+ CuiDialogModule,
2122
+ CuiAlertModule] }); }
2123
+ }
2124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRootModule, decorators: [{
2125
+ type: NgModule,
2126
+ args: [{
2127
+ imports: [
2128
+ CommonModule,
2129
+ CuiDialogModule,
2130
+ CuiAlertModule,
2131
+ CuiTooltips
2132
+ ],
2133
+ declarations: [CuiRootComponent],
2134
+ exports: [CuiRootComponent]
2135
+ }]
2136
+ }] });
2137
+
2138
+ class CuiContextMenuComponent {
2139
+ constructor() {
2140
+ this.changeDetectorRef = inject(ChangeDetectorRef);
2141
+ this.viewContainerRef = inject(ViewContainerRef);
2142
+ this.document = inject(DOCUMENT);
2143
+ this.documentElement = this.document.documentElement;
2144
+ this.window = inject(CUI_WINDOW);
2145
+ this.destroy$ = inject(CuiDestroyService, { self: true });
2146
+ this.cuiClickOutsideDirective = inject(CuiClickOutsideDirective, { self: true });
2147
+ this.cuiTargetDirective = inject(CuiTargetDirective, { self: true });
2148
+ this.EXTRA_OFFSET_LEFT = 0;
2149
+ this.EXTRA_OFFSET_TOP = 0;
2150
+ this.isVisible = false;
2151
+ }
2152
+ ngOnInit() {
2153
+ this.initClickOutsideSubscription();
2154
+ }
2155
+ ngOnDestroy() {
2156
+ this.clearViewContainerRef();
2157
+ }
2158
+ ngAfterViewInit() {
2159
+ this.initTargetElementListener();
2160
+ }
2161
+ onSelect(item) {
2162
+ this.close();
2163
+ item.command?.();
2164
+ }
2165
+ onClose() {
2166
+ this.close();
2167
+ }
2168
+ onStopClickPropagation(event) {
2169
+ event.stopPropagation();
2170
+ }
2171
+ trackByFn(_, item) {
2172
+ return item.label;
2173
+ }
2174
+ initClickOutsideSubscription() {
2175
+ this.cuiClickOutsideDirective.cuiClickOutside
2176
+ .pipe(takeUntil(this.destroy$))
2177
+ .subscribe((target) => {
2178
+ if (this.target.contains(target)) {
2179
+ return;
2180
+ }
2181
+ this.close();
2182
+ });
2183
+ }
2184
+ initTargetElementListener() {
2185
+ this.targetEventListener = (event) => {
2186
+ event.stopPropagation();
2187
+ this.document.body.click();
2188
+ this.isVisible = !this.isVisible;
2189
+ this.clearViewContainerRef();
2190
+ if (this.isVisible) {
2191
+ this.renderList();
2192
+ this.changePosition(event.clientX, event.clientY);
2193
+ this.initHidingSubscription();
2194
+ }
2195
+ this.changeDetectorRef.markForCheck();
2196
+ };
2197
+ this.cuiTargetDirective.clicked
2198
+ .pipe(takeUntil(this.destroy$))
2199
+ .subscribe(this.targetEventListener);
2200
+ }
2201
+ initHidingSubscription() {
2202
+ this.initHidingFromWindowEvent('scroll');
2203
+ this.initHidingFromWindowEvent('resize');
2204
+ }
2205
+ initHidingFromWindowEvent(eventName) {
2206
+ fromEvent(this.window, eventName)
2207
+ .pipe(take(1))
2208
+ .subscribe(() => {
2209
+ this.close();
2210
+ this.changeDetectorRef.markForCheck();
2211
+ });
2212
+ }
2213
+ close() {
2214
+ this.isVisible = false;
2215
+ this.clearViewContainerRef();
2216
+ }
2217
+ renderList() {
2218
+ const embeddedViewRef = this.viewContainerRef.createEmbeddedView(this.list);
2219
+ this.node = embeddedViewRef.rootNodes[0];
2220
+ embeddedViewRef.detectChanges();
2221
+ this.document.querySelector(CUI_ROOT_SELECTOR).appendChild(this.node);
2222
+ }
2223
+ changePosition(x, y) {
2224
+ this.node.style.visibility = 'hidden';
2225
+ setTimeout(() => {
2226
+ const { clientWidth, clientHeight } = this.documentElement;
2227
+ const width = this.node.offsetWidth;
2228
+ const height = this.node.offsetHeight;
2229
+ let left = x;
2230
+ let top = y;
2231
+ if (left + width > clientWidth) {
2232
+ left -= width;
2233
+ }
2234
+ if (top + height > clientHeight) {
2235
+ top -= height;
2236
+ }
2237
+ left = Math.max(left, this.EXTRA_OFFSET_LEFT);
2238
+ top = Math.max(top, this.EXTRA_OFFSET_TOP);
2239
+ this.node.style.left = left + 'px';
2240
+ this.node.style.top = top + 'px';
2241
+ this.node.style.visibility = '';
2242
+ this.changeDetectorRef.markForCheck();
2243
+ });
2244
+ }
2245
+ clearViewContainerRef() {
2246
+ this.viewContainerRef.clear();
2247
+ }
2248
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2249
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiContextMenuComponent, selector: "cui-context-menu[items][target]", inputs: { items: "items", target: "target" }, host: { listeners: { "window:resize": "onClose()", "click": "onStopClickPropagation($event)" } }, providers: [CuiDestroyService], viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true }], hostDirectives: [{ directive: i1$1.CuiClickOutsideDirective }, { directive: i1$1.CuiTargetDirective, inputs: ["ccTarget", "target"] }], ngImport: i0, template: "<ng-template #list>\n <div class=\"c-container\">\n <ul\n *ngIf=\"isVisible\"\n class=\"c-ul\"\n >\n <li\n *ngFor=\"let item of items; trackBy: trackByFn\"\n [style.color]=\"item.color\"\n >\n <button\n type=\"button\"\n class=\"c-button\"\n (click)=\"onSelect(item)\"\n >\n <cui-svg\n *ngIf=\"item.icon\"\n [icon]=\"item.icon\"\n [color]=\"item.color\"\n ></cui-svg>\n <span>{{ item.label }}</span>\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n", styles: [":host{display:none}.c-container{position:fixed;width:268px;border-radius:8px;z-index:1}.c-ul{padding:7px 0;margin:0;list-style:none;font-weight:400;font-size:14px;line-height:20px;box-shadow:0 1px 4px #0000000a,0 1px 4px #0000000a;border:1px solid var(--cui-base-200);border-radius:inherit;background:var(--cui-base-0);color:var(--cui-base-900);font-family:var(--cui-main-font)}.c-button{padding:8px 11px 8px 0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;padding:8px 11px;width:100%;display:flex;align-items:center;gap:12px}.c-button:active{background:var(--cui-base-50)}@media (hover: hover){.c-button:hover{background:var(--cui-base-50)}}\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: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2250
+ }
2251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiContextMenuComponent, decorators: [{
2252
+ type: Component,
2253
+ args: [{ selector: 'cui-context-menu[items][target]', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], hostDirectives: [
2254
+ CuiClickOutsideDirective,
2255
+ {
2256
+ directive: CuiTargetDirective,
2257
+ inputs: ['ccTarget: target']
2258
+ }
2259
+ ], template: "<ng-template #list>\n <div class=\"c-container\">\n <ul\n *ngIf=\"isVisible\"\n class=\"c-ul\"\n >\n <li\n *ngFor=\"let item of items; trackBy: trackByFn\"\n [style.color]=\"item.color\"\n >\n <button\n type=\"button\"\n class=\"c-button\"\n (click)=\"onSelect(item)\"\n >\n <cui-svg\n *ngIf=\"item.icon\"\n [icon]=\"item.icon\"\n [color]=\"item.color\"\n ></cui-svg>\n <span>{{ item.label }}</span>\n </button>\n </li>\n </ul>\n </div>\n</ng-template>\n", styles: [":host{display:none}.c-container{position:fixed;width:268px;border-radius:8px;z-index:1}.c-ul{padding:7px 0;margin:0;list-style:none;font-weight:400;font-size:14px;line-height:20px;box-shadow:0 1px 4px #0000000a,0 1px 4px #0000000a;border:1px solid var(--cui-base-200);border-radius:inherit;background:var(--cui-base-0);color:var(--cui-base-900);font-family:var(--cui-main-font)}.c-button{padding:8px 11px 8px 0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;padding:8px 11px;width:100%;display:flex;align-items:center;gap:12px}.c-button:active{background:var(--cui-base-50)}@media (hover: hover){.c-button:hover{background:var(--cui-base-50)}}\n"] }]
2260
+ }], propDecorators: { items: [{
2261
+ type: Input
2262
+ }], target: [{
2263
+ type: Input
2264
+ }], list: [{
2265
+ type: ViewChild,
2266
+ args: ['list']
2267
+ }], onClose: [{
2268
+ type: HostListener,
2269
+ args: ['window:resize']
2270
+ }], onStopClickPropagation: [{
2271
+ type: HostListener,
2272
+ args: ['click', ['$event']]
2273
+ }] } });
2274
+
2275
+ class CuiContextMenuModule {
2276
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2277
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiContextMenuModule, declarations: [CuiContextMenuComponent], imports: [CommonModule,
2278
+ CuiSvgModule], exports: [CuiContextMenuComponent] }); }
2279
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiContextMenuModule, imports: [CommonModule,
2280
+ CuiSvgModule] }); }
2281
+ }
2282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiContextMenuModule, decorators: [{
2283
+ type: NgModule,
2284
+ args: [{
2285
+ imports: [
2286
+ CommonModule,
2287
+ CuiSvgModule
2288
+ ],
2289
+ declarations: [CuiContextMenuComponent],
2290
+ exports: [CuiContextMenuComponent]
2291
+ }]
2292
+ }] });
2293
+
2294
+ class CuiFormFieldComponent {
2295
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2296
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiFormFieldComponent, selector: "cui-form-field", ngImport: i0, template: "<ng-content select=\"label[cuiLabel]\" />\n<ng-content />\n<div class=\"c-hint-container\">\n <ng-content select=\"cui-hint\" />\n</div>\n", styles: [":host{display:flex;flex-direction:column;gap:4px}.c-hint-container{margin-top:2px}.c-hint-container:empty{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2297
+ }
2298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiFormFieldComponent, decorators: [{
2299
+ type: Component,
2300
+ args: [{ selector: 'cui-form-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"label[cuiLabel]\" />\n<ng-content />\n<div class=\"c-hint-container\">\n <ng-content select=\"cui-hint\" />\n</div>\n", styles: [":host{display:flex;flex-direction:column;gap:4px}.c-hint-container{margin-top:2px}.c-hint-container:empty{display:contents}\n"] }]
2301
+ }] });
2302
+
2303
+ class CuiFormFieldModule {
2304
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2305
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiFormFieldModule, declarations: [CuiFormFieldComponent], exports: [CuiFormFieldComponent] }); }
2306
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiFormFieldModule }); }
2307
+ }
2308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiFormFieldModule, decorators: [{
2309
+ type: NgModule,
2310
+ args: [{
2311
+ declarations: [CuiFormFieldComponent],
2312
+ exports: [CuiFormFieldComponent]
2313
+ }]
2314
+ }] });
2315
+
2316
+ class CuiHintComponent {
2317
+ constructor() {
2318
+ this.hintType = 'info';
2319
+ }
2320
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2321
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiHintComponent, selector: "cui-hint", inputs: { hintType: "hintType" }, host: { properties: { "attr.data-hint-type": "this.hintType" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{font-weight:400;font-size:14px;line-height:20px;display:inline-block;font-family:var(--cui-main-font)}:host[data-hint-type=info]{color:var(--cui-base-500)}:host[data-hint-type=error]{color:var(--cui-danger)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2322
+ }
2323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiHintComponent, decorators: [{
2324
+ type: Component,
2325
+ args: [{ selector: 'cui-hint', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n", styles: [":host{font-weight:400;font-size:14px;line-height:20px;display:inline-block;font-family:var(--cui-main-font)}:host[data-hint-type=info]{color:var(--cui-base-500)}:host[data-hint-type=error]{color:var(--cui-danger)}\n"] }]
2326
+ }], propDecorators: { hintType: [{
2327
+ type: Input
2328
+ }, {
2329
+ type: HostBinding,
2330
+ args: ['attr.data-hint-type']
2331
+ }] } });
2332
+
2333
+ class CuiHintModule {
2334
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiHintModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2335
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiHintModule, declarations: [CuiHintComponent], exports: [CuiHintComponent] }); }
2336
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiHintModule }); }
2337
+ }
2338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiHintModule, decorators: [{
2339
+ type: NgModule,
2340
+ args: [{
2341
+ declarations: [CuiHintComponent],
2342
+ exports: [CuiHintComponent]
2343
+ }]
2344
+ }] });
2345
+
2346
+ class CuiIconButtonComponent {
2347
+ constructor() {
2348
+ this.ICON_WIDTH = 16;
2349
+ this.ICON_HEIGHT = 16;
2350
+ this.ICON_STROKE_WIDTH = 1.5;
2351
+ }
2352
+ get isWithHoverColor() {
2353
+ return !!this.hoverColor;
2354
+ }
2355
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2356
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiIconButtonComponent, selector: "button[cuiIconButton][icon], a[cuiIconButton][icon]", inputs: { icon: "icon", color: "color", hoverColor: "hoverColor" }, host: { properties: { "style.--icon-hover-color": "this.hoverColor", "class._with-hover-color": "this.isWithHoverColor" } }, ngImport: i0, template: "<cui-svg\n [icon]=\"icon\"\n [width]=\"ICON_WIDTH\"\n [height]=\"ICON_HEIGHT\"\n [color]=\"color\"\n [strokeWidth]=\"ICON_STROKE_WIDTH\"\n class=\"c-icon\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex;justify-content:center;align-items:center;width:24px;height:24px}:host._with-hover-color:active .c-icon ::ng-deep [stroke]{stroke:var(--icon-hover-color)}:host._with-hover-color:active .c-icon ::ng-deep [fill]:not([fill=none]){fill:var(--icon-hover-color)}@media (hover: hover){:host._with-hover-color:hover .c-icon ::ng-deep [stroke]{stroke:var(--icon-hover-color)}:host._with-hover-color:hover .c-icon ::ng-deep [fill]:not([fill=none]){fill:var(--icon-hover-color)}}\n"], dependencies: [{ kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2357
+ }
2358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiIconButtonComponent, decorators: [{
2359
+ type: Component,
2360
+ args: [{ selector: 'button[cuiIconButton][icon], a[cuiIconButton][icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n [icon]=\"icon\"\n [width]=\"ICON_WIDTH\"\n [height]=\"ICON_HEIGHT\"\n [color]=\"color\"\n [strokeWidth]=\"ICON_STROKE_WIDTH\"\n class=\"c-icon\"\n></cui-svg>\n", styles: [":host{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex;justify-content:center;align-items:center;width:24px;height:24px}:host._with-hover-color:active .c-icon ::ng-deep [stroke]{stroke:var(--icon-hover-color)}:host._with-hover-color:active .c-icon ::ng-deep [fill]:not([fill=none]){fill:var(--icon-hover-color)}@media (hover: hover){:host._with-hover-color:hover .c-icon ::ng-deep [stroke]{stroke:var(--icon-hover-color)}:host._with-hover-color:hover .c-icon ::ng-deep [fill]:not([fill=none]){fill:var(--icon-hover-color)}}\n"] }]
2361
+ }], propDecorators: { icon: [{
2362
+ type: Input
2363
+ }], color: [{
2364
+ type: Input
2365
+ }], hoverColor: [{
2366
+ type: Input
2367
+ }, {
2368
+ type: HostBinding,
2369
+ args: ['style.--icon-hover-color']
2370
+ }], isWithHoverColor: [{
2371
+ type: HostBinding,
2372
+ args: ['class._with-hover-color']
2373
+ }] } });
2374
+
2375
+ class CuiIconButtonModule {
2376
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiIconButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2377
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiIconButtonModule, declarations: [CuiIconButtonComponent], imports: [CommonModule,
2378
+ CuiSvgModule], exports: [CuiIconButtonComponent] }); }
2379
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiIconButtonModule, imports: [CommonModule,
2380
+ CuiSvgModule] }); }
2381
+ }
2382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiIconButtonModule, decorators: [{
2383
+ type: NgModule,
2384
+ args: [{
2385
+ imports: [
2386
+ CommonModule,
2387
+ CuiSvgModule
2388
+ ],
2389
+ declarations: [CuiIconButtonComponent],
2390
+ exports: [CuiIconButtonComponent]
2391
+ }]
2392
+ }] });
2393
+
2394
+ class CuiTextFieldController {
2395
+ constructor(iconLeftDirective, idDirective, isErrorDirective, placeholderDirective, sizeDirective) {
2396
+ this.iconLeftDirective = iconLeftDirective;
2397
+ this.idDirective = idDirective;
2398
+ this.isErrorDirective = isErrorDirective;
2399
+ this.placeholderDirective = placeholderDirective;
2400
+ this.sizeDirective = sizeDirective;
2401
+ }
2402
+ get iconLeft() {
2403
+ return this.iconLeftDirective.iconLeft;
2404
+ }
2405
+ get id() {
2406
+ return this.idDirective.id;
2407
+ }
2408
+ get isError() {
2409
+ return this.isErrorDirective.isError;
2410
+ }
2411
+ get placeholder() {
2412
+ return this.placeholderDirective.placeholder;
2413
+ }
2414
+ get size() {
2415
+ return this.sizeDirective.size;
2416
+ }
2417
+ }
2418
+
2419
+ const CUI_TEXT_FIELD_ICON_LEFT = new InjectionToken('', {
2420
+ factory: () => new CuiTextFieldIconLeftDirective()
2421
+ });
2422
+ class CuiTextFieldIconLeftDirective {
2423
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldIconLeftDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2424
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTextFieldIconLeftDirective, selector: "[cuiTextFieldIconLeft]", inputs: { iconLeft: ["cuiTextFieldIconLeft", "iconLeft"] }, providers: [cuiProvide(CUI_TEXT_FIELD_ICON_LEFT, CuiTextFieldIconLeftDirective)], ngImport: i0 }); }
2425
+ }
2426
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldIconLeftDirective, decorators: [{
2427
+ type: Directive,
2428
+ args: [{
2429
+ selector: '[cuiTextFieldIconLeft]',
2430
+ providers: [cuiProvide(CUI_TEXT_FIELD_ICON_LEFT, CuiTextFieldIconLeftDirective)]
2431
+ }]
2432
+ }], propDecorators: { iconLeft: [{
2433
+ type: Input,
2434
+ args: ['cuiTextFieldIconLeft']
2435
+ }] } });
2436
+
2437
+ const CUI_TEXT_FIELD_ID = new InjectionToken('', {
2438
+ factory: () => new CuiTextFieldIdDirective()
2439
+ });
2440
+ class CuiTextFieldIdDirective {
2441
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldIdDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2442
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTextFieldIdDirective, selector: "[cuiTextFieldId]", inputs: { id: ["cuiTextFieldId", "id"] }, providers: [cuiProvide(CUI_TEXT_FIELD_ID, CuiTextFieldIdDirective)], ngImport: i0 }); }
2443
+ }
2444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldIdDirective, decorators: [{
2445
+ type: Directive,
2446
+ args: [{
2447
+ selector: '[cuiTextFieldId]',
2448
+ providers: [cuiProvide(CUI_TEXT_FIELD_ID, CuiTextFieldIdDirective)]
2449
+ }]
2450
+ }], propDecorators: { id: [{
2451
+ type: Input,
2452
+ args: ['cuiTextFieldId']
2453
+ }] } });
2454
+
2455
+ const CUI_TEXT_FIELD_IS_ERROR = new InjectionToken('', {
2456
+ factory: () => new CuiTextFieldIsErrorDirective()
2457
+ });
2458
+ class CuiTextFieldIsErrorDirective {
2459
+ constructor() {
2460
+ this.isError = false;
2461
+ }
2462
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldIsErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2463
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTextFieldIsErrorDirective, selector: "[cuiTextFieldIsError]", inputs: { isError: ["cuiTextFieldIsError", "isError"] }, providers: [cuiProvide(CUI_TEXT_FIELD_IS_ERROR, CuiTextFieldIsErrorDirective)], ngImport: i0 }); }
2464
+ }
2465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldIsErrorDirective, decorators: [{
2466
+ type: Directive,
2467
+ args: [{
2468
+ selector: '[cuiTextFieldIsError]',
2469
+ providers: [cuiProvide(CUI_TEXT_FIELD_IS_ERROR, CuiTextFieldIsErrorDirective)]
2470
+ }]
2471
+ }], propDecorators: { isError: [{
2472
+ type: Input,
2473
+ args: ['cuiTextFieldIsError']
2474
+ }] } });
2475
+
2476
+ const CUI_TEXT_FIELD_PLACEHOLDER = new InjectionToken('', {
2477
+ factory: () => new CuiTextFieldPlaceholderDirective()
2478
+ });
2479
+ class CuiTextFieldPlaceholderDirective {
2480
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldPlaceholderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2481
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTextFieldPlaceholderDirective, selector: "[cuiTextFieldPlaceholder]", inputs: { placeholder: ["cuiTextFieldPlaceholder", "placeholder"] }, providers: [cuiProvide(CUI_TEXT_FIELD_PLACEHOLDER, CuiTextFieldPlaceholderDirective)], ngImport: i0 }); }
2482
+ }
2483
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldPlaceholderDirective, decorators: [{
2484
+ type: Directive,
2485
+ args: [{
2486
+ selector: '[cuiTextFieldPlaceholder]',
2487
+ providers: [cuiProvide(CUI_TEXT_FIELD_PLACEHOLDER, CuiTextFieldPlaceholderDirective)]
2488
+ }]
2489
+ }], propDecorators: { placeholder: [{
2490
+ type: Input,
2491
+ args: ['cuiTextFieldPlaceholder']
2492
+ }] } });
2493
+
2494
+ const CUI_TEXT_FIELD_SIZE = new InjectionToken('', {
2495
+ factory: () => new CuiTextFieldSizeDirective()
2496
+ });
2497
+ class CuiTextFieldSizeDirective {
2498
+ constructor() {
2499
+ this.size = 'sm';
2500
+ }
2501
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2502
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CuiTextFieldSizeDirective, selector: "[cuiTextFieldSize]", inputs: { size: ["cuiTextFieldSize", "size"] }, providers: [cuiProvide(CUI_TEXT_FIELD_SIZE, CuiTextFieldSizeDirective)], ngImport: i0 }); }
2503
+ }
2504
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldSizeDirective, decorators: [{
2505
+ type: Directive,
2506
+ args: [{
2507
+ selector: '[cuiTextFieldSize]',
2508
+ providers: [cuiProvide(CUI_TEXT_FIELD_SIZE, CuiTextFieldSizeDirective)]
2509
+ }]
2510
+ }], propDecorators: { size: [{
2511
+ type: Input,
2512
+ args: ['cuiTextFieldSize']
2513
+ }] } });
2514
+
2515
+ class CuiTextFieldControllerModule {
2516
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldControllerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2517
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldControllerModule, declarations: [CuiTextFieldIconLeftDirective,
2518
+ CuiTextFieldIdDirective,
2519
+ CuiTextFieldPlaceholderDirective,
2520
+ CuiTextFieldIsErrorDirective,
2521
+ CuiTextFieldSizeDirective], exports: [CuiTextFieldIconLeftDirective,
2522
+ CuiTextFieldIdDirective,
2523
+ CuiTextFieldPlaceholderDirective,
2524
+ CuiTextFieldIsErrorDirective,
2525
+ CuiTextFieldSizeDirective] }); }
2526
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldControllerModule }); }
2527
+ }
2528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextFieldControllerModule, decorators: [{
2529
+ type: NgModule,
2530
+ args: [{
2531
+ declarations: [
2532
+ CuiTextFieldIconLeftDirective,
2533
+ CuiTextFieldIdDirective,
2534
+ CuiTextFieldPlaceholderDirective,
2535
+ CuiTextFieldIsErrorDirective,
2536
+ CuiTextFieldSizeDirective
2537
+ ],
2538
+ exports: [
2539
+ CuiTextFieldIconLeftDirective,
2540
+ CuiTextFieldIdDirective,
2541
+ CuiTextFieldPlaceholderDirective,
2542
+ CuiTextFieldIsErrorDirective,
2543
+ CuiTextFieldSizeDirective
2544
+ ]
2545
+ }]
2546
+ }] });
2547
+
2548
+ const CUI_TEXT_FIELD_CONTROLLER = new InjectionToken('');
2549
+ const CUI_TEXT_FILED_CONTROLLER_PROVIDER = [
2550
+ {
2551
+ provide: CUI_TEXT_FIELD_CONTROLLER,
2552
+ useFactory: (...controllers) => {
2553
+ return new CuiTextFieldController(...controllers);
2554
+ },
2555
+ deps: [
2556
+ CUI_TEXT_FIELD_ICON_LEFT,
2557
+ CUI_TEXT_FIELD_ID,
2558
+ CUI_TEXT_FIELD_IS_ERROR,
2559
+ CUI_TEXT_FIELD_PLACEHOLDER,
2560
+ CUI_TEXT_FIELD_SIZE
2561
+ ]
2562
+ }
2563
+ ];
2564
+
2565
+ class CuiInputNumberComponent {
2566
+ constructor() {
2567
+ this.changeDetectorRef = inject(ChangeDetectorRef);
2568
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
2569
+ this.maskOptions = this.generateMask();
2570
+ this._precision = 0;
2571
+ this._min = Number.MIN_SAFE_INTEGER;
2572
+ this._max = Number.MAX_SAFE_INTEGER;
2573
+ }
2574
+ set precision(value) {
2575
+ this._precision = value;
2576
+ this.maskOptions = this.generateMask();
2577
+ }
2578
+ set min(value) {
2579
+ this._min = value;
2580
+ this.maskOptions = this.generateMask();
2581
+ }
2582
+ set max(value) {
2583
+ this._max = value;
2584
+ this.maskOptions = this.generateMask();
2585
+ }
2586
+ get id() {
2587
+ return this.cuiTextFieldController.id;
2588
+ }
2589
+ get placeholder() {
2590
+ return this.cuiTextFieldController.placeholder;
2591
+ }
2592
+ get iconLeft() {
2593
+ return this.cuiTextFieldController.iconLeft;
2594
+ }
2595
+ get size() {
2596
+ return this.cuiTextFieldController.size;
2597
+ }
2598
+ get isError() {
2599
+ return this.cuiTextFieldController.isError;
2600
+ }
2601
+ writeValue(value) {
2602
+ this.value = value?.toString();
2603
+ this.changeDetectorRef.markForCheck();
2604
+ }
2605
+ registerOnChange(fn) {
2606
+ this.onChange = fn;
2607
+ }
2608
+ registerOnTouched(fn) {
2609
+ this.onTouched = fn;
2610
+ }
2611
+ setDisabledState(isDisabled) {
2612
+ this.isDisabled = isDisabled;
2613
+ this.changeDetectorRef.markForCheck();
2614
+ }
2615
+ onInput({ target }) {
2616
+ this.changeModel(target.value);
2617
+ }
2618
+ onFocus() {
2619
+ this.input.nativeElement.focus();
2620
+ }
2621
+ changeModel(value) {
2622
+ const parsedValue = maskitoParseNumber(value);
2623
+ this.value = value;
2624
+ this.onChange(Number.isNaN(parsedValue) ? null : parsedValue);
2625
+ }
2626
+ generateMask() {
2627
+ return maskitoNumberOptionsGenerator({
2628
+ precision: this._precision,
2629
+ min: this._min,
2630
+ max: this._max
2631
+ });
2632
+ }
2633
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2634
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiInputNumberComponent, selector: "cui-input-number", inputs: { precision: "precision", min: "min", max: "max" }, host: { listeners: { "click": "onFocus()" }, properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
2635
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2636
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputNumberComponent, true)
2637
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [maskito]=\"maskOptions\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.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: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2638
+ }
2639
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputNumberComponent, decorators: [{
2640
+ type: Component,
2641
+ args: [{ selector: 'cui-input-number', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2642
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2643
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputNumberComponent, true)
2644
+ ], template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [maskito]=\"maskOptions\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}\n"] }]
2645
+ }], propDecorators: { precision: [{
2646
+ type: Input
2647
+ }], min: [{
2648
+ type: Input
2649
+ }], max: [{
2650
+ type: Input
2651
+ }], isDisabled: [{
2652
+ type: HostBinding,
2653
+ args: ['class._disabled']
2654
+ }], input: [{
2655
+ type: ViewChild,
2656
+ args: ['input']
2657
+ }], size: [{
2658
+ type: HostBinding,
2659
+ args: ['attr.data-size']
2660
+ }], isError: [{
2661
+ type: HostBinding,
2662
+ args: ['class._with-error']
2663
+ }], onFocus: [{
2664
+ type: HostListener,
2665
+ args: ['click']
2666
+ }] } });
2667
+
2668
+ class CuiInputNumberModule {
2669
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2670
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiInputNumberModule, declarations: [CuiInputNumberComponent], imports: [CommonModule,
2671
+ FormsModule,
2672
+ MaskitoDirective,
2673
+ CuiSvgModule], exports: [CuiInputNumberComponent,
2674
+ CuiTextFieldControllerModule] }); }
2675
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputNumberModule, imports: [CommonModule,
2676
+ FormsModule,
2677
+ CuiSvgModule, CuiTextFieldControllerModule] }); }
2678
+ }
2679
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputNumberModule, decorators: [{
2680
+ type: NgModule,
2681
+ args: [{
2682
+ imports: [
2683
+ CommonModule,
2684
+ FormsModule,
2685
+ MaskitoDirective,
2686
+ CuiSvgModule,
2687
+ ],
2688
+ declarations: [CuiInputNumberComponent],
2689
+ exports: [
2690
+ CuiInputNumberComponent,
2691
+ CuiTextFieldControllerModule
2692
+ ]
2693
+ }]
2694
+ }] });
2695
+
2696
+ class CuiInputPasswordComponent {
2697
+ constructor() {
2698
+ this.changeDetectorRef = inject(ChangeDetectorRef);
2699
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
2700
+ this.isPasswordHidden = true;
2701
+ }
2702
+ get id() {
2703
+ return this.cuiTextFieldController.id;
2704
+ }
2705
+ get placeholder() {
2706
+ return this.cuiTextFieldController.placeholder;
2707
+ }
2708
+ get iconLeft() {
2709
+ return this.cuiTextFieldController.iconLeft;
2710
+ }
2711
+ get isToggleButtonShown() {
2712
+ return !this.isDisabled;
2713
+ }
2714
+ get icon() {
2715
+ return this.isPasswordHidden ? 'cuiIconEye' : 'cuiIconEyeOff';
2716
+ }
2717
+ get type() {
2718
+ return this.isPasswordHidden ? 'password' : 'text';
2719
+ }
2720
+ get buttonTitle() {
2721
+ return this.isPasswordHidden ? 'Reveal password' : 'Hide password';
2722
+ }
2723
+ get size() {
2724
+ return this.cuiTextFieldController.size;
2725
+ }
2726
+ get isError() {
2727
+ return this.cuiTextFieldController.isError;
2728
+ }
2729
+ writeValue(value) {
2730
+ this.value = value;
2731
+ this.changeDetectorRef.markForCheck();
2732
+ }
2733
+ registerOnChange(fn) {
2734
+ this.onChange = fn;
2735
+ }
2736
+ registerOnTouched(fn) {
2737
+ this.onTouched = fn;
2738
+ }
2739
+ setDisabledState(isDisabled) {
2740
+ this.isDisabled = isDisabled;
2741
+ if (this.isDisabled) {
2742
+ this.isPasswordHidden = true;
2743
+ }
2744
+ this.changeDetectorRef.markForCheck();
2745
+ }
2746
+ onInput({ target }) {
2747
+ const value = target.value;
2748
+ this.value = value;
2749
+ this.onChange(value);
2750
+ }
2751
+ onTogglePasswordVisibility() {
2752
+ this.isPasswordHidden = !this.isPasswordHidden;
2753
+ }
2754
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2755
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiInputPasswordComponent, selector: "cui-input-password", host: { properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
2756
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2757
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputPasswordComponent, true)
2758
+ ], ngImport: i0, template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [type]=\"type\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n<button\n *ngIf=\"isToggleButtonShown\"\n [title]=\"buttonTitle\"\n class=\"c-button\"\n (click)=\"onTogglePasswordVisibility()\"\n>\n <cui-svg\n [icon]=\"icon\"\n [width]=\"16\"\n [height]=\"16\"\n color=\"var(--cui-base-500)\"\n ></cui-svg>\n</button>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}.c-input::-ms-reveal{display:none}.c-input[type=password]{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2759
+ }
2760
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputPasswordComponent, decorators: [{
2761
+ type: Component,
2762
+ args: [{ selector: 'cui-input-password', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2763
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2764
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputPasswordComponent, true)
2765
+ ], template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [type]=\"type\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n<button\n *ngIf=\"isToggleButtonShown\"\n [title]=\"buttonTitle\"\n class=\"c-button\"\n (click)=\"onTogglePasswordVisibility()\"\n>\n <cui-svg\n [icon]=\"icon\"\n [width]=\"16\"\n [height]=\"16\"\n color=\"var(--cui-base-500)\"\n ></cui-svg>\n</button>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}.c-input::-ms-reveal{display:none}.c-input[type=password]{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}\n"] }]
2766
+ }], propDecorators: { isDisabled: [{
2767
+ type: HostBinding,
2768
+ args: ['class._disabled']
2769
+ }], size: [{
2770
+ type: HostBinding,
2771
+ args: ['attr.data-size']
2772
+ }], isError: [{
2773
+ type: HostBinding,
2774
+ args: ['class._with-error']
2775
+ }] } });
2776
+
2777
+ class CuiInputPasswordModule {
2778
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputPasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2779
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiInputPasswordModule, declarations: [CuiInputPasswordComponent], imports: [CommonModule,
2780
+ FormsModule,
2781
+ CuiSvgModule], exports: [CuiInputPasswordComponent,
2782
+ CuiTextFieldControllerModule] }); }
2783
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputPasswordModule, imports: [CommonModule,
2784
+ FormsModule,
2785
+ CuiSvgModule, CuiTextFieldControllerModule] }); }
2786
+ }
2787
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputPasswordModule, decorators: [{
2788
+ type: NgModule,
2789
+ args: [{
2790
+ imports: [
2791
+ CommonModule,
2792
+ FormsModule,
2793
+ CuiSvgModule
2794
+ ],
2795
+ declarations: [CuiInputPasswordComponent],
2796
+ exports: [
2797
+ CuiInputPasswordComponent,
2798
+ CuiTextFieldControllerModule
2799
+ ]
2800
+ }]
2801
+ }] });
2802
+
2803
+ class CuiInputTextComponent {
2804
+ constructor() {
2805
+ this.changeDetectorRef = inject(ChangeDetectorRef);
2806
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
2807
+ }
2808
+ get id() {
2809
+ return this.cuiTextFieldController.id;
2810
+ }
2811
+ get placeholder() {
2812
+ return this.cuiTextFieldController.placeholder;
2813
+ }
2814
+ get iconLeft() {
2815
+ return this.cuiTextFieldController.iconLeft;
2816
+ }
2817
+ get isClearButtonHidden() {
2818
+ return !(this.value && !this.isDisabled);
2819
+ }
2820
+ get size() {
2821
+ return this.cuiTextFieldController.size;
2822
+ }
2823
+ get isError() {
2824
+ return this.cuiTextFieldController.isError;
2825
+ }
2826
+ writeValue(value) {
2827
+ this.value = value;
2828
+ this.changeDetectorRef.markForCheck();
2829
+ }
2830
+ registerOnChange(fn) {
2831
+ this.onChange = fn;
2832
+ }
2833
+ registerOnTouched(fn) {
2834
+ this.onTouched = fn;
2835
+ }
2836
+ setDisabledState(isDisabled) {
2837
+ this.isDisabled = isDisabled;
2838
+ this.changeDetectorRef.markForCheck();
2839
+ }
2840
+ onInput({ target }) {
2841
+ this.changeModel(target.value);
2842
+ }
2843
+ onClear() {
2844
+ this.changeModel('');
2845
+ }
2846
+ onFocus() {
2847
+ this.input.nativeElement.focus();
2848
+ }
2849
+ changeModel(value) {
2850
+ this.value = value;
2851
+ this.onChange(value);
2852
+ }
2853
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2854
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiInputTextComponent, selector: "cui-input-text", host: { listeners: { "click": "onFocus()" }, properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
2855
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2856
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputTextComponent, true)
2857
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n<button\n type=\"button\"\n class=\"c-button\"\n [class.c-button_hidden]=\"isClearButtonHidden\"\n (click)=\"onClear()\"\n>\n <cui-svg\n icon=\"cuiIconClear\"\n color=\"var(--cui-base-300)\"\n class=\"c-close-icon\"\n />\n</button>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}.c-close-icon ::ng-deep path{stroke:var(--cui-base-0)!important}.c-button_hidden{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2858
+ }
2859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputTextComponent, decorators: [{
2860
+ type: Component,
2861
+ args: [{ selector: 'cui-input-text', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2862
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2863
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputTextComponent, true)
2864
+ ], template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"value\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>\n<button\n type=\"button\"\n class=\"c-button\"\n [class.c-button_hidden]=\"isClearButtonHidden\"\n (click)=\"onClear()\"\n>\n <cui-svg\n icon=\"cuiIconClear\"\n color=\"var(--cui-base-300)\"\n class=\"c-close-icon\"\n />\n</button>\n", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}.c-close-icon ::ng-deep path{stroke:var(--cui-base-0)!important}.c-button_hidden{visibility:hidden}\n"] }]
2865
+ }], propDecorators: { isDisabled: [{
2866
+ type: HostBinding,
2867
+ args: ['class._disabled']
2868
+ }], input: [{
2869
+ type: ViewChild,
2870
+ args: ['input']
2871
+ }], size: [{
2872
+ type: HostBinding,
2873
+ args: ['attr.data-size']
2874
+ }], isError: [{
2875
+ type: HostBinding,
2876
+ args: ['class._with-error']
2877
+ }], onFocus: [{
2878
+ type: HostListener,
2879
+ args: ['click']
2880
+ }] } });
2881
+
2882
+ class CuiInputModule {
2883
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2884
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiInputModule, declarations: [CuiInputTextComponent], imports: [CommonModule,
2885
+ FormsModule,
2886
+ CuiSvgModule], exports: [CuiInputTextComponent,
2887
+ CuiTextFieldControllerModule] }); }
2888
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputModule, imports: [CommonModule,
2889
+ FormsModule,
2890
+ CuiSvgModule, CuiTextFieldControllerModule] }); }
2891
+ }
2892
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputModule, decorators: [{
2893
+ type: NgModule,
2894
+ args: [{
2895
+ imports: [
2896
+ CommonModule,
2897
+ FormsModule,
2898
+ CuiSvgModule
2899
+ ],
2900
+ declarations: [CuiInputTextComponent],
2901
+ exports: [
2902
+ CuiInputTextComponent,
2903
+ CuiTextFieldControllerModule
2904
+ ]
2905
+ }]
2906
+ }] });
2907
+
2908
+ const CUI_INPUT_TIME_DEFAULT_OPTIONS = {
2909
+ mode: 'HH:MM'
2910
+ };
2911
+ const CUI_INPUT_TIME_OPTIONS = new InjectionToken('', {
2912
+ factory: () => CUI_INPUT_TIME_DEFAULT_OPTIONS
2913
+ });
2914
+
2915
+ class CuiInputTimeComponent {
2916
+ constructor() {
2917
+ this.changeDetectorRef = inject(ChangeDetectorRef);
2918
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
2919
+ this.options = inject(CUI_INPUT_TIME_OPTIONS);
2920
+ this._mode = this.options.mode;
2921
+ this.maskOptions = this.generateMask(this._mode);
2922
+ this.defaultPlaceholder = this._mode.toLowerCase();
2923
+ }
2924
+ set mode(value) {
2925
+ this._mode = value;
2926
+ this.maskOptions = this.generateMask(value);
2927
+ this.defaultPlaceholder = value.toLowerCase();
2928
+ }
2929
+ get id() {
2930
+ return this.cuiTextFieldController.id;
2931
+ }
2932
+ get placeholder() {
2933
+ return this.cuiTextFieldController.placeholder ?? this.defaultPlaceholder;
2934
+ }
2935
+ get computedValue() {
2936
+ return this.value ? this.value.toString(this._mode) : '';
2937
+ }
2938
+ get size() {
2939
+ return this.cuiTextFieldController.size;
2940
+ }
2941
+ get isError() {
2942
+ return this.cuiTextFieldController.isError;
2943
+ }
2944
+ writeValue(value) {
2945
+ this.value = value;
2946
+ this.changeDetectorRef.markForCheck();
2947
+ }
2948
+ registerOnChange(fn) {
2949
+ this.onChange = fn;
2950
+ }
2951
+ registerOnTouched(fn) {
2952
+ this.onTouched = fn;
2953
+ }
2954
+ setDisabledState(isDisabled) {
2955
+ this.isDisabled = isDisabled;
2956
+ this.changeDetectorRef.markForCheck();
2957
+ }
2958
+ onInput(event) {
2959
+ const value = event.target.value;
2960
+ if (value.length !== this._mode.length) {
2961
+ this.onChange(null);
2962
+ return;
2963
+ }
2964
+ const time = CuiTime.fromString(value);
2965
+ this.onChange(time);
2966
+ }
2967
+ onFocus() {
2968
+ this.input.nativeElement.focus();
2969
+ }
2970
+ generateMask(mode) {
2971
+ return maskitoTimeOptionsGenerator({ mode });
2972
+ }
2973
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2974
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiInputTimeComponent, selector: "cui-input-time", inputs: { mode: "mode" }, host: { listeners: { "click": "onFocus()" }, properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
2975
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2976
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputTimeComponent, true)
2977
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<cui-svg\n icon=\"cuiIconClock\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"computedValue\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [maskito]=\"maskOptions\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}\n"], dependencies: [{ kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.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: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2978
+ }
2979
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputTimeComponent, decorators: [{
2980
+ type: Component,
2981
+ args: [{ selector: 'cui-input-time', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2982
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2983
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputTimeComponent, true)
2984
+ ], template: "<cui-svg\n icon=\"cuiIconClock\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"computedValue\"\n [attr.id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n type=\"text\"\n [maskito]=\"maskOptions\"\n [disabled]=\"isDisabled\"\n class=\"c-input\"\n (input)=\"onInput($event)\"\n (focus)=\"onTouched()\"\n>", styles: [":host{padding-right:13px;padding-left:13px;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;gap:8px;border:1px solid var(--cui-base-200);border-radius:8px;cursor:text;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus-within{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host[data-size=sm]{padding-top:7px;padding-bottom:7px}:host[data-size=md]{padding-top:8px;padding-bottom:8px}:host._disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus-within{box-shadow:0 0 0 2px #d92d2040}.c-input{padding:0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;background:none;color:inherit;font:inherit;line-height:inherit;width:100%}.c-input:disabled{cursor:not-allowed}.c-input::placeholder{color:var(--cui-base-400)}.c-button{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;display:flex}\n"] }]
2985
+ }], propDecorators: { mode: [{
2986
+ type: Input
2987
+ }], isDisabled: [{
2988
+ type: HostBinding,
2989
+ args: ['class._disabled']
2990
+ }], input: [{
2991
+ type: ViewChild,
2992
+ args: ['input']
2993
+ }], size: [{
2994
+ type: HostBinding,
2995
+ args: ['attr.data-size']
2996
+ }], isError: [{
2997
+ type: HostBinding,
2998
+ args: ['class._with-error']
2999
+ }], onFocus: [{
3000
+ type: HostListener,
3001
+ args: ['click']
3002
+ }] } });
3003
+
3004
+ class CuiInputTimeModule {
3005
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3006
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiInputTimeModule, declarations: [CuiInputTimeComponent], imports: [CommonModule,
3007
+ FormsModule,
3008
+ MaskitoDirective,
3009
+ CuiSvgModule], exports: [CuiInputTimeComponent,
3010
+ CuiTextFieldControllerModule] }); }
3011
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputTimeModule, imports: [CommonModule,
3012
+ FormsModule,
3013
+ CuiSvgModule, CuiTextFieldControllerModule] }); }
3014
+ }
3015
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiInputTimeModule, decorators: [{
3016
+ type: NgModule,
3017
+ args: [{
3018
+ imports: [
3019
+ CommonModule,
3020
+ FormsModule,
3021
+ MaskitoDirective,
3022
+ CuiSvgModule
3023
+ ],
3024
+ declarations: [CuiInputTimeComponent],
3025
+ exports: [
3026
+ CuiInputTimeComponent,
3027
+ CuiTextFieldControllerModule
3028
+ ]
3029
+ }]
3030
+ }] });
3031
+
3032
+ class CuiLabelComponent {
3033
+ constructor() {
3034
+ this.isRequired = false;
3035
+ }
3036
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3037
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiLabelComponent, selector: "label[cuiLabel]", inputs: { isRequired: "isRequired" }, ngImport: i0, template: "<span class=\"c-wrapper\">\n <ng-content></ng-content>\n</span>\n<span\n *ngIf=\"isRequired\"\n class=\"c-star\"\n>\n *\n</span>\n", styles: [":host{font-weight:500;font-size:14px;line-height:20px;display:inline-flex;gap:2px;width:-moz-fit-content;width:fit-content;color:var(--cui-base-900);font-family:var(--cui-main-font)}.c-wrapper{display:inline-flex;align-items:center;gap:8px}.c-star{color:var(--cui-danger)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3038
+ }
3039
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiLabelComponent, decorators: [{
3040
+ type: Component,
3041
+ args: [{ selector: 'label[cuiLabel]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"c-wrapper\">\n <ng-content></ng-content>\n</span>\n<span\n *ngIf=\"isRequired\"\n class=\"c-star\"\n>\n *\n</span>\n", styles: [":host{font-weight:500;font-size:14px;line-height:20px;display:inline-flex;gap:2px;width:-moz-fit-content;width:fit-content;color:var(--cui-base-900);font-family:var(--cui-main-font)}.c-wrapper{display:inline-flex;align-items:center;gap:8px}.c-star{color:var(--cui-danger)}\n"] }]
3042
+ }], propDecorators: { isRequired: [{
3043
+ type: Input
3044
+ }] } });
3045
+
3046
+ class CuiLabelModule {
3047
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3048
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiLabelModule, declarations: [CuiLabelComponent], imports: [CommonModule], exports: [CuiLabelComponent] }); }
3049
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiLabelModule, imports: [CommonModule] }); }
3050
+ }
3051
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiLabelModule, decorators: [{
3052
+ type: NgModule,
3053
+ args: [{
3054
+ imports: [CommonModule],
3055
+ declarations: [CuiLabelComponent],
3056
+ exports: [CuiLabelComponent]
3057
+ }]
3058
+ }] });
3059
+
3060
+ class CuiRadioComponent {
3061
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3062
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiRadioComponent, selector: "input[type=\"radio\"][cuiRadio]", ngImport: i0, template: '', isInline: true, styles: [":host{position:relative;width:16px;height:16px;border:1px solid var(--cui-base-200);border-radius:50%;outline:none;margin:0;appearance:none;cursor:pointer;background:var(--cui-base-0)}:host:before{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:10px;height:10px;border-radius:50%}:host:focus{box-shadow:0 0 0 2px var(--cui-focus)}@media (hover: hover){:host:hover{border-color:var(--cui-base-400)}}:host:active{border-color:var(--cui-base-400);box-shadow:none}:host:checked{border:2px solid var(--cui-info)}:host:checked:before{background:var(--cui-info)}:host:disabled{cursor:not-allowed;border:1px solid var(--cui-base-200);background:var(--cui-base-100)}:host:disabled:checked{border-width:2px}:host:disabled:checked:before{background:var(--cui-base-200)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3063
+ }
3064
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRadioComponent, decorators: [{
3065
+ type: Component,
3066
+ args: [{ selector: 'input[type="radio"][cuiRadio]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{position:relative;width:16px;height:16px;border:1px solid var(--cui-base-200);border-radius:50%;outline:none;margin:0;appearance:none;cursor:pointer;background:var(--cui-base-0)}:host:before{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:10px;height:10px;border-radius:50%}:host:focus{box-shadow:0 0 0 2px var(--cui-focus)}@media (hover: hover){:host:hover{border-color:var(--cui-base-400)}}:host:active{border-color:var(--cui-base-400);box-shadow:none}:host:checked{border:2px solid var(--cui-info)}:host:checked:before{background:var(--cui-info)}:host:disabled{cursor:not-allowed;border:1px solid var(--cui-base-200);background:var(--cui-base-100)}:host:disabled:checked{border-width:2px}:host:disabled:checked:before{background:var(--cui-base-200)}\n"] }]
3067
+ }] });
3068
+
3069
+ class CuiRadioModule {
3070
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3071
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiRadioModule, declarations: [CuiRadioComponent], exports: [CuiRadioComponent] }); }
3072
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRadioModule }); }
3073
+ }
3074
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiRadioModule, decorators: [{
3075
+ type: NgModule,
3076
+ args: [{
3077
+ declarations: [CuiRadioComponent],
3078
+ exports: [CuiRadioComponent]
3079
+ }]
3080
+ }] });
3081
+
3082
+ class CuiSelectComponent {
3083
+ constructor() {
3084
+ this.element = inject(ElementRef).nativeElement;
3085
+ this.document = inject(DOCUMENT);
3086
+ this.changeDetectorRef = inject(ChangeDetectorRef);
3087
+ this.viewContainerRef = inject(ViewContainerRef);
3088
+ this.destroy$ = inject(CuiDestroyService, { self: true });
3089
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
3090
+ this.cuiClickOutsideDirective = inject(CuiClickOutsideDirective, { self: true });
3091
+ this.SPACE_BETWEEN_BUTTON_AND_OPTIONS = 3;
3092
+ this.isOpened = false;
3093
+ this.isOptionsListAbove = false;
3094
+ this.gap = `${this.SPACE_BETWEEN_BUTTON_AND_OPTIONS}px`;
3095
+ }
3096
+ get id() {
3097
+ return this.cuiTextFieldController.id;
3098
+ }
3099
+ get size() {
3100
+ return this.cuiTextFieldController.size;
3101
+ }
3102
+ get placeholder() {
3103
+ return this.cuiTextFieldController.placeholder;
3104
+ }
3105
+ get isError() {
3106
+ return this.cuiTextFieldController.isError;
3107
+ }
3108
+ trackByFn(_, item) {
3109
+ return item.label;
3110
+ }
3111
+ writeValue(value) {
3112
+ this.value = value;
3113
+ // TODO: Непонятно, зачем нужно в construction вторая часть выражения
3114
+ this.selectedOption = this.options.find(option => option.value === value) ?? value;
3115
+ this.changeDetectorRef.markForCheck();
3116
+ }
3117
+ registerOnChange(fn) {
3118
+ this.onChange = fn;
3119
+ }
3120
+ registerOnTouched(fn) {
3121
+ this.onTouched = fn;
3122
+ }
3123
+ ngOnInit() {
3124
+ this.initClickOutsideSubscription();
3125
+ }
3126
+ ngOnDestroy() {
3127
+ this.clearViewContainerRef();
3128
+ }
3129
+ setDisabledState(isDisabled) {
3130
+ this.isDisabled = isDisabled;
3131
+ this.changeDetectorRef.markForCheck();
3132
+ }
3133
+ onSelect(event, option) {
3134
+ event.stopPropagation();
3135
+ if (option.isDisabled) {
3136
+ return;
3137
+ }
3138
+ this.value = option.value;
3139
+ this.selectedOption = option;
3140
+ this.onChange(this.value);
3141
+ this.onSwitch();
3142
+ this.onTouched();
3143
+ this.changeDetectorRef.markForCheck();
3144
+ }
3145
+ onSwitch() {
3146
+ if (!this.options.length && !this.defaultOptionText) {
3147
+ return;
3148
+ }
3149
+ if (!this.isOpened) {
3150
+ this.open();
3151
+ return;
3152
+ }
3153
+ this.close();
3154
+ }
3155
+ onClose() {
3156
+ this.close();
3157
+ }
3158
+ onWindowResize() {
3159
+ this.button.nativeElement.blur();
3160
+ this.close();
3161
+ }
3162
+ initClickOutsideSubscription() {
3163
+ this.cuiClickOutsideDirective.cuiClickOutside
3164
+ .pipe(takeUntil(this.destroy$))
3165
+ .subscribe(() => {
3166
+ if (this.isOpened) {
3167
+ this.onTouched();
3168
+ }
3169
+ this.close();
3170
+ });
3171
+ }
3172
+ open() {
3173
+ this.isOpened = true;
3174
+ const rootElement = this.document.querySelector(CUI_ROOT_SELECTOR);
3175
+ const { top: elementRectTop, left: elementRectLeft, bottom: elementRectBottom } = this.element.getBoundingClientRect();
3176
+ const distanceToBottom = this.document.documentElement.clientHeight
3177
+ - (elementRectBottom + this.SPACE_BETWEEN_BUTTON_AND_OPTIONS);
3178
+ const embeddedViewRef = this.viewContainerRef.createEmbeddedView(this.optionsWrapper);
3179
+ const node = embeddedViewRef.rootNodes[0];
3180
+ const nodeStyles = node.style;
3181
+ this.isOptionsListAbove = distanceToBottom < this.getOptionsListHeightContainer.nativeElement.offsetHeight;
3182
+ embeddedViewRef.detectChanges();
3183
+ nodeStyles.width = this.element.offsetWidth + 'px';
3184
+ nodeStyles.left = window.scrollX + elementRectLeft + 'px';
3185
+ if (this.isOptionsListAbove) {
3186
+ nodeStyles.top = window.scrollY + elementRectTop
3187
+ - this.getOptionsListHeightContainer.nativeElement.offsetHeight
3188
+ - this.SPACE_BETWEEN_BUTTON_AND_OPTIONS
3189
+ + 'px';
3190
+ }
3191
+ else {
3192
+ nodeStyles.top = window.scrollY + elementRectBottom + this.SPACE_BETWEEN_BUTTON_AND_OPTIONS + 'px';
3193
+ }
3194
+ rootElement.appendChild(this.viewContainerRef.createEmbeddedView(this.backdrop).rootNodes[0]);
3195
+ rootElement.appendChild(embeddedViewRef.rootNodes[0]);
3196
+ }
3197
+ close() {
3198
+ this.isOpened = false;
3199
+ this.clearViewContainerRef();
3200
+ }
3201
+ clearViewContainerRef() {
3202
+ this.viewContainerRef.clear();
3203
+ }
3204
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3205
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiSelectComponent, selector: "cui-select[options]", inputs: { options: "options", defaultOptionText: "defaultOptionText" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "style.--c-gap": "this.gap" } }, providers: [
3206
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
3207
+ cuiProvide(NG_VALUE_ACCESSOR, CuiSelectComponent, true),
3208
+ CuiDestroyService
3209
+ ], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }, { propertyName: "getOptionsListHeightContainer", first: true, predicate: ["getOptionsListHeightContainer"], descendants: true }, { propertyName: "backdrop", first: true, predicate: ["backdrop"], descendants: true }, { propertyName: "optionsWrapper", first: true, predicate: ["optionsWrapper"], descendants: true }], hostDirectives: [{ directive: i1$1.CuiClickOutsideDirective }], ngImport: i0, template: "<button\n #button\n type=\"button\"\n [attr.id]=\"id\"\n [attr.data-size]=\"size\"\n [disabled]=\"isDisabled\"\n class=\"c-button\"\n [class.c-button_active]=\"isOpened\"\n [class.c-button_with-error]=\"isError\"\n (click)=\"onSwitch()\"\n>\n <ng-container *ngIf=\"selectedOption; else placeholderTemplate\">\n {{ selectedOption.label }}\n </ng-container>\n <ng-template #placeholderTemplate>\n <span class=\"c-placeholder\">{{ placeholder }}</span>\n </ng-template>\n <cui-svg\n icon=\"cuiIconChevronDown\"\n color=\"var(--cui-base-500)\"\n />\n</button>\n<ng-template #backdrop>\n <div class=\"c-backdrop\"></div>\n</ng-template>\n<ng-template #optionsWrapper>\n <div\n cuiFocusTrap\n class=\"c-options__wrapper\"\n [class.c-options__wrapper_top]=\"isOptionsListAbove\"\n >\n <ng-container *ngTemplateOutlet=\"optionsList\"/>\n </div>\n</ng-template>\n<div\n #getOptionsListHeightContainer\n class=\"c-get-options-list-height-container\"\n>\n <ng-container *ngTemplateOutlet=\"optionsList\"/>\n</div>\n<ng-template #optionsList>\n <ul\n class=\"c-options\"\n [class.c-options_top]=\"isOptionsListAbove\"\n >\n <ng-container *ngIf=\"options.length; else empty\">\n <li *ngFor=\"let option of options; trackBy: trackByFn\">\n <button\n type=\"button\"\n class=\"c-option-button\"\n [class.c-option-button_selected]=\"selectedOption === option\"\n [disabled]=\"option.isDisabled\"\n (click)=\"onSelect($event, option)\"\n >\n <span>{{ option.label }}</span>\n <cui-svg\n *ngIf=\"selectedOption === option\"\n icon=\"cuiIconCheckSm\"\n color=\"var(--cui-info)\"\n class=\"c-option-button__icon\"\n />\n </button>\n </li>\n </ng-container>\n <ng-template #empty>\n <li *ngIf=\"defaultOptionText\">\n <button\n type=\"button\"\n class=\"c-option-button\"\n (click)=\"onClose()\"\n >\n {{ defaultOptionText }}\n </button>\n </li>\n </ng-template>\n </ul>\n</ng-template>\n", styles: [":host{display:block;font-family:var(--cui-main-font);position:relative}.c-button{border:0;flex-shrink:0;outline:none;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;padding:0 13px;font-weight:400;font-size:14px;line-height:20px;display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;border:1px solid var(--cui-base-200);border-radius:8px;cursor:pointer;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font);text-align:start}.c-button:hover{border-color:var(--cui-base-300)}.c-button_active.c-button_active,.c-button:focus{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}.c-button:disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}.c-button[data-size=sm]{padding-top:7px;padding-bottom:7px}.c-button[data-size=md]{padding-top:8px;padding-bottom:8px}.c-button_with-error{border-color:var(--cui-danger)}.c-button_with-error:focus{box-shadow:0 0 0 2px #d92d2040;border-color:var(--cui-danger)}.c-placeholder{color:var(--cui-base-400)}.c-backdrop{position:fixed;inset:0}.c-options__wrapper{position:absolute;font-family:var(--cui-main-font);z-index:1}.c-get-options-list-height-container{position:fixed;visibility:hidden}.c-options{padding:7px 0;margin:0;list-style:none;font-weight:400;font-size:14px;line-height:20px;box-shadow:0 1px 4px #0000000a,0 1px 4px #0000000a;overflow:auto;max-height:180px;border:1px solid var(--cui-base-200);border-radius:8px;background:var(--cui-base-0);color:var(--cui-base-900)}.c-option-button{padding:8px 11px 8px 0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;padding:8px 11px;width:100%;display:flex;align-items:center;gap:12px;text-align:start}.c-option-button:active{background:var(--cui-base-50)}@media (hover: hover){.c-option-button:hover{background:var(--cui-base-50)}}.c-option-button_selected{background:var(--cui-base-50)}.c-option-button:disabled{background:unset;opacity:50%}.c-option-button__icon{margin-left:auto}\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: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "directive", type: i1$1.CuiFocusTrapDirective, selector: "[cuiFocusTrap]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3210
+ }
3211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSelectComponent, decorators: [{
3212
+ type: Component,
3213
+ args: [{ selector: 'cui-select[options]', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3214
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
3215
+ cuiProvide(NG_VALUE_ACCESSOR, CuiSelectComponent, true),
3216
+ CuiDestroyService
3217
+ ], hostDirectives: [CuiClickOutsideDirective], template: "<button\n #button\n type=\"button\"\n [attr.id]=\"id\"\n [attr.data-size]=\"size\"\n [disabled]=\"isDisabled\"\n class=\"c-button\"\n [class.c-button_active]=\"isOpened\"\n [class.c-button_with-error]=\"isError\"\n (click)=\"onSwitch()\"\n>\n <ng-container *ngIf=\"selectedOption; else placeholderTemplate\">\n {{ selectedOption.label }}\n </ng-container>\n <ng-template #placeholderTemplate>\n <span class=\"c-placeholder\">{{ placeholder }}</span>\n </ng-template>\n <cui-svg\n icon=\"cuiIconChevronDown\"\n color=\"var(--cui-base-500)\"\n />\n</button>\n<ng-template #backdrop>\n <div class=\"c-backdrop\"></div>\n</ng-template>\n<ng-template #optionsWrapper>\n <div\n cuiFocusTrap\n class=\"c-options__wrapper\"\n [class.c-options__wrapper_top]=\"isOptionsListAbove\"\n >\n <ng-container *ngTemplateOutlet=\"optionsList\"/>\n </div>\n</ng-template>\n<div\n #getOptionsListHeightContainer\n class=\"c-get-options-list-height-container\"\n>\n <ng-container *ngTemplateOutlet=\"optionsList\"/>\n</div>\n<ng-template #optionsList>\n <ul\n class=\"c-options\"\n [class.c-options_top]=\"isOptionsListAbove\"\n >\n <ng-container *ngIf=\"options.length; else empty\">\n <li *ngFor=\"let option of options; trackBy: trackByFn\">\n <button\n type=\"button\"\n class=\"c-option-button\"\n [class.c-option-button_selected]=\"selectedOption === option\"\n [disabled]=\"option.isDisabled\"\n (click)=\"onSelect($event, option)\"\n >\n <span>{{ option.label }}</span>\n <cui-svg\n *ngIf=\"selectedOption === option\"\n icon=\"cuiIconCheckSm\"\n color=\"var(--cui-info)\"\n class=\"c-option-button__icon\"\n />\n </button>\n </li>\n </ng-container>\n <ng-template #empty>\n <li *ngIf=\"defaultOptionText\">\n <button\n type=\"button\"\n class=\"c-option-button\"\n (click)=\"onClose()\"\n >\n {{ defaultOptionText }}\n </button>\n </li>\n </ng-template>\n </ul>\n</ng-template>\n", styles: [":host{display:block;font-family:var(--cui-main-font);position:relative}.c-button{border:0;flex-shrink:0;outline:none;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;padding:0 13px;font-weight:400;font-size:14px;line-height:20px;display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;border:1px solid var(--cui-base-200);border-radius:8px;cursor:pointer;background:var(--cui-input);color:var(--cui-base-900);font-family:var(--cui-main-font);text-align:start}.c-button:hover{border-color:var(--cui-base-300)}.c-button_active.c-button_active,.c-button:focus{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}.c-button:disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}.c-button[data-size=sm]{padding-top:7px;padding-bottom:7px}.c-button[data-size=md]{padding-top:8px;padding-bottom:8px}.c-button_with-error{border-color:var(--cui-danger)}.c-button_with-error:focus{box-shadow:0 0 0 2px #d92d2040;border-color:var(--cui-danger)}.c-placeholder{color:var(--cui-base-400)}.c-backdrop{position:fixed;inset:0}.c-options__wrapper{position:absolute;font-family:var(--cui-main-font);z-index:1}.c-get-options-list-height-container{position:fixed;visibility:hidden}.c-options{padding:7px 0;margin:0;list-style:none;font-weight:400;font-size:14px;line-height:20px;box-shadow:0 1px 4px #0000000a,0 1px 4px #0000000a;overflow:auto;max-height:180px;border:1px solid var(--cui-base-200);border-radius:8px;background:var(--cui-base-0);color:var(--cui-base-900)}.c-option-button{padding:8px 11px 8px 0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;padding:8px 11px;width:100%;display:flex;align-items:center;gap:12px;text-align:start}.c-option-button:active{background:var(--cui-base-50)}@media (hover: hover){.c-option-button:hover{background:var(--cui-base-50)}}.c-option-button_selected{background:var(--cui-base-50)}.c-option-button:disabled{background:unset;opacity:50%}.c-option-button__icon{margin-left:auto}\n"] }]
3218
+ }], propDecorators: { options: [{
3219
+ type: Input
3220
+ }], defaultOptionText: [{
3221
+ type: Input
3222
+ }], button: [{
3223
+ type: ViewChild,
3224
+ args: ['button']
3225
+ }], getOptionsListHeightContainer: [{
3226
+ type: ViewChild,
3227
+ args: ['getOptionsListHeightContainer']
3228
+ }], backdrop: [{
3229
+ type: ViewChild,
3230
+ args: ['backdrop']
3231
+ }], optionsWrapper: [{
3232
+ type: ViewChild,
3233
+ args: ['optionsWrapper']
3234
+ }], gap: [{
3235
+ type: HostBinding,
3236
+ args: ['style.--c-gap']
3237
+ }], onWindowResize: [{
3238
+ type: HostListener,
3239
+ args: ['window:resize']
3240
+ }] } });
3241
+
3242
+ class CuiSelectModule {
3243
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3244
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiSelectModule, declarations: [CuiSelectComponent], imports: [CommonModule,
3245
+ CuiSvgModule,
3246
+ CuiFocusTrapDirective], exports: [CuiSelectComponent,
3247
+ CuiTextFieldControllerModule] }); }
3248
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSelectModule, imports: [CommonModule,
3249
+ CuiSvgModule, CuiTextFieldControllerModule] }); }
3250
+ }
3251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiSelectModule, decorators: [{
3252
+ type: NgModule,
3253
+ args: [{
3254
+ imports: [
3255
+ CommonModule,
3256
+ CuiSvgModule,
3257
+ CuiFocusTrapDirective
3258
+ ],
3259
+ declarations: [CuiSelectComponent],
3260
+ exports: [
3261
+ CuiSelectComponent,
3262
+ CuiTextFieldControllerModule
3263
+ ]
3264
+ }]
3265
+ }] });
3266
+
3267
+ const CUI_TAB_ACTIVATE = 'cui-tab-activate';
3268
+ class CuiTabComponent {
3269
+ constructor() {
3270
+ this.element = inject(ElementRef).nativeElement;
3271
+ }
3272
+ onClick() {
3273
+ this.element.dispatchEvent(new CustomEvent(CUI_TAB_ACTIVATE, { bubbles: true }));
3274
+ }
3275
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3276
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiTabComponent, selector: "button[cuiTab]", host: { listeners: { "click": "onClick()" } }, ngImport: i0, template: "<ng-content />\n", styles: [":host{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;font-family:var(--cui-main-font)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3277
+ }
3278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTabComponent, decorators: [{
3279
+ type: Component,
3280
+ args: [{ selector: 'button[cuiTab]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n", styles: [":host{padding:0;border:0;flex-shrink:0;outline:none;cursor:pointer;appearance:none;color:inherit;font:inherit;background:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;font-family:var(--cui-main-font)}\n"] }]
3281
+ }], propDecorators: { onClick: [{
3282
+ type: HostListener,
3283
+ args: ['click']
3284
+ }] } });
3285
+
3286
+ class CuiTabsComponent {
3287
+ constructor() {
3288
+ this.element = inject(ElementRef).nativeElement;
3289
+ this.activeElementClass = '_active';
3290
+ this.activeItemIndex = 0;
3291
+ this.activeItemIndexChange = new EventEmitter();
3292
+ }
3293
+ get tabs() {
3294
+ return Array.from(this.element.querySelectorAll('[cuiTab]'));
3295
+ }
3296
+ get activeElement() {
3297
+ return this.tabs[this.activeItemIndex] || null;
3298
+ }
3299
+ ngAfterViewChecked() {
3300
+ this.changeActiveItem();
3301
+ }
3302
+ onActivate(event) {
3303
+ event.stopPropagation();
3304
+ const index = this.tabs.findIndex((tab) => tab === event.target);
3305
+ if (index === this.activeItemIndex) {
3306
+ return;
3307
+ }
3308
+ this.activeItemIndexChange.emit(index);
3309
+ this.activeItemIndex = index;
3310
+ }
3311
+ changeActiveItem() {
3312
+ this.tabs.forEach(nativeElement => {
3313
+ const active = nativeElement === this.activeElement;
3314
+ nativeElement.classList.toggle(this.activeElementClass, active);
3315
+ });
3316
+ }
3317
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3318
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiTabsComponent, selector: "cui-tabs", inputs: { activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { listeners: { "cui-tab-activate": "onActivate($event)" } }, ngImport: i0, template: "<ng-content select=\"[cuiTab]\" />\n", styles: [":host{display:flex;border-radius:8px;gap:32px}:host ::ng-deep>[cuiTab]{padding:8px 12px;font-weight:500;font-size:14px;line-height:20px;color:var(--cui-base-500);border-radius:6px}@media (hover: hover){:host ::ng-deep>[cuiTab]:hover{color:var(--cui-base-900);background:var(--cui-base-50)}}:host ::ng-deep>[cuiTab]:active{color:var(--cui-base-900);background:var(--cui-base-50)}:host ::ng-deep>[cuiTab]._active{color:var(--cui-light-blue-600);background:var(--cui-base-50)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3319
+ }
3320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTabsComponent, decorators: [{
3321
+ type: Component,
3322
+ args: [{ selector: 'cui-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"[cuiTab]\" />\n", styles: [":host{display:flex;border-radius:8px;gap:32px}:host ::ng-deep>[cuiTab]{padding:8px 12px;font-weight:500;font-size:14px;line-height:20px;color:var(--cui-base-500);border-radius:6px}@media (hover: hover){:host ::ng-deep>[cuiTab]:hover{color:var(--cui-base-900);background:var(--cui-base-50)}}:host ::ng-deep>[cuiTab]:active{color:var(--cui-base-900);background:var(--cui-base-50)}:host ::ng-deep>[cuiTab]._active{color:var(--cui-light-blue-600);background:var(--cui-base-50)}\n"] }]
3323
+ }], propDecorators: { activeItemIndex: [{
3324
+ type: Input
3325
+ }], activeItemIndexChange: [{
3326
+ type: Output
3327
+ }], onActivate: [{
3328
+ type: HostListener,
3329
+ args: [CUI_TAB_ACTIVATE, ['$event']]
3330
+ }] } });
3331
+
3332
+ class CuiTabsModule {
3333
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3334
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiTabsModule, declarations: [CuiTabsComponent, CuiTabComponent], exports: [CuiTabsComponent, CuiTabComponent] }); }
3335
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTabsModule }); }
3336
+ }
3337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTabsModule, decorators: [{
3338
+ type: NgModule,
3339
+ args: [{
3340
+ imports: [],
3341
+ declarations: [CuiTabsComponent, CuiTabComponent],
3342
+ exports: [CuiTabsComponent, CuiTabComponent]
3343
+ }]
3344
+ }] });
3345
+
3346
+ class CuiTextareaComponent {
3347
+ constructor() {
3348
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
3349
+ this.rows = 4;
3350
+ this.noBordersAndPaddings = false;
3351
+ }
3352
+ get isError() {
3353
+ return this.cuiTextFieldController.isError;
3354
+ }
3355
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3356
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiTextareaComponent, selector: "textarea[cuiTextarea]", inputs: { rows: "rows", noBordersAndPaddings: "noBordersAndPaddings" }, host: { properties: { "rows": "this.rows", "class._no-borders-and-paddings": "this.noBordersAndPaddings", "class._with-error": "this.isError" } }, providers: [CUI_TEXT_FILED_CONTROLLER_PROVIDER], hostDirectives: [{ directive: i1$1.CuiAutoResizingDirective }], ngImport: i0, template: '', isInline: true, styles: [":host{padding:11px 13px 11px 0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;color:inherit;font:inherit;line-height:inherit;padding:11px 13px;font-weight:400;font-size:14px;line-height:20px;box-sizing:border-box;max-height:320px;width:100%;border:1px solid var(--cui-base-200);border-radius:8px;resize:none;background:none;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus,:host:focus-visible{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host:disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host::placeholder{color:var(--cui-base-400)}:host._no-borders-and-paddings{border:none;border-radius:0;padding:0;box-shadow:none}:host._no-borders-and-paddings:disabled{background:none}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus{box-shadow:0 0 0 2px #d92d2040}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3357
+ }
3358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextareaComponent, decorators: [{
3359
+ type: Component,
3360
+ args: [{ selector: 'textarea[cuiTextarea]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CUI_TEXT_FILED_CONTROLLER_PROVIDER], hostDirectives: [CuiAutoResizingDirective], styles: [":host{padding:11px 13px 11px 0;outline:none;margin:0;border-width:0;appearance:none;caret-color:currentColor;color:inherit;font:inherit;line-height:inherit;padding:11px 13px;font-weight:400;font-size:14px;line-height:20px;box-sizing:border-box;max-height:320px;width:100%;border:1px solid var(--cui-base-200);border-radius:8px;resize:none;background:none;color:var(--cui-base-900);font-family:var(--cui-main-font)}:host:hover{border-color:var(--cui-base-300)}:host:focus,:host:focus-visible{box-shadow:0 0 0 2px var(--cui-focus);border-color:var(--cui-info)}:host:disabled{cursor:not-allowed;opacity:.5;background:var(--cui-base-50);border-color:var(--cui-base-200)}:host::placeholder{color:var(--cui-base-400)}:host._no-borders-and-paddings{border:none;border-radius:0;padding:0;box-shadow:none}:host._no-borders-and-paddings:disabled{background:none}:host._with-error{border-color:var(--cui-danger)}:host._with-error:focus{box-shadow:0 0 0 2px #d92d2040}\n"] }]
3361
+ }], propDecorators: { rows: [{
3362
+ type: Input
3363
+ }, {
3364
+ type: HostBinding,
3365
+ args: ['rows']
3366
+ }], noBordersAndPaddings: [{
3367
+ type: Input
3368
+ }, {
3369
+ type: HostBinding,
3370
+ args: ['class._no-borders-and-paddings']
3371
+ }], isError: [{
3372
+ type: HostBinding,
3373
+ args: ['class._with-error']
3374
+ }] } });
3375
+
3376
+ class CuiTextareaModule {
3377
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextareaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3378
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiTextareaModule, declarations: [CuiTextareaComponent], exports: [CuiTextareaComponent] }); }
3379
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextareaModule }); }
3380
+ }
3381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiTextareaModule, decorators: [{
3382
+ type: NgModule,
3383
+ args: [{
3384
+ declarations: [CuiTextareaComponent],
3385
+ exports: [CuiTextareaComponent]
3386
+ }]
3387
+ }] });
3388
+
3389
+ class CuiToggleComponent {
3390
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3391
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CuiToggleComponent, selector: "input[type=\"checkbox\"][cuiToggle]", ngImport: i0, template: '', isInline: true, styles: [":host{position:relative;width:30px;height:18px;border-radius:9px;margin:0;appearance:none;cursor:pointer;background:var(--cui-base-300);transition:background .5s ease}:host:before{content:\"\";position:absolute;top:50%;left:2px;transform:translateY(-50%);width:14px;height:14px;border-radius:50%;background:var(--cui-gray-0);transition:left .5s ease}:host:checked{background:var(--cui-info);transition:background .5s ease}:host:checked:before{left:14px;transition:left .5s ease}:host:disabled{cursor:not-allowed;background:var(--cui-base-300)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3392
+ }
3393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiToggleComponent, decorators: [{
3394
+ type: Component,
3395
+ args: [{ selector: 'input[type="checkbox"][cuiToggle]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{position:relative;width:30px;height:18px;border-radius:9px;margin:0;appearance:none;cursor:pointer;background:var(--cui-base-300);transition:background .5s ease}:host:before{content:\"\";position:absolute;top:50%;left:2px;transform:translateY(-50%);width:14px;height:14px;border-radius:50%;background:var(--cui-gray-0);transition:left .5s ease}:host:checked{background:var(--cui-info);transition:background .5s ease}:host:checked:before{left:14px;transition:left .5s ease}:host:disabled{cursor:not-allowed;background:var(--cui-base-300)}\n"] }]
3396
+ }] });
3397
+
3398
+ class CuiToggleModule {
3399
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3400
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CuiToggleModule, declarations: [CuiToggleComponent], exports: [CuiToggleComponent] }); }
3401
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiToggleModule }); }
3402
+ }
3403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CuiToggleModule, decorators: [{
3404
+ type: NgModule,
3405
+ args: [{
3406
+ declarations: [CuiToggleComponent],
3407
+ exports: [CuiToggleComponent]
3408
+ }]
3409
+ }] });
3410
+
3411
+ /**
3412
+ * Generated bundle index. Do not edit.
3413
+ */
3414
+
3415
+ export { CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_ROOT_SELECTOR, CUI_TAB_ACTIVATE, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CuiAccordionComponent, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCheckboxComponent, CuiCheckboxModule, CuiContextMenuComponent, CuiContextMenuModule, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiFormFieldComponent, CuiFormFieldModule, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiLabelComponent, CuiLabelModule, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSvgComponent, CuiSvgModule, CuiTabComponent, CuiTabsComponent, CuiTabsModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiVisualViewportService, cuiGetDuration, cuiIsObscured, cuiOverrideOptions, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider };
3416
+ //# sourceMappingURL=cuby-ui-core.mjs.map