@cuby-ui/core 0.0.132 → 0.0.134

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 (274) hide show
  1. package/README.md +24 -24
  2. package/components/accordion/accordion-item/accordion-item.component.d.ts +11 -11
  3. package/components/accordion/accordion.component.d.ts +5 -5
  4. package/components/accordion/accordion.module.d.ts +11 -11
  5. package/components/accordion/index.d.ts +3 -3
  6. package/components/alert/alert.component.d.ts +13 -13
  7. package/components/alert/alert.interfaces.d.ts +9 -9
  8. package/components/alert/alert.module.d.ts +11 -11
  9. package/components/alert/alert.service.d.ts +7 -7
  10. package/components/alert/alert.tokens.d.ts +15 -15
  11. package/components/alert/alert.types.d.ts +3 -3
  12. package/components/alert/alerts.component.d.ts +17 -17
  13. package/components/alert/index.d.ts +8 -8
  14. package/components/badge/badge.component.d.ts +10 -10
  15. package/components/badge/badge.module.d.ts +8 -8
  16. package/components/badge/badge.options.d.ts +8 -8
  17. package/components/badge/index.d.ts +2 -2
  18. package/components/banner/banner.component.d.ts +21 -21
  19. package/components/banner/banner.module.d.ts +11 -11
  20. package/components/banner/banner.options.d.ts +13 -13
  21. package/components/banner/index.d.ts +3 -3
  22. package/components/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +6 -6
  23. package/components/breadcrumbs/breadcrumbs.component.d.ts +7 -7
  24. package/components/breadcrumbs/breadcrumbs.module.d.ts +10 -10
  25. package/components/breadcrumbs/index.d.ts +3 -3
  26. package/components/button/button.component.d.ts +30 -30
  27. package/components/button/button.module.d.ts +9 -9
  28. package/components/button/button.options.d.ts +9 -9
  29. package/components/button/index.d.ts +3 -3
  30. package/components/button-group/button-group.component.d.ts +5 -5
  31. package/components/button-group/button-group.module.d.ts +7 -7
  32. package/components/button-group/index.d.ts +2 -2
  33. package/components/checkbox/checkbox.component.d.ts +5 -5
  34. package/components/checkbox/checkbox.module.d.ts +7 -7
  35. package/components/checkbox/index.d.ts +2 -2
  36. package/components/context-menu/context-menu.component.d.ts +39 -39
  37. package/components/context-menu/context-menu.module.d.ts +9 -9
  38. package/components/context-menu/index.d.ts +2 -2
  39. package/components/dialog/dialog-actions/dialog-actions.component.d.ts +5 -5
  40. package/components/dialog/dialog-header/dialog-header.component.d.ts +13 -13
  41. package/components/dialog/dialog.component.d.ts +37 -37
  42. package/components/dialog/dialog.interfaces.d.ts +10 -10
  43. package/components/dialog/dialog.module.d.ts +14 -14
  44. package/components/dialog/dialog.service.d.ts +7 -7
  45. package/components/dialog/dialog.tokens.d.ts +8 -8
  46. package/components/dialog/dialogs.component.d.ts +17 -17
  47. package/components/dialog/index.d.ts +8 -8
  48. package/components/form-field/form-field.component.d.ts +5 -5
  49. package/components/form-field/form-field.module.d.ts +7 -7
  50. package/components/form-field/index.d.ts +2 -2
  51. package/components/hint/hint.component.d.ts +7 -7
  52. package/components/hint/hint.module.d.ts +7 -7
  53. package/components/hint/index.d.ts +2 -2
  54. package/components/icon-button/icon-button.component.d.ts +13 -13
  55. package/components/icon-button/icon-button.module.d.ts +9 -9
  56. package/components/icon-button/index.d.ts +2 -2
  57. package/components/index.d.ts +25 -25
  58. package/components/input-number/index.d.ts +2 -2
  59. package/components/input-number/input-number.component.d.ts +55 -55
  60. package/components/input-number/input-number.module.d.ts +11 -11
  61. package/components/input-number/input-number.options.d.ts +9 -9
  62. package/components/input-password/index.d.ts +2 -2
  63. package/components/input-password/input-password.component.d.ts +31 -31
  64. package/components/input-password/input-password.module.d.ts +11 -11
  65. package/components/input-text/index.d.ts +2 -2
  66. package/components/input-text/input-text.component.d.ts +31 -31
  67. package/components/input-text/input-text.module.d.ts +11 -11
  68. package/components/label/index.d.ts +2 -2
  69. package/components/label/label.component.d.ts +6 -6
  70. package/components/label/label.module.d.ts +8 -8
  71. package/components/notification/index.d.ts +3 -3
  72. package/components/notification/notification.component.d.ts +13 -13
  73. package/components/notification/notification.module.d.ts +10 -10
  74. package/components/notification/notification.options.d.ts +13 -13
  75. package/components/radio/index.d.ts +2 -2
  76. package/components/radio/radio.component.d.ts +5 -5
  77. package/components/radio/radio.module.d.ts +7 -7
  78. package/components/root/index.d.ts +3 -3
  79. package/components/root/root.component.d.ts +11 -11
  80. package/components/root/root.module.d.ts +10 -10
  81. package/components/root/root.options.d.ts +1 -1
  82. package/components/select/index.d.ts +2 -2
  83. package/components/select/select.component.d.ts +52 -52
  84. package/components/select/select.module.d.ts +10 -10
  85. package/components/svg/index.d.ts +2 -2
  86. package/components/svg/svg.component.d.ts +16 -16
  87. package/components/svg/svg.module.d.ts +8 -8
  88. package/components/tabs/index.d.ts +3 -3
  89. package/components/tabs/tab/index.d.ts +1 -1
  90. package/components/tabs/tab/tab.component.d.ts +8 -8
  91. package/components/tabs/tabs.component.d.ts +16 -16
  92. package/components/tabs/tabs.module.d.ts +8 -8
  93. package/components/textarea/index.d.ts +2 -2
  94. package/components/textarea/textarea.component.d.ts +10 -10
  95. package/components/textarea/textarea.module.d.ts +7 -7
  96. package/components/toggle/index.d.ts +2 -2
  97. package/components/toggle/toggle.component.d.ts +5 -5
  98. package/components/toggle/toggle.module.d.ts +7 -7
  99. package/directives/index.d.ts +1 -1
  100. package/directives/text-field-controller/index.d.ts +8 -8
  101. package/directives/text-field-controller/text-field-controller.module.d.ts +11 -11
  102. package/directives/text-field-controller/text-field-controller.provider.d.ts +4 -4
  103. package/directives/text-field-controller/text-field-icon-left.directive.d.ts +9 -9
  104. package/directives/text-field-controller/text-field-id.directive.d.ts +8 -8
  105. package/directives/text-field-controller/text-field-is-error.directive.d.ts +8 -8
  106. package/directives/text-field-controller/text-field-placeholder.directive.d.ts +8 -8
  107. package/directives/text-field-controller/text-field-size.directive.d.ts +9 -9
  108. package/directives/text-field-controller/text-field.controller.d.ts +20 -20
  109. package/esm2020/components/accordion/accordion-item/accordion-item.component.mjs +28 -28
  110. package/esm2020/components/accordion/accordion.component.mjs +11 -11
  111. package/esm2020/components/accordion/accordion.module.mjs +37 -37
  112. package/esm2020/components/accordion/index.mjs +4 -4
  113. package/esm2020/components/alert/alert.component.mjs +37 -37
  114. package/esm2020/components/alert/alert.interfaces.mjs +2 -2
  115. package/esm2020/components/alert/alert.module.mjs +40 -40
  116. package/esm2020/components/alert/alert.service.mjs +17 -17
  117. package/esm2020/components/alert/alert.tokens.mjs +19 -19
  118. package/esm2020/components/alert/alert.types.mjs +2 -2
  119. package/esm2020/components/alert/alerts.component.mjs +36 -36
  120. package/esm2020/components/alert/index.mjs +9 -9
  121. package/esm2020/components/badge/badge.component.mjs +31 -31
  122. package/esm2020/components/badge/badge.module.mjs +18 -18
  123. package/esm2020/components/badge/badge.options.mjs +8 -8
  124. package/esm2020/components/badge/index.mjs +3 -3
  125. package/esm2020/components/banner/banner.component.mjs +68 -68
  126. package/esm2020/components/banner/banner.module.mjs +31 -31
  127. package/esm2020/components/banner/banner.options.mjs +6 -6
  128. package/esm2020/components/banner/index.mjs +4 -4
  129. package/esm2020/components/breadcrumbs/breadcrumb/breadcrumb.component.mjs +16 -16
  130. package/esm2020/components/breadcrumbs/breadcrumbs.component.mjs +17 -17
  131. package/esm2020/components/breadcrumbs/breadcrumbs.module.mjs +33 -33
  132. package/esm2020/components/breadcrumbs/index.mjs +4 -4
  133. package/esm2020/components/button/button.component.mjs +104 -104
  134. package/esm2020/components/button/button.module.mjs +24 -24
  135. package/esm2020/components/button/button.options.mjs +10 -10
  136. package/esm2020/components/button/index.mjs +4 -4
  137. package/esm2020/components/button-group/button-group.component.mjs +11 -11
  138. package/esm2020/components/button-group/button-group.module.mjs +16 -16
  139. package/esm2020/components/button-group/index.mjs +3 -3
  140. package/esm2020/components/checkbox/checkbox.component.mjs +11 -11
  141. package/esm2020/components/checkbox/checkbox.module.mjs +16 -16
  142. package/esm2020/components/checkbox/index.mjs +3 -3
  143. package/esm2020/components/context-menu/context-menu.component.mjs +146 -146
  144. package/esm2020/components/context-menu/context-menu.module.mjs +24 -24
  145. package/esm2020/components/context-menu/index.mjs +3 -3
  146. package/esm2020/components/dialog/dialog-actions/dialog-actions.component.mjs +11 -11
  147. package/esm2020/components/dialog/dialog-header/dialog-header.component.mjs +28 -28
  148. package/esm2020/components/dialog/dialog.component.mjs +76 -76
  149. package/esm2020/components/dialog/dialog.interfaces.mjs +2 -2
  150. package/esm2020/components/dialog/dialog.module.mjs +50 -50
  151. package/esm2020/components/dialog/dialog.service.mjs +17 -17
  152. package/esm2020/components/dialog/dialog.tokens.mjs +11 -11
  153. package/esm2020/components/dialog/dialogs.component.mjs +48 -48
  154. package/esm2020/components/dialog/index.mjs +9 -9
  155. package/esm2020/components/form-field/form-field.component.mjs +11 -11
  156. package/esm2020/components/form-field/form-field.module.mjs +16 -16
  157. package/esm2020/components/form-field/index.mjs +3 -3
  158. package/esm2020/components/hint/hint.component.mjs +19 -19
  159. package/esm2020/components/hint/hint.module.mjs +16 -16
  160. package/esm2020/components/hint/index.mjs +3 -3
  161. package/esm2020/components/icon-button/icon-button.component.mjs +32 -32
  162. package/esm2020/components/icon-button/icon-button.module.mjs +24 -24
  163. package/esm2020/components/icon-button/index.mjs +3 -3
  164. package/esm2020/components/index.mjs +26 -26
  165. package/esm2020/components/input-number/index.mjs +3 -3
  166. package/esm2020/components/input-number/input-number.component.mjs +204 -204
  167. package/esm2020/components/input-number/input-number.module.mjs +33 -33
  168. package/esm2020/components/input-number/input-number.options.mjs +11 -11
  169. package/esm2020/components/input-password/index.mjs +3 -3
  170. package/esm2020/components/input-password/input-password.component.mjs +89 -89
  171. package/esm2020/components/input-password/input-password.module.mjs +33 -33
  172. package/esm2020/components/input-text/index.mjs +3 -3
  173. package/esm2020/components/input-text/input-text.component.mjs +87 -87
  174. package/esm2020/components/input-text/input-text.module.mjs +33 -33
  175. package/esm2020/components/label/index.mjs +3 -3
  176. package/esm2020/components/label/label.component.mjs +17 -17
  177. package/esm2020/components/label/label.module.mjs +18 -18
  178. package/esm2020/components/notification/index.mjs +4 -4
  179. package/esm2020/components/notification/notification.component.mjs +51 -51
  180. package/esm2020/components/notification/notification.module.mjs +27 -27
  181. package/esm2020/components/notification/notification.options.mjs +6 -6
  182. package/esm2020/components/radio/index.mjs +3 -3
  183. package/esm2020/components/radio/radio.component.mjs +11 -11
  184. package/esm2020/components/radio/radio.module.mjs +16 -16
  185. package/esm2020/components/root/index.mjs +4 -4
  186. package/esm2020/components/root/root.component.mjs +31 -31
  187. package/esm2020/components/root/root.module.mjs +28 -28
  188. package/esm2020/components/root/root.options.mjs +1 -1
  189. package/esm2020/components/select/index.mjs +3 -3
  190. package/esm2020/components/select/select.component.mjs +165 -165
  191. package/esm2020/components/select/select.module.mjs +29 -29
  192. package/esm2020/components/svg/index.mjs +3 -3
  193. package/esm2020/components/svg/svg.component.mjs +50 -50
  194. package/esm2020/components/svg/svg.module.mjs +18 -18
  195. package/esm2020/components/tabs/index.mjs +4 -4
  196. package/esm2020/components/tabs/tab/index.mjs +1 -1
  197. package/esm2020/components/tabs/tab/tab.component.mjs +21 -21
  198. package/esm2020/components/tabs/tabs.component.mjs +49 -49
  199. package/esm2020/components/tabs/tabs.module.mjs +18 -18
  200. package/esm2020/components/textarea/index.mjs +3 -3
  201. package/esm2020/components/textarea/textarea.component.mjs +35 -35
  202. package/esm2020/components/textarea/textarea.module.mjs +16 -16
  203. package/esm2020/components/toggle/index.mjs +3 -3
  204. package/esm2020/components/toggle/toggle.component.mjs +11 -11
  205. package/esm2020/components/toggle/toggle.module.mjs +16 -16
  206. package/esm2020/cuby-ui-core.mjs +4 -4
  207. package/esm2020/directives/index.mjs +2 -2
  208. package/esm2020/directives/text-field-controller/index.mjs +9 -9
  209. package/esm2020/directives/text-field-controller/text-field-controller.module.mjs +40 -40
  210. package/esm2020/directives/text-field-controller/text-field-controller.provider.mjs +24 -24
  211. package/esm2020/directives/text-field-controller/text-field-icon-left.directive.mjs +21 -21
  212. package/esm2020/directives/text-field-controller/text-field-id.directive.mjs +21 -21
  213. package/esm2020/directives/text-field-controller/text-field-is-error.directive.mjs +24 -24
  214. package/esm2020/directives/text-field-controller/text-field-placeholder.directive.mjs +21 -21
  215. package/esm2020/directives/text-field-controller/text-field-size.directive.mjs +24 -24
  216. package/esm2020/directives/text-field-controller/text-field.controller.mjs +25 -25
  217. package/esm2020/index.mjs +7 -7
  218. package/esm2020/interfaces/context-menu-item.mjs +2 -2
  219. package/esm2020/interfaces/index.mjs +3 -3
  220. package/esm2020/interfaces/option.mjs +2 -2
  221. package/esm2020/services/index.mjs +3 -3
  222. package/esm2020/services/theme.options.mjs +6 -6
  223. package/esm2020/services/theme.service.mjs +30 -30
  224. package/esm2020/types/appearance.mjs +2 -2
  225. package/esm2020/types/hint-type.mjs +2 -2
  226. package/esm2020/types/index.mjs +8 -8
  227. package/esm2020/types/position.mjs +2 -2
  228. package/esm2020/types/resizing.mjs +2 -2
  229. package/esm2020/types/shape.mjs +2 -2
  230. package/esm2020/types/size.mjs +2 -2
  231. package/esm2020/types/status.mjs +2 -2
  232. package/esm2020/utils/format/index.mjs +3 -3
  233. package/esm2020/utils/format/remove-spaces.mjs +4 -4
  234. package/esm2020/utils/format/replace.mjs +5 -5
  235. package/esm2020/utils/index.mjs +2 -2
  236. package/fesm2015/cuby-ui-core.mjs +2050 -2050
  237. package/fesm2015/cuby-ui-core.mjs.map +1 -1
  238. package/fesm2020/cuby-ui-core.mjs +2049 -2049
  239. package/fesm2020/cuby-ui-core.mjs.map +1 -1
  240. package/fonts/Inter-Bold.svg +25443 -25443
  241. package/fonts/Inter-Medium.svg +25400 -25400
  242. package/fonts/Inter-Regular.svg +24341 -24341
  243. package/fonts/Inter-SemiBold.svg +25459 -25459
  244. package/index.d.ts +6 -6
  245. package/interfaces/context-menu-item.d.ts +7 -7
  246. package/interfaces/index.d.ts +2 -2
  247. package/interfaces/option.d.ts +5 -5
  248. package/package.json +3 -3
  249. package/services/index.d.ts +2 -2
  250. package/services/theme.options.d.ts +5 -5
  251. package/services/theme.service.d.ts +12 -12
  252. package/styles/fonts.scss +51 -51
  253. package/styles/global.scss +9 -9
  254. package/styles/mixins/buttons.scss +13 -13
  255. package/styles/mixins/headings.scss +115 -115
  256. package/styles/mixins/inputs.scss +91 -91
  257. package/styles/mixins/lists.scss +5 -5
  258. package/styles/mixins/paddings.scss +35 -35
  259. package/styles/mixins/shadows.scss +38 -38
  260. package/styles/mixins/texts.scss +225 -225
  261. package/styles/theme.scss +351 -351
  262. package/styles/variables/colors.scss +240 -240
  263. package/types/appearance.d.ts +8 -8
  264. package/types/hint-type.d.ts +1 -1
  265. package/types/index.d.ts +7 -7
  266. package/types/position.d.ts +2 -2
  267. package/types/resizing.d.ts +2 -2
  268. package/types/shape.d.ts +1 -1
  269. package/types/size.d.ts +4 -4
  270. package/types/status.d.ts +1 -1
  271. package/utils/format/index.d.ts +2 -2
  272. package/utils/format/remove-spaces.d.ts +1 -1
  273. package/utils/format/replace.d.ts +1 -1
  274. package/utils/index.d.ts +1 -1
@@ -12,2208 +12,2208 @@ import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
12
12
  import * as i2$2 from '@angular/forms';
13
13
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
14
14
 
15
- class CuiAccordionComponent {
16
- }
17
- CuiAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
- CuiAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiAccordionComponent, selector: "cui-accordion", ngImport: i0, template: "<ng-content select=\"cui-accordion-item\"></ng-content>\r\n", styles: [":host{display:flex;flex-direction:column;gap:16px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionComponent, decorators: [{
20
- type: Component,
21
- args: [{ selector: 'cui-accordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"cui-accordion-item\"></ng-content>\r\n", styles: [":host{display:flex;flex-direction:column;gap:16px}\n"] }]
15
+ class CuiAccordionComponent {
16
+ }
17
+ CuiAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
+ CuiAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionComponent, decorators: [{
20
+ type: Component,
21
+ 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"] }]
22
22
  }] });
23
23
 
24
- const CUI_BUTTON_DEFAULT_OPTIONS = {
25
- appearance: 'action',
26
- shape: null,
27
- size: 'sm'
28
- };
29
- const CUI_BUTTON_OPTIONS = new InjectionToken('', {
30
- factory: () => CUI_BUTTON_DEFAULT_OPTIONS
24
+ const CUI_BUTTON_DEFAULT_OPTIONS = {
25
+ appearance: 'action',
26
+ shape: null,
27
+ size: 'sm'
28
+ };
29
+ const CUI_BUTTON_OPTIONS = new InjectionToken('', {
30
+ factory: () => CUI_BUTTON_DEFAULT_OPTIONS
31
31
  });
32
32
 
33
- class CuiSvgComponent {
34
- constructor() {
35
- this.domSanitizer = inject(DomSanitizer);
36
- }
37
- set icon(icon) {
38
- // TODO: В данном случае подключаются все иконки (вероятно, можно как-то оптимизировано их подключать)
39
- this.safeSvgContent = this.domSanitizer.bypassSecurityTrustHtml(cuiIsIcon(icon)
40
- ? CUI_ICONS[icon]
41
- : icon);
42
- }
43
- get isWithStrokeWidth() {
44
- return !!this.strokeWidth;
45
- }
46
- get isWithColor() {
47
- return !!this.color;
48
- }
49
- }
50
- CuiSvgComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
- CuiSvgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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\r\n [innerHTML]=\"safeSvgContent\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\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 });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, decorators: [{
53
- type: Component,
54
- args: [{ selector: 'cui-svg[icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\r\n [innerHTML]=\"safeSvgContent\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\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"] }]
55
- }], propDecorators: { width: [{
56
- type: Input
57
- }], height: [{
58
- type: Input
59
- }], strokeWidth: [{
60
- type: Input
61
- }, {
62
- type: HostBinding,
63
- args: ['style.--stroke-width']
64
- }], color: [{
65
- type: Input
66
- }, {
67
- type: HostBinding,
68
- args: ['style.--color']
69
- }], icon: [{
70
- type: Input
71
- }], isWithStrokeWidth: [{
72
- type: HostBinding,
73
- args: ['class._with-stroke-width']
74
- }], isWithColor: [{
75
- type: HostBinding,
76
- args: ['class._with-color']
33
+ class CuiSvgComponent {
34
+ constructor() {
35
+ this.domSanitizer = inject(DomSanitizer);
36
+ }
37
+ set icon(icon) {
38
+ // TODO: В данном случае подключаются все иконки (вероятно, можно как-то оптимизировано их подключать)
39
+ this.safeSvgContent = this.domSanitizer.bypassSecurityTrustHtml(cuiIsIcon(icon)
40
+ ? CUI_ICONS[icon]
41
+ : icon);
42
+ }
43
+ get isWithStrokeWidth() {
44
+ return !!this.strokeWidth;
45
+ }
46
+ get isWithColor() {
47
+ return !!this.color;
48
+ }
49
+ }
50
+ CuiSvgComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
+ CuiSvgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, decorators: [{
53
+ type: Component,
54
+ 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"] }]
55
+ }], propDecorators: { width: [{
56
+ type: Input
57
+ }], height: [{
58
+ type: Input
59
+ }], strokeWidth: [{
60
+ type: Input
61
+ }, {
62
+ type: HostBinding,
63
+ args: ['style.--stroke-width']
64
+ }], color: [{
65
+ type: Input
66
+ }, {
67
+ type: HostBinding,
68
+ args: ['style.--color']
69
+ }], icon: [{
70
+ type: Input
71
+ }], isWithStrokeWidth: [{
72
+ type: HostBinding,
73
+ args: ['class._with-stroke-width']
74
+ }], isWithColor: [{
75
+ type: HostBinding,
76
+ args: ['class._with-color']
77
77
  }] } });
78
78
 
79
- class CuiButtonComponent {
80
- constructor() {
81
- this.cuiButtonOptions = inject(CUI_BUTTON_OPTIONS);
82
- this.COLOR_BASE_500 = 'var(--cui-base-500)';
83
- this.BUTTON_ICONS_COLOR_BASE_500 = [
84
- 'secondary',
85
- 'outlined',
86
- 'outlined-gray',
87
- 'ghost'
88
- ];
89
- this._appearance = this.cuiButtonOptions.appearance;
90
- this.iconColor = 'currentColor';
91
- this._size = this.cuiButtonOptions.size;
92
- this.iconDimensions = {
93
- width: 20,
94
- height: 20
95
- };
96
- this.shape = this.cuiButtonOptions.shape;
97
- this.disabled = false;
98
- this.isLoaderShown = false;
99
- this.containsOnlyIcon = false;
100
- }
101
- get appearance() {
102
- return this._appearance;
103
- }
104
- set appearance(appearance) {
105
- this._appearance = appearance;
106
- if (this.BUTTON_ICONS_COLOR_BASE_500.includes(appearance)) {
107
- this.iconColor = this.COLOR_BASE_500;
108
- return;
109
- }
110
- this.iconColor = 'currentColor';
111
- }
112
- get size() {
113
- return this._size;
114
- }
115
- set size(size) {
116
- this._size = size;
117
- if (size === 'xxs') {
118
- this.iconDimensions = {
119
- width: 16,
120
- height: 16
121
- };
122
- return;
123
- }
124
- this.iconDimensions = {
125
- width: 20,
126
- height: 20
127
- };
128
- }
129
- get isDisabled() {
130
- return this.disabled || this.isLoaderShown;
131
- }
132
- }
133
- CuiButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
- CuiButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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\r\n class=\"c-wrapper\"\r\n [class.c-wrapper_invisible]=\"isLoaderShown\"\r\n>\r\n <cui-svg\r\n *ngIf=\"icon\"\r\n [icon]=\"icon\"\r\n [width]=\"iconDimensions.width\"\r\n [height]=\"iconDimensions.height\"\r\n [color]=\"iconColor\"\r\n ></cui-svg>\r\n <span\r\n #content\r\n class=\"c-content\"\r\n ><ng-content></ng-content></span>\r\n <cui-svg\r\n *ngIf=\"iconRight\"\r\n [icon]=\"iconRight\"\r\n [width]=\"iconDimensions.width\"\r\n [height]=\"iconDimensions.height\"\r\n [color]=\"iconColor\"\r\n ></cui-svg>\r\n</span>\r\n<cui-svg\r\n *ngIf=\"isLoaderShown\"\r\n icon=\"cuiIconLoading\"\r\n class=\"c-loader\"\r\n></cui-svg>\r\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(--cui-light-blue-500);color:var(--cui-gray-0);border:1px solid var(--cui-light-blue-500)}@media (hover: hover){:host[data-appearance=action]:hover{background:var(--cui-light-blue-600);border-color:var(--cui-light-blue-600)}}:host[data-appearance=action]:active{background:var(--cui-light-blue-600);border-color:var(--cui-light-blue-600)}:host[data-appearance=action]:disabled{background:var(--cui-light-blue-500);border-color:var(--cui-light-blue-500)}: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(--cui-base-900)}@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 8px}:host[data-size=xxs][data-appearance=action],:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}: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}:host-context([cuiTheme=dark])[data-appearance=action]{background:var(--cui-light-blue-700)}@media (hover: hover){:host-context([cuiTheme=dark])[data-appearance=action]:hover{background:var(--cui-light-blue-600)}}:host-context([cuiTheme=dark])[data-appearance=action]:active{background:var(--cui-light-blue-600)}:host-context([cuiTheme=dark])[data-appearance=action]:disabled{background:var(--cui-light-blue-700)}@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 });
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, decorators: [{
136
- type: Component,
137
- args: [{ selector: 'button[cuiButton], a[cuiButton]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\r\n class=\"c-wrapper\"\r\n [class.c-wrapper_invisible]=\"isLoaderShown\"\r\n>\r\n <cui-svg\r\n *ngIf=\"icon\"\r\n [icon]=\"icon\"\r\n [width]=\"iconDimensions.width\"\r\n [height]=\"iconDimensions.height\"\r\n [color]=\"iconColor\"\r\n ></cui-svg>\r\n <span\r\n #content\r\n class=\"c-content\"\r\n ><ng-content></ng-content></span>\r\n <cui-svg\r\n *ngIf=\"iconRight\"\r\n [icon]=\"iconRight\"\r\n [width]=\"iconDimensions.width\"\r\n [height]=\"iconDimensions.height\"\r\n [color]=\"iconColor\"\r\n ></cui-svg>\r\n</span>\r\n<cui-svg\r\n *ngIf=\"isLoaderShown\"\r\n icon=\"cuiIconLoading\"\r\n class=\"c-loader\"\r\n></cui-svg>\r\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(--cui-light-blue-500);color:var(--cui-gray-0);border:1px solid var(--cui-light-blue-500)}@media (hover: hover){:host[data-appearance=action]:hover{background:var(--cui-light-blue-600);border-color:var(--cui-light-blue-600)}}:host[data-appearance=action]:active{background:var(--cui-light-blue-600);border-color:var(--cui-light-blue-600)}:host[data-appearance=action]:disabled{background:var(--cui-light-blue-500);border-color:var(--cui-light-blue-500)}: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(--cui-base-900)}@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 8px}:host[data-size=xxs][data-appearance=action],:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}: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}:host-context([cuiTheme=dark])[data-appearance=action]{background:var(--cui-light-blue-700)}@media (hover: hover){:host-context([cuiTheme=dark])[data-appearance=action]:hover{background:var(--cui-light-blue-600)}}:host-context([cuiTheme=dark])[data-appearance=action]:active{background:var(--cui-light-blue-600)}:host-context([cuiTheme=dark])[data-appearance=action]:disabled{background:var(--cui-light-blue-700)}@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"] }]
138
- }], propDecorators: { shape: [{
139
- type: Input
140
- }, {
141
- type: HostBinding,
142
- args: ['attr.data-shape']
143
- }], disabled: [{
144
- type: Input
145
- }, {
146
- type: HostBinding,
147
- args: ['class._disabled']
148
- }], isLoaderShown: [{
149
- type: Input
150
- }, {
151
- type: HostBinding,
152
- args: ['class._loading']
153
- }], icon: [{
154
- type: Input
155
- }], iconRight: [{
156
- type: Input
157
- }], appearance: [{
158
- type: Input
159
- }, {
160
- type: HostBinding,
161
- args: ['attr.data-appearance']
162
- }], size: [{
163
- type: Input
164
- }, {
165
- type: HostBinding,
166
- args: ['attr.data-size']
167
- }], containsOnlyIcon: [{
168
- type: HostBinding,
169
- args: ['class._only-icon']
170
- }], isDisabled: [{
171
- type: HostBinding,
172
- args: ['disabled']
173
- }], content: [{
174
- type: ViewChild,
175
- args: ['content']
79
+ class CuiButtonComponent {
80
+ constructor() {
81
+ this.cuiButtonOptions = inject(CUI_BUTTON_OPTIONS);
82
+ this.COLOR_BASE_500 = 'var(--cui-base-500)';
83
+ this.BUTTON_ICONS_COLOR_BASE_500 = [
84
+ 'secondary',
85
+ 'outlined',
86
+ 'outlined-gray',
87
+ 'ghost'
88
+ ];
89
+ this._appearance = this.cuiButtonOptions.appearance;
90
+ this.iconColor = 'currentColor';
91
+ this._size = this.cuiButtonOptions.size;
92
+ this.iconDimensions = {
93
+ width: 20,
94
+ height: 20
95
+ };
96
+ this.shape = this.cuiButtonOptions.shape;
97
+ this.disabled = false;
98
+ this.isLoaderShown = false;
99
+ this.containsOnlyIcon = false;
100
+ }
101
+ get appearance() {
102
+ return this._appearance;
103
+ }
104
+ set appearance(appearance) {
105
+ this._appearance = appearance;
106
+ if (this.BUTTON_ICONS_COLOR_BASE_500.includes(appearance)) {
107
+ this.iconColor = this.COLOR_BASE_500;
108
+ return;
109
+ }
110
+ this.iconColor = 'currentColor';
111
+ }
112
+ get size() {
113
+ return this._size;
114
+ }
115
+ set size(size) {
116
+ this._size = size;
117
+ if (size === 'xxs') {
118
+ this.iconDimensions = {
119
+ width: 16,
120
+ height: 16
121
+ };
122
+ return;
123
+ }
124
+ this.iconDimensions = {
125
+ width: 20,
126
+ height: 20
127
+ };
128
+ }
129
+ get isDisabled() {
130
+ return this.disabled || this.isLoaderShown;
131
+ }
132
+ }
133
+ CuiButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
+ CuiButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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(--cui-light-blue-500);color:var(--cui-gray-0);border:1px solid var(--cui-light-blue-500)}@media (hover: hover){:host[data-appearance=action]:hover{background:var(--cui-light-blue-600);border-color:var(--cui-light-blue-600)}}:host[data-appearance=action]:active{background:var(--cui-light-blue-600);border-color:var(--cui-light-blue-600)}:host[data-appearance=action]:disabled{background:var(--cui-light-blue-500);border-color:var(--cui-light-blue-500)}: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(--cui-base-900)}@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 8px}:host[data-size=xxs][data-appearance=action],:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}: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}:host-context([cuiTheme=dark])[data-appearance=action]{background:var(--cui-light-blue-700)}@media (hover: hover){:host-context([cuiTheme=dark])[data-appearance=action]:hover{background:var(--cui-light-blue-600)}}:host-context([cuiTheme=dark])[data-appearance=action]:active{background:var(--cui-light-blue-600)}:host-context([cuiTheme=dark])[data-appearance=action]:disabled{background:var(--cui-light-blue-700)}@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 });
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, decorators: [{
136
+ type: Component,
137
+ 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(--cui-light-blue-500);color:var(--cui-gray-0);border:1px solid var(--cui-light-blue-500)}@media (hover: hover){:host[data-appearance=action]:hover{background:var(--cui-light-blue-600);border-color:var(--cui-light-blue-600)}}:host[data-appearance=action]:active{background:var(--cui-light-blue-600);border-color:var(--cui-light-blue-600)}:host[data-appearance=action]:disabled{background:var(--cui-light-blue-500);border-color:var(--cui-light-blue-500)}: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(--cui-base-900)}@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 8px}:host[data-size=xxs][data-appearance=action],:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}: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}:host-context([cuiTheme=dark])[data-appearance=action]{background:var(--cui-light-blue-700)}@media (hover: hover){:host-context([cuiTheme=dark])[data-appearance=action]:hover{background:var(--cui-light-blue-600)}}:host-context([cuiTheme=dark])[data-appearance=action]:active{background:var(--cui-light-blue-600)}:host-context([cuiTheme=dark])[data-appearance=action]:disabled{background:var(--cui-light-blue-700)}@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"] }]
138
+ }], propDecorators: { shape: [{
139
+ type: Input
140
+ }, {
141
+ type: HostBinding,
142
+ args: ['attr.data-shape']
143
+ }], disabled: [{
144
+ type: Input
145
+ }, {
146
+ type: HostBinding,
147
+ args: ['class._disabled']
148
+ }], isLoaderShown: [{
149
+ type: Input
150
+ }, {
151
+ type: HostBinding,
152
+ args: ['class._loading']
153
+ }], icon: [{
154
+ type: Input
155
+ }], iconRight: [{
156
+ type: Input
157
+ }], appearance: [{
158
+ type: Input
159
+ }, {
160
+ type: HostBinding,
161
+ args: ['attr.data-appearance']
162
+ }], size: [{
163
+ type: Input
164
+ }, {
165
+ type: HostBinding,
166
+ args: ['attr.data-size']
167
+ }], containsOnlyIcon: [{
168
+ type: HostBinding,
169
+ args: ['class._only-icon']
170
+ }], isDisabled: [{
171
+ type: HostBinding,
172
+ args: ['disabled']
173
+ }], content: [{
174
+ type: ViewChild,
175
+ args: ['content']
176
176
  }] } });
177
177
 
178
- class CuiAccordionItemComponent {
179
- constructor() {
180
- this.isOpen = true;
181
- this.isOpenChange = new EventEmitter();
182
- }
183
- get buttonIcon() {
184
- return this.isOpen ? 'cuiIconChevronDown' : 'cuiIconChevronRight';
185
- }
186
- onRowToggle() {
187
- this.isOpen = !this.isOpen;
188
- this.isOpenChange.emit(this.isOpen);
189
- }
190
- }
191
- CuiAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
192
- CuiAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiAccordionItemComponent, selector: "cui-accordion-item", inputs: { isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngImport: i0, template: "<header class=\"c-header\">\r\n <button\r\n cuiButton\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n [icon]=\"buttonIcon\"\r\n (click)=\"onRowToggle()\"\r\n ></button>\r\n <div class=\"c-header__wrapper\">\r\n <ng-content></ng-content>\r\n </div>\r\n</header>\r\n<div *ngIf=\"isOpen\">\r\n <ng-content select=\"[cuiAccordionItemContent]\"></ng-content>\r\n</div>\r\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 });
193
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionItemComponent, decorators: [{
194
- type: Component,
195
- args: [{ selector: 'cui-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"c-header\">\r\n <button\r\n cuiButton\r\n appearance=\"ghost\"\r\n size=\"xxs\"\r\n [icon]=\"buttonIcon\"\r\n (click)=\"onRowToggle()\"\r\n ></button>\r\n <div class=\"c-header__wrapper\">\r\n <ng-content></ng-content>\r\n </div>\r\n</header>\r\n<div *ngIf=\"isOpen\">\r\n <ng-content select=\"[cuiAccordionItemContent]\"></ng-content>\r\n</div>\r\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"] }]
196
- }], propDecorators: { isOpen: [{
197
- type: Input
198
- }], isOpenChange: [{
199
- type: Output
178
+ class CuiAccordionItemComponent {
179
+ constructor() {
180
+ this.isOpen = true;
181
+ this.isOpenChange = new EventEmitter();
182
+ }
183
+ get buttonIcon() {
184
+ return this.isOpen ? 'cuiIconChevronDown' : 'cuiIconChevronRight';
185
+ }
186
+ onRowToggle() {
187
+ this.isOpen = !this.isOpen;
188
+ this.isOpenChange.emit(this.isOpen);
189
+ }
190
+ }
191
+ CuiAccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
192
+ CuiAccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionItemComponent, decorators: [{
194
+ type: Component,
195
+ 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"] }]
196
+ }], propDecorators: { isOpen: [{
197
+ type: Input
198
+ }], isOpenChange: [{
199
+ type: Output
200
200
  }] } });
201
201
 
202
- class CuiSvgModule {
203
- }
204
- CuiSvgModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
205
- CuiSvgModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, declarations: [CuiSvgComponent], imports: [CommonModule], exports: [CuiSvgComponent] });
206
- CuiSvgModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, imports: [CommonModule] });
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, decorators: [{
208
- type: NgModule,
209
- args: [{
210
- imports: [CommonModule],
211
- declarations: [CuiSvgComponent],
212
- exports: [CuiSvgComponent]
213
- }]
202
+ class CuiSvgModule {
203
+ }
204
+ CuiSvgModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
205
+ CuiSvgModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, declarations: [CuiSvgComponent], imports: [CommonModule], exports: [CuiSvgComponent] });
206
+ CuiSvgModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, imports: [CommonModule] });
207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, decorators: [{
208
+ type: NgModule,
209
+ args: [{
210
+ imports: [CommonModule],
211
+ declarations: [CuiSvgComponent],
212
+ exports: [CuiSvgComponent]
213
+ }]
214
214
  }] });
215
215
 
216
- class CuiButtonModule {
217
- }
218
- CuiButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
219
- CuiButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, declarations: [CuiButtonComponent], imports: [CommonModule,
220
- CuiSvgModule], exports: [CuiButtonComponent] });
221
- CuiButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, imports: [CommonModule,
222
- CuiSvgModule] });
223
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, decorators: [{
224
- type: NgModule,
225
- args: [{
226
- imports: [
227
- CommonModule,
228
- CuiSvgModule
229
- ],
230
- declarations: [CuiButtonComponent],
231
- exports: [CuiButtonComponent]
232
- }]
216
+ class CuiButtonModule {
217
+ }
218
+ CuiButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
219
+ CuiButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, declarations: [CuiButtonComponent], imports: [CommonModule,
220
+ CuiSvgModule], exports: [CuiButtonComponent] });
221
+ CuiButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, imports: [CommonModule,
222
+ CuiSvgModule] });
223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, decorators: [{
224
+ type: NgModule,
225
+ args: [{
226
+ imports: [
227
+ CommonModule,
228
+ CuiSvgModule
229
+ ],
230
+ declarations: [CuiButtonComponent],
231
+ exports: [CuiButtonComponent]
232
+ }]
233
233
  }] });
234
234
 
235
- class CuiAccordionModule {
236
- }
237
- CuiAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
238
- CuiAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionModule, declarations: [CuiAccordionComponent,
239
- CuiAccordionItemComponent], imports: [CommonModule,
240
- CuiSvgModule,
241
- CuiButtonModule], exports: [CuiAccordionComponent,
242
- CuiAccordionItemComponent] });
243
- CuiAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionModule, imports: [CommonModule,
244
- CuiSvgModule,
245
- CuiButtonModule] });
246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionModule, decorators: [{
247
- type: NgModule,
248
- args: [{
249
- imports: [
250
- CommonModule,
251
- CuiSvgModule,
252
- CuiButtonModule,
253
- ],
254
- declarations: [
255
- CuiAccordionComponent,
256
- CuiAccordionItemComponent
257
- ],
258
- exports: [
259
- CuiAccordionComponent,
260
- CuiAccordionItemComponent
261
- ]
262
- }]
235
+ class CuiAccordionModule {
236
+ }
237
+ CuiAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
238
+ CuiAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionModule, declarations: [CuiAccordionComponent,
239
+ CuiAccordionItemComponent], imports: [CommonModule,
240
+ CuiSvgModule,
241
+ CuiButtonModule], exports: [CuiAccordionComponent,
242
+ CuiAccordionItemComponent] });
243
+ CuiAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionModule, imports: [CommonModule,
244
+ CuiSvgModule,
245
+ CuiButtonModule] });
246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAccordionModule, decorators: [{
247
+ type: NgModule,
248
+ args: [{
249
+ imports: [
250
+ CommonModule,
251
+ CuiSvgModule,
252
+ CuiButtonModule,
253
+ ],
254
+ declarations: [
255
+ CuiAccordionComponent,
256
+ CuiAccordionItemComponent
257
+ ],
258
+ exports: [
259
+ CuiAccordionComponent,
260
+ CuiAccordionItemComponent
261
+ ]
262
+ }]
263
263
  }] });
264
264
 
265
- const CUI_NOTIFICATION_DEFAULT_OPTIONS = {
266
- status: 'info'
267
- };
265
+ const CUI_NOTIFICATION_DEFAULT_OPTIONS = {
266
+ status: 'info'
267
+ };
268
268
  const CUI_NOTIFICATION_OPTIONS = cuiCreateToken(CUI_NOTIFICATION_DEFAULT_OPTIONS);
269
269
 
270
- const CUI_ALERTS = cuiCreateToken(new BehaviorSubject([]));
271
- const CUI_ALERT_DEFAULT_OPTIONS = {
272
- label: '',
273
- needAutoClose: true,
274
- isCloseable: true,
275
- position: 'right',
276
- resizing: 'fixed'
277
- };
278
- const CUI_ALERT_OPTIONS = cuiCreateTokenFromFactory(() => (Object.assign(Object.assign({}, CUI_ALERT_DEFAULT_OPTIONS), inject(CUI_NOTIFICATION_OPTIONS))));
270
+ const CUI_ALERTS = cuiCreateToken(new BehaviorSubject([]));
271
+ const CUI_ALERT_DEFAULT_OPTIONS = {
272
+ label: '',
273
+ needAutoClose: true,
274
+ isCloseable: true,
275
+ position: 'right',
276
+ resizing: 'fixed'
277
+ };
278
+ const CUI_ALERT_OPTIONS = cuiCreateTokenFromFactory(() => (Object.assign(Object.assign({}, CUI_ALERT_DEFAULT_OPTIONS), inject(CUI_NOTIFICATION_OPTIONS))));
279
279
  const CUI_ALERT_CONTEXT = new InjectionToken('');
280
280
 
281
- class CuiNotificationComponent {
282
- constructor() {
283
- this.cuiNotificationOptions = inject(CUI_NOTIFICATION_OPTIONS);
284
- this.ICON_OPTIONS = {
285
- info: {
286
- icon: 'cuiIconInfo',
287
- color: 'var(--c-info-icon-color)'
288
- },
289
- success: {
290
- icon: 'cuiIconCheckCircle',
291
- color: 'var(--cui-green-500)'
292
- },
293
- alert: {
294
- icon: 'cuiIconAlertTriangle',
295
- color: 'var(--cui-yellow-400)'
296
- },
297
- error: {
298
- icon: 'cuiIconXCircle',
299
- color: 'var(--cui-danger)'
300
- },
301
- };
302
- this.status = this.cuiNotificationOptions.status;
303
- this.isCloseable = false;
304
- this.closed = new EventEmitter();
305
- }
306
- onClose() {
307
- this.closed.next();
308
- }
309
- }
310
- CuiNotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
311
- CuiNotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiNotificationComponent, selector: "cui-notification", inputs: { status: "status", isCloseable: "isCloseable" }, outputs: { closed: "closed" }, host: { properties: { "attr.data-status": "this.status" } }, ngImport: i0, template: "<cui-svg\r\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\r\n [icon]=\"iconOption.icon\"\r\n [color]=\"iconOption.color\"\r\n></cui-svg>\r\n<div class=\"c-content\">\r\n <ng-content></ng-content>\r\n</div>\r\n<button\r\n *ngIf=\"isCloseable\"\r\n class=\"c-button\"\r\n (click)=\"onClose()\"\r\n>\r\n <cui-svg\r\n icon=\"cuiIconX\"\r\n color=\"var(--cui-gray-0)\"\r\n />\r\n</button>\r\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-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;overflow-wrap:anywhere}.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:rgba(255,255,255,.2)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
312
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationComponent, decorators: [{
313
- type: Component,
314
- args: [{ selector: 'cui-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\r\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\r\n [icon]=\"iconOption.icon\"\r\n [color]=\"iconOption.color\"\r\n></cui-svg>\r\n<div class=\"c-content\">\r\n <ng-content></ng-content>\r\n</div>\r\n<button\r\n *ngIf=\"isCloseable\"\r\n class=\"c-button\"\r\n (click)=\"onClose()\"\r\n>\r\n <cui-svg\r\n icon=\"cuiIconX\"\r\n color=\"var(--cui-gray-0)\"\r\n />\r\n</button>\r\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-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;overflow-wrap:anywhere}.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:rgba(255,255,255,.2)}\n"] }]
315
- }], propDecorators: { status: [{
316
- type: Input
317
- }, {
318
- type: HostBinding,
319
- args: ['attr.data-status']
320
- }], isCloseable: [{
321
- type: Input
322
- }], closed: [{
323
- type: Output
281
+ class CuiNotificationComponent {
282
+ constructor() {
283
+ this.cuiNotificationOptions = inject(CUI_NOTIFICATION_OPTIONS);
284
+ this.ICON_OPTIONS = {
285
+ info: {
286
+ icon: 'cuiIconInfo',
287
+ color: 'var(--c-info-icon-color)'
288
+ },
289
+ success: {
290
+ icon: 'cuiIconCheckCircle',
291
+ color: 'var(--cui-green-500)'
292
+ },
293
+ alert: {
294
+ icon: 'cuiIconAlertTriangle',
295
+ color: 'var(--cui-yellow-400)'
296
+ },
297
+ error: {
298
+ icon: 'cuiIconXCircle',
299
+ color: 'var(--cui-danger)'
300
+ },
301
+ };
302
+ this.status = this.cuiNotificationOptions.status;
303
+ this.isCloseable = false;
304
+ this.closed = new EventEmitter();
305
+ }
306
+ onClose() {
307
+ this.closed.next();
308
+ }
309
+ }
310
+ CuiNotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
311
+ CuiNotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiNotificationComponent, selector: "cui-notification", inputs: { status: "status", isCloseable: "isCloseable" }, outputs: { 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></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-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;overflow-wrap:anywhere}.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:rgba(255,255,255,.2)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationComponent, decorators: [{
313
+ type: Component,
314
+ args: [{ selector: 'cui-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\n [icon]=\"iconOption.icon\"\n [color]=\"iconOption.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-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;overflow-wrap:anywhere}.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:rgba(255,255,255,.2)}\n"] }]
315
+ }], propDecorators: { status: [{
316
+ type: Input
317
+ }, {
318
+ type: HostBinding,
319
+ args: ['attr.data-status']
320
+ }], isCloseable: [{
321
+ type: Input
322
+ }], closed: [{
323
+ type: Output
324
324
  }] } });
325
325
 
326
- class CuiAlertComponent {
327
- constructor() {
328
- this.context = inject(CUI_ALERT_CONTEXT);
329
- this.AUTO_CLOSE_DURATION_IN_MILLISECONDS = 3000;
330
- }
331
- get resizing() {
332
- return this.context.resizing;
333
- }
334
- ngOnInit() {
335
- this.initAutoClose();
336
- }
337
- onClosed() {
338
- this.context.$implicit.complete();
339
- }
340
- initAutoClose() {
341
- if (!this.context.needAutoClose) {
342
- return;
343
- }
344
- setTimeout(this.onClosed.bind(this), this.AUTO_CLOSE_DURATION_IN_MILLISECONDS);
345
- }
346
- }
347
- CuiAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
348
- CuiAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiAlertComponent, selector: "cui-alert", host: { properties: { "attr.data-resizing": "this.resizing" } }, ngImport: i0, template: "<cui-notification\r\n [status]=\"context.status\"\r\n [isCloseable]=\"context.isCloseable\"\r\n (closed)=\"onClosed()\"\r\n>\r\n <h2\r\n *ngIf=\"context.label\"\r\n class=\"c-heading\"\r\n >\r\n {{ context.label }}\r\n </h2>\r\n {{ context.content }}\r\n</cui-notification>\r\n", styles: [":host{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", "isCloseable"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertComponent, decorators: [{
350
- type: Component,
351
- args: [{ selector: 'cui-alert', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-notification\r\n [status]=\"context.status\"\r\n [isCloseable]=\"context.isCloseable\"\r\n (closed)=\"onClosed()\"\r\n>\r\n <h2\r\n *ngIf=\"context.label\"\r\n class=\"c-heading\"\r\n >\r\n {{ context.label }}\r\n </h2>\r\n {{ context.content }}\r\n</cui-notification>\r\n", styles: [":host{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"] }]
352
- }], propDecorators: { resizing: [{
353
- type: HostBinding,
354
- args: ['attr.data-resizing']
326
+ class CuiAlertComponent {
327
+ constructor() {
328
+ this.context = inject(CUI_ALERT_CONTEXT);
329
+ this.AUTO_CLOSE_DURATION_IN_MILLISECONDS = 3000;
330
+ }
331
+ get resizing() {
332
+ return this.context.resizing;
333
+ }
334
+ ngOnInit() {
335
+ this.initAutoClose();
336
+ }
337
+ onClosed() {
338
+ this.context.$implicit.complete();
339
+ }
340
+ initAutoClose() {
341
+ if (!this.context.needAutoClose) {
342
+ return;
343
+ }
344
+ setTimeout(this.onClosed.bind(this), this.AUTO_CLOSE_DURATION_IN_MILLISECONDS);
345
+ }
346
+ }
347
+ CuiAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
348
+ CuiAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiAlertComponent, selector: "cui-alert", host: { properties: { "attr.data-resizing": "this.resizing" } }, ngImport: i0, template: "<cui-notification\n [status]=\"context.status\"\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{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", "isCloseable"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertComponent, decorators: [{
350
+ type: Component,
351
+ args: [{ selector: 'cui-alert', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-notification\n [status]=\"context.status\"\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{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"] }]
352
+ }], propDecorators: { resizing: [{
353
+ type: HostBinding,
354
+ args: ['attr.data-resizing']
355
355
  }] } });
356
356
 
357
- class CuiAlertsComponent {
358
- constructor() {
359
- this.destroy$ = inject(CuiDestroyService, { self: true });
360
- this.alerts$ = inject(CUI_ALERTS);
361
- }
362
- ngOnInit() {
363
- this.initAlertInjectorsSubscription();
364
- }
365
- trackByFn(_, alert) {
366
- return alert.id;
367
- }
368
- alertsMatcher(alert, position) {
369
- return alert.position === position;
370
- }
371
- initAlertInjectorsSubscription() {
372
- this.alerts$
373
- .pipe(takeUntil(this.destroy$))
374
- .subscribe(dialogs => this.alertInjectors = dialogs.map(useValue => Injector.create({
375
- providers: [{ provide: CUI_ALERT_CONTEXT, useValue }]
376
- })));
377
- }
378
- }
379
- CuiAlertsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
380
- CuiAlertsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiAlertsComponent, selector: "cui-alerts", providers: [CuiDestroyService], ngImport: i0, template: "<ng-container *cuiLet=\"alerts$ | async as alerts\">\r\n <div class=\"c-wrapper c-wrapper_position_center\">\r\n <ng-container *ngFor=\"let alert of alerts! | cuiFilter: alertsMatcher: 'center'; let i = index; trackBy: trackByFn\">\r\n <ng-container *ngComponentOutlet=\"alert.component; injector: alertInjectors[i]\" />\r\n </ng-container>\r\n </div>\r\n <div class=\"c-wrapper c-wrapper_position_right\">\r\n <ng-container *ngFor=\"let alert of alerts! | cuiFilter: alertsMatcher: 'right'; let i = index; trackBy: trackByFn\">\r\n <ng-container *ngComponentOutlet=\"alert.component; injector: alertInjectors[i]\" />\r\n </ng-container>\r\n </div>\r\n</ng-container>\r\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", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.CuiFilterPipe, name: "cuiFilter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
381
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertsComponent, decorators: [{
382
- type: Component,
383
- args: [{ selector: 'cui-alerts', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<ng-container *cuiLet=\"alerts$ | async as alerts\">\r\n <div class=\"c-wrapper c-wrapper_position_center\">\r\n <ng-container *ngFor=\"let alert of alerts! | cuiFilter: alertsMatcher: 'center'; let i = index; trackBy: trackByFn\">\r\n <ng-container *ngComponentOutlet=\"alert.component; injector: alertInjectors[i]\" />\r\n </ng-container>\r\n </div>\r\n <div class=\"c-wrapper c-wrapper_position_right\">\r\n <ng-container *ngFor=\"let alert of alerts! | cuiFilter: alertsMatcher: 'right'; let i = index; trackBy: trackByFn\">\r\n <ng-container *ngComponentOutlet=\"alert.component; injector: alertInjectors[i]\" />\r\n </ng-container>\r\n </div>\r\n</ng-container>\r\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"] }]
357
+ class CuiAlertsComponent {
358
+ constructor() {
359
+ this.destroy$ = inject(CuiDestroyService, { self: true });
360
+ this.alerts$ = inject(CUI_ALERTS);
361
+ }
362
+ ngOnInit() {
363
+ this.initAlertInjectorsSubscription();
364
+ }
365
+ trackByFn(_, alert) {
366
+ return alert.id;
367
+ }
368
+ alertsMatcher(alert, position) {
369
+ return alert.position === position;
370
+ }
371
+ initAlertInjectorsSubscription() {
372
+ this.alerts$
373
+ .pipe(takeUntil(this.destroy$))
374
+ .subscribe(dialogs => this.alertInjectors = dialogs.map(useValue => Injector.create({
375
+ providers: [{ provide: CUI_ALERT_CONTEXT, useValue }]
376
+ })));
377
+ }
378
+ }
379
+ CuiAlertsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
380
+ CuiAlertsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.CuiFilterPipe, name: "cuiFilter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertsComponent, decorators: [{
382
+ type: Component,
383
+ 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"] }]
384
384
  }] });
385
385
 
386
- class CuiNotificationModule {
387
- }
388
- CuiNotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
389
- CuiNotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationModule, declarations: [CuiNotificationComponent], imports: [CommonModule,
390
- CuiLetDirective,
391
- CuiSvgModule], exports: [CuiNotificationComponent] });
392
- CuiNotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationModule, imports: [CommonModule,
393
- CuiSvgModule] });
394
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationModule, decorators: [{
395
- type: NgModule,
396
- args: [{
397
- imports: [
398
- CommonModule,
399
- CuiLetDirective,
400
- CuiSvgModule
401
- ],
402
- declarations: [CuiNotificationComponent],
403
- exports: [CuiNotificationComponent]
404
- }]
386
+ class CuiNotificationModule {
387
+ }
388
+ CuiNotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
389
+ CuiNotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationModule, declarations: [CuiNotificationComponent], imports: [CommonModule,
390
+ CuiLetDirective,
391
+ CuiSvgModule], exports: [CuiNotificationComponent] });
392
+ CuiNotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationModule, imports: [CommonModule,
393
+ CuiSvgModule] });
394
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiNotificationModule, decorators: [{
395
+ type: NgModule,
396
+ args: [{
397
+ imports: [
398
+ CommonModule,
399
+ CuiLetDirective,
400
+ CuiSvgModule
401
+ ],
402
+ declarations: [CuiNotificationComponent],
403
+ exports: [CuiNotificationComponent]
404
+ }]
405
405
  }] });
406
406
 
407
- class CuiAlertModule {
408
- }
409
- CuiAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
410
- CuiAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertModule, declarations: [CuiAlertComponent,
411
- CuiAlertsComponent], imports: [CommonModule,
412
- CuiFilterPipe,
413
- CuiNotificationModule,
414
- CuiLetDirective], exports: [CuiAlertComponent,
415
- CuiAlertComponent,
416
- CuiAlertsComponent] });
417
- CuiAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertModule, imports: [CommonModule,
418
- CuiNotificationModule] });
419
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertModule, decorators: [{
420
- type: NgModule,
421
- args: [{
422
- imports: [
423
- CommonModule,
424
- CuiFilterPipe,
425
- CuiNotificationModule,
426
- CuiLetDirective
427
- ],
428
- declarations: [
429
- CuiAlertComponent,
430
- CuiAlertsComponent
431
- ],
432
- exports: [
433
- CuiAlertComponent,
434
- CuiAlertComponent,
435
- CuiAlertsComponent
436
- ]
437
- }]
407
+ class CuiAlertModule {
408
+ }
409
+ CuiAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
410
+ CuiAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertModule, declarations: [CuiAlertComponent,
411
+ CuiAlertsComponent], imports: [CommonModule,
412
+ CuiFilterPipe,
413
+ CuiNotificationModule,
414
+ CuiLetDirective], exports: [CuiAlertComponent,
415
+ CuiAlertComponent,
416
+ CuiAlertsComponent] });
417
+ CuiAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertModule, imports: [CommonModule,
418
+ CuiNotificationModule] });
419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertModule, decorators: [{
420
+ type: NgModule,
421
+ args: [{
422
+ imports: [
423
+ CommonModule,
424
+ CuiFilterPipe,
425
+ CuiNotificationModule,
426
+ CuiLetDirective
427
+ ],
428
+ declarations: [
429
+ CuiAlertComponent,
430
+ CuiAlertsComponent
431
+ ],
432
+ exports: [
433
+ CuiAlertComponent,
434
+ CuiAlertComponent,
435
+ CuiAlertsComponent
436
+ ]
437
+ }]
438
438
  }] });
439
439
 
440
- class CuiAlertService extends CuiPopoverService {
441
- }
442
- CuiAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
443
- CuiAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertService, providedIn: 'root', useFactory: () => new CuiAlertService(CUI_ALERTS, CuiAlertComponent, inject(CUI_ALERT_OPTIONS)) });
444
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertService, decorators: [{
445
- type: Injectable,
446
- args: [{
447
- providedIn: 'root',
448
- useFactory: () => new CuiAlertService(CUI_ALERTS, CuiAlertComponent, inject(CUI_ALERT_OPTIONS))
449
- }]
440
+ class CuiAlertService extends CuiPopoverService {
441
+ }
442
+ CuiAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
443
+ CuiAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertService, providedIn: 'root', useFactory: () => new CuiAlertService(CUI_ALERTS, CuiAlertComponent, inject(CUI_ALERT_OPTIONS)) });
444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAlertService, decorators: [{
445
+ type: Injectable,
446
+ args: [{
447
+ providedIn: 'root',
448
+ useFactory: () => new CuiAlertService(CUI_ALERTS, CuiAlertComponent, inject(CUI_ALERT_OPTIONS))
449
+ }]
450
450
  }] });
451
451
 
452
- const CUI_BADGE_DEFAULT_OPTIONS = {
453
- status: 'info',
454
- size: 'sm',
455
- isWithDot: false
456
- };
452
+ const CUI_BADGE_DEFAULT_OPTIONS = {
453
+ color: 'light-blue',
454
+ size: 'sm',
455
+ isWithDot: false
456
+ };
457
457
  const CUI_BADGE_OPTIONS = cuiCreateToken(CUI_BADGE_DEFAULT_OPTIONS);
458
458
 
459
- class CuiBadgeComponent {
460
- constructor() {
461
- this.options = inject(CUI_BADGE_OPTIONS);
462
- this.status = this.options.status;
463
- this.size = this.options.size;
464
- this.isWithDot = this.options.isWithDot;
465
- }
466
- }
467
- CuiBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
468
- CuiBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiBadgeComponent, selector: "cui-badge", inputs: { status: "status", size: "size", isWithDot: "isWithDot" }, host: { properties: { "attr.data-status": "this.status", "attr.data-size": "this.size" } }, ngImport: i0, template: "<span\r\n *ngIf=\"isWithDot\"\r\n class=\"c-dots\"\r\n></span>\r\n<ng-content />", styles: [":host{padding-top:2px;padding-bottom:2px;display:inline-flex;align-items:center;gap:4px;border-radius:25px;color:var(--cui-gray-900);font-family:var(--cui-main-font)}:host[data-status=info]{background:var(--cui-light-blue-50)}:host[data-status=info] .c-dots{background:var(--cui-info)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=success] .c-dots{background:var(--cui-success)}:host[data-status=alert]{background:var(--cui-yellow-50)}:host[data-status=alert] .c-dots{background:var(--cui-warning)}:host[data-status=error]{background:var(--cui-red-50)}:host[data-status=error] .c-dots{background:var(--cui-danger)}: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}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-600);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=success]{color:var(--cui-green-600);background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=alert]{color:var(--cui-yellow-400);background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=error]{color:var(--cui-red-400);background:var(--cui-red-900)}.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 });
469
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeComponent, decorators: [{
470
- type: Component,
471
- args: [{ selector: 'cui-badge', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\r\n *ngIf=\"isWithDot\"\r\n class=\"c-dots\"\r\n></span>\r\n<ng-content />", styles: [":host{padding-top:2px;padding-bottom:2px;display:inline-flex;align-items:center;gap:4px;border-radius:25px;color:var(--cui-gray-900);font-family:var(--cui-main-font)}:host[data-status=info]{background:var(--cui-light-blue-50)}:host[data-status=info] .c-dots{background:var(--cui-info)}:host[data-status=success]{background:var(--cui-green-50)}:host[data-status=success] .c-dots{background:var(--cui-success)}:host[data-status=alert]{background:var(--cui-yellow-50)}:host[data-status=alert] .c-dots{background:var(--cui-warning)}:host[data-status=error]{background:var(--cui-red-50)}:host[data-status=error] .c-dots{background:var(--cui-danger)}: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}:host-context([cuiTheme=dark])[data-status=info]{color:var(--cui-light-blue-600);background:var(--cui-blue-900)}:host-context([cuiTheme=dark])[data-status=success]{color:var(--cui-green-600);background:var(--cui-green-900)}:host-context([cuiTheme=dark])[data-status=alert]{color:var(--cui-yellow-400);background:var(--cui-yellow-900)}:host-context([cuiTheme=dark])[data-status=error]{color:var(--cui-red-400);background:var(--cui-red-900)}.c-dots{width:6px;height:6px;border-radius:50%}\n"] }]
472
- }], propDecorators: { status: [{
473
- type: Input
474
- }, {
475
- type: HostBinding,
476
- args: ['attr.data-status']
477
- }], size: [{
478
- type: Input
479
- }, {
480
- type: HostBinding,
481
- args: ['attr.data-size']
482
- }], isWithDot: [{
483
- type: Input
459
+ class CuiBadgeComponent {
460
+ constructor() {
461
+ this.options = inject(CUI_BADGE_OPTIONS);
462
+ this.color = this.options.color;
463
+ this.size = this.options.size;
464
+ this.isWithDot = this.options.isWithDot;
465
+ }
466
+ }
467
+ CuiBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
468
+ CuiBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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;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)}: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 });
469
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeComponent, decorators: [{
470
+ type: Component,
471
+ 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;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)}: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"] }]
472
+ }], propDecorators: { color: [{
473
+ type: Input
474
+ }, {
475
+ type: HostBinding,
476
+ args: ['attr.data-color']
477
+ }], size: [{
478
+ type: Input
479
+ }, {
480
+ type: HostBinding,
481
+ args: ['attr.data-size']
482
+ }], isWithDot: [{
483
+ type: Input
484
484
  }] } });
485
485
 
486
- class CuiBadgeModule {
487
- }
488
- CuiBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
489
- CuiBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeModule, declarations: [CuiBadgeComponent], imports: [CommonModule], exports: [CuiBadgeComponent] });
490
- CuiBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeModule, imports: [CommonModule] });
491
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeModule, decorators: [{
492
- type: NgModule,
493
- args: [{
494
- imports: [CommonModule],
495
- declarations: [CuiBadgeComponent],
496
- exports: [CuiBadgeComponent]
497
- }]
486
+ class CuiBadgeModule {
487
+ }
488
+ CuiBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
489
+ CuiBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeModule, declarations: [CuiBadgeComponent], imports: [CommonModule], exports: [CuiBadgeComponent] });
490
+ CuiBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeModule, imports: [CommonModule] });
491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBadgeModule, decorators: [{
492
+ type: NgModule,
493
+ args: [{
494
+ imports: [CommonModule],
495
+ declarations: [CuiBadgeComponent],
496
+ exports: [CuiBadgeComponent]
497
+ }]
498
498
  }] });
499
499
 
500
- const CUI_BANNER_DEFAULT_OPTIONS = {
501
- status: 'info'
502
- };
500
+ const CUI_BANNER_DEFAULT_OPTIONS = {
501
+ status: 'info'
502
+ };
503
503
  const CUI_BANNER_OPTIONS = cuiCreateToken(CUI_BANNER_DEFAULT_OPTIONS);
504
504
 
505
- const CUI_THEME_STORAGE_DEFAULT_KEY = 'cuiTheme';
506
- const CUI_DEFAULT_THEME = 'light';
507
- const CUI_THEME_STORAGE_KEY = cuiCreateToken(CUI_THEME_STORAGE_DEFAULT_KEY);
505
+ const CUI_THEME_STORAGE_DEFAULT_KEY = 'cuiTheme';
506
+ const CUI_DEFAULT_THEME = 'light';
507
+ const CUI_THEME_STORAGE_KEY = cuiCreateToken(CUI_THEME_STORAGE_DEFAULT_KEY);
508
508
  const CUI_THEME = cuiCreateToken(CUI_DEFAULT_THEME);
509
509
 
510
- class CuiThemeService extends BehaviorSubject {
511
- constructor() {
512
- var _a;
513
- super((_a = inject(CUI_LOCAL_STORAGE).getItem(inject(CUI_THEME_STORAGE_KEY))) !== null && _a !== void 0 ? _a : inject(CUI_THEME));
514
- this.localStorage = inject(CUI_LOCAL_STORAGE);
515
- this.key = inject(CUI_THEME_STORAGE_KEY);
516
- }
517
- next(theme) {
518
- this.localStorage.setItem(this.key, theme);
519
- super.next(theme);
520
- }
521
- // При работе только двух тем
522
- switch() {
523
- this.next(this.value === 'light' ? 'dark' : 'light');
524
- }
525
- }
526
- CuiThemeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
527
- CuiThemeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiThemeService, providedIn: 'root' });
528
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiThemeService, decorators: [{
529
- type: Injectable,
530
- args: [{
531
- providedIn: 'root'
532
- }]
510
+ class CuiThemeService extends BehaviorSubject {
511
+ constructor() {
512
+ var _a;
513
+ super((_a = inject(CUI_LOCAL_STORAGE).getItem(inject(CUI_THEME_STORAGE_KEY))) !== null && _a !== void 0 ? _a : inject(CUI_THEME));
514
+ this.localStorage = inject(CUI_LOCAL_STORAGE);
515
+ this.key = inject(CUI_THEME_STORAGE_KEY);
516
+ }
517
+ next(theme) {
518
+ this.localStorage.setItem(this.key, theme);
519
+ super.next(theme);
520
+ }
521
+ // При работе только двух тем
522
+ switch() {
523
+ this.next(this.value === 'light' ? 'dark' : 'light');
524
+ }
525
+ }
526
+ CuiThemeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
527
+ CuiThemeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiThemeService, providedIn: 'root' });
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiThemeService, decorators: [{
529
+ type: Injectable,
530
+ args: [{
531
+ providedIn: 'root'
532
+ }]
533
533
  }], ctorParameters: function () { return []; } });
534
534
 
535
- class CuiBannerComponent {
536
- constructor() {
537
- this.options = inject(CUI_BANNER_OPTIONS);
538
- this.theme$ = inject(CuiThemeService);
539
- this.ICON_OPTIONS = {
540
- info: {
541
- icon: 'cuiIconInfo',
542
- color: 'var(--c-info-icon-color)'
543
- },
544
- success: {
545
- icon: 'cuiIconCheckCircle',
546
- color: 'var(--cui-success)'
547
- },
548
- alert: {
549
- icon: 'cuiIconAlertTriangle',
550
- color: 'var(--c-alert-icon-color)'
551
- },
552
- error: {
553
- icon: 'cuiIconXCircle',
554
- color: 'var(--cui-danger)'
555
- },
556
- };
557
- this.THEME_CLOSE_BUTTON_ICON_COLORS = {
558
- light: 'var(--cui-gray-500)',
559
- dark: 'var(--cui-gray-0)'
560
- };
561
- this.status = this.options.status;
562
- this.isCloseable = true;
563
- this.actionButtonClicked = new EventEmitter();
564
- this.closed = new EventEmitter();
565
- }
566
- onAction() {
567
- this.actionButtonClicked.emit();
568
- }
569
- onClose() {
570
- this.closed.emit();
571
- }
572
- }
573
- CuiBannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
574
- CuiBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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\r\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\r\n [icon]=\"iconOption.icon\"\r\n [color]=\"iconOption.color\"\r\n class=\"c-icon\"\r\n></cui-svg>\r\n<div class=\"c-wrapper\">\r\n <h2\r\n *ngIf=\"label\"\r\n class=\"c-heading\"\r\n >\r\n {{ label }}\r\n </h2>\r\n <ng-content></ng-content>\r\n <button\r\n cuiButton\r\n *ngIf=\"actionButtonText\"\r\n appearance=\"link\"\r\n class=\"c-action\"\r\n (click)=\"onAction()\"\r\n >\r\n {{ actionButtonText }}\r\n </button>\r\n</div>\r\n<button\r\n *ngIf=\"isCloseable\"\r\n class=\"c-button\"\r\n (click)=\"onClose()\"\r\n>\r\n <cui-svg\r\n *cuiLet=\"theme$ | async as theme\"\r\n icon=\"cuiIconX\"\r\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\r\n />\r\n</button>\r\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:12px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;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;flex-wrap:wrap;align-items:center;gap:8px;margin-left:12px;margin-right: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:rgba(255,255,255,.2)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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 });
575
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerComponent, decorators: [{
576
- type: Component,
577
- args: [{ selector: 'cui-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\r\n *cuiLet=\"ICON_OPTIONS[status] as iconOption\"\r\n [icon]=\"iconOption.icon\"\r\n [color]=\"iconOption.color\"\r\n class=\"c-icon\"\r\n></cui-svg>\r\n<div class=\"c-wrapper\">\r\n <h2\r\n *ngIf=\"label\"\r\n class=\"c-heading\"\r\n >\r\n {{ label }}\r\n </h2>\r\n <ng-content></ng-content>\r\n <button\r\n cuiButton\r\n *ngIf=\"actionButtonText\"\r\n appearance=\"link\"\r\n class=\"c-action\"\r\n (click)=\"onAction()\"\r\n >\r\n {{ actionButtonText }}\r\n </button>\r\n</div>\r\n<button\r\n *ngIf=\"isCloseable\"\r\n class=\"c-button\"\r\n (click)=\"onClose()\"\r\n>\r\n <cui-svg\r\n *cuiLet=\"theme$ | async as theme\"\r\n icon=\"cuiIconX\"\r\n [color]=\"THEME_CLOSE_BUTTON_ICON_COLORS[theme!]\"\r\n />\r\n</button>\r\n", styles: [":host{--c-info-icon-color: var(--cui-light-blue-800);--c-alert-icon-color: var(--cui-orange-800);padding:12px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;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;flex-wrap:wrap;align-items:center;gap:8px;margin-left:12px;margin-right: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:rgba(255,255,255,.2)}\n"] }]
578
- }], propDecorators: { status: [{
579
- type: Input
580
- }, {
581
- type: HostBinding,
582
- args: ['attr.data-status']
583
- }], isCloseable: [{
584
- type: Input
585
- }], label: [{
586
- type: Input
587
- }], actionButtonText: [{
588
- type: Input
589
- }], actionButtonClicked: [{
590
- type: Output
591
- }], closed: [{
592
- type: Output
535
+ class CuiBannerComponent {
536
+ constructor() {
537
+ this.options = inject(CUI_BANNER_OPTIONS);
538
+ this.theme$ = inject(CuiThemeService);
539
+ this.ICON_OPTIONS = {
540
+ info: {
541
+ icon: 'cuiIconInfo',
542
+ color: 'var(--c-info-icon-color)'
543
+ },
544
+ success: {
545
+ icon: 'cuiIconCheckCircle',
546
+ color: 'var(--cui-success)'
547
+ },
548
+ alert: {
549
+ icon: 'cuiIconAlertTriangle',
550
+ color: 'var(--c-alert-icon-color)'
551
+ },
552
+ error: {
553
+ icon: 'cuiIconXCircle',
554
+ color: 'var(--cui-danger)'
555
+ },
556
+ };
557
+ this.THEME_CLOSE_BUTTON_ICON_COLORS = {
558
+ light: 'var(--cui-gray-500)',
559
+ dark: 'var(--cui-gray-0)'
560
+ };
561
+ this.status = this.options.status;
562
+ this.isCloseable = true;
563
+ this.actionButtonClicked = new EventEmitter();
564
+ this.closed = new EventEmitter();
565
+ }
566
+ onAction() {
567
+ this.actionButtonClicked.emit();
568
+ }
569
+ onClose() {
570
+ this.closed.emit();
571
+ }
572
+ }
573
+ CuiBannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
574
+ CuiBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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:12px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;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;flex-wrap:wrap;align-items:center;gap:8px;margin-left:12px;margin-right: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:rgba(255,255,255,.2)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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 });
575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerComponent, decorators: [{
576
+ type: Component,
577
+ 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:12px 16px;font-weight:400;font-size:14px;line-height:20px;display:flex;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;flex-wrap:wrap;align-items:center;gap:8px;margin-left:12px;margin-right: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:rgba(255,255,255,.2)}\n"] }]
578
+ }], propDecorators: { status: [{
579
+ type: Input
580
+ }, {
581
+ type: HostBinding,
582
+ args: ['attr.data-status']
583
+ }], isCloseable: [{
584
+ type: Input
585
+ }], label: [{
586
+ type: Input
587
+ }], actionButtonText: [{
588
+ type: Input
589
+ }], actionButtonClicked: [{
590
+ type: Output
591
+ }], closed: [{
592
+ type: Output
593
593
  }] } });
594
594
 
595
- class CuiBannerModule {
596
- }
597
- CuiBannerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
598
- CuiBannerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerModule, declarations: [CuiBannerComponent], imports: [CommonModule,
599
- CuiLetDirective,
600
- CuiSvgModule,
601
- CuiButtonModule], exports: [CuiBannerComponent] });
602
- CuiBannerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerModule, imports: [CommonModule,
603
- CuiSvgModule,
604
- CuiButtonModule] });
605
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerModule, decorators: [{
606
- type: NgModule,
607
- args: [{
608
- imports: [
609
- CommonModule,
610
- CuiLetDirective,
611
- CuiSvgModule,
612
- CuiButtonModule
613
- ],
614
- declarations: [CuiBannerComponent],
615
- exports: [CuiBannerComponent]
616
- }]
595
+ class CuiBannerModule {
596
+ }
597
+ CuiBannerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
598
+ CuiBannerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerModule, declarations: [CuiBannerComponent], imports: [CommonModule,
599
+ CuiLetDirective,
600
+ CuiSvgModule,
601
+ CuiButtonModule], exports: [CuiBannerComponent] });
602
+ CuiBannerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerModule, imports: [CommonModule,
603
+ CuiSvgModule,
604
+ CuiButtonModule] });
605
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBannerModule, decorators: [{
606
+ type: NgModule,
607
+ args: [{
608
+ imports: [
609
+ CommonModule,
610
+ CuiLetDirective,
611
+ CuiSvgModule,
612
+ CuiButtonModule
613
+ ],
614
+ declarations: [CuiBannerComponent],
615
+ exports: [CuiBannerComponent]
616
+ }]
617
617
  }] });
618
618
 
619
- class CuiBreadcrumbsComponent {
620
- }
621
- CuiBreadcrumbsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
622
- CuiBreadcrumbsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiBreadcrumbsComponent, selector: "cui-breadcrumbs", queries: [{ propertyName: "breadcrumbs", predicate: CuiItemDirective, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"breadcrumbs.changes | async\"/>\r\n<ng-container *ngFor=\"let breadcrumb of breadcrumbs; let isLast = last\">\r\n <ng-container *ngTemplateOutlet=\"breadcrumb\" />\r\n <cui-svg\r\n *ngIf=\"!isLast\"\r\n icon=\"cuiIconSlashDivider\"\r\n color=\"var(--cui-base-500)\"\r\n />\r\n</ng-container>\r\n", styles: [":host{display:flex;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 });
623
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsComponent, decorators: [{
624
- type: Component,
625
- args: [{ selector: 'cui-breadcrumbs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"breadcrumbs.changes | async\"/>\r\n<ng-container *ngFor=\"let breadcrumb of breadcrumbs; let isLast = last\">\r\n <ng-container *ngTemplateOutlet=\"breadcrumb\" />\r\n <cui-svg\r\n *ngIf=\"!isLast\"\r\n icon=\"cuiIconSlashDivider\"\r\n color=\"var(--cui-base-500)\"\r\n />\r\n</ng-container>\r\n", styles: [":host{display:flex;flex-wrap:wrap;gap:2px}\n"] }]
626
- }], propDecorators: { breadcrumbs: [{
627
- type: ContentChildren,
628
- args: [CuiItemDirective, { read: TemplateRef }]
619
+ class CuiBreadcrumbsComponent {
620
+ }
621
+ CuiBreadcrumbsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
622
+ CuiBreadcrumbsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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;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 });
623
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsComponent, decorators: [{
624
+ type: Component,
625
+ 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;flex-wrap:wrap;gap:2px}\n"] }]
626
+ }], propDecorators: { breadcrumbs: [{
627
+ type: ContentChildren,
628
+ args: [CuiItemDirective, { read: TemplateRef }]
629
629
  }] } });
630
630
 
631
- class CuiBreadcrumbComponent {
632
- constructor() {
633
- this.isLast = false;
634
- }
635
- }
636
- CuiBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
637
- CuiBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiBreadcrumbComponent, selector: "[cuiBreadcrumb]", inputs: { isLast: "isLast" }, ngImport: i0, template: "<ng-content />\r\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 });
638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbComponent, decorators: [{
639
- type: Component,
640
- args: [{ selector: '[cuiBreadcrumb]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\r\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"] }]
641
- }], propDecorators: { isLast: [{
642
- type: Input
631
+ class CuiBreadcrumbComponent {
632
+ constructor() {
633
+ this.isLast = false;
634
+ }
635
+ }
636
+ CuiBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
637
+ CuiBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbComponent, decorators: [{
639
+ type: Component,
640
+ 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"] }]
641
+ }], propDecorators: { isLast: [{
642
+ type: Input
643
643
  }] } });
644
644
 
645
- class CuiBreadcrumbsModule {
646
- }
647
- CuiBreadcrumbsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
648
- CuiBreadcrumbsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsModule, declarations: [CuiBreadcrumbsComponent,
649
- CuiBreadcrumbComponent], imports: [CommonModule,
650
- CuiSvgModule], exports: [CuiBreadcrumbsComponent,
651
- CuiBreadcrumbComponent] });
652
- CuiBreadcrumbsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsModule, imports: [CommonModule,
653
- CuiSvgModule] });
654
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsModule, decorators: [{
655
- type: NgModule,
656
- args: [{
657
- imports: [
658
- CommonModule,
659
- CuiSvgModule
660
- ],
661
- declarations: [
662
- CuiBreadcrumbsComponent,
663
- CuiBreadcrumbComponent
664
- ],
665
- exports: [
666
- CuiBreadcrumbsComponent,
667
- CuiBreadcrumbComponent
668
- ]
669
- }]
645
+ class CuiBreadcrumbsModule {
646
+ }
647
+ CuiBreadcrumbsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
648
+ CuiBreadcrumbsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsModule, declarations: [CuiBreadcrumbsComponent,
649
+ CuiBreadcrumbComponent], imports: [CommonModule,
650
+ CuiSvgModule], exports: [CuiBreadcrumbsComponent,
651
+ CuiBreadcrumbComponent] });
652
+ CuiBreadcrumbsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsModule, imports: [CommonModule,
653
+ CuiSvgModule] });
654
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiBreadcrumbsModule, decorators: [{
655
+ type: NgModule,
656
+ args: [{
657
+ imports: [
658
+ CommonModule,
659
+ CuiSvgModule
660
+ ],
661
+ declarations: [
662
+ CuiBreadcrumbsComponent,
663
+ CuiBreadcrumbComponent
664
+ ],
665
+ exports: [
666
+ CuiBreadcrumbsComponent,
667
+ CuiBreadcrumbComponent
668
+ ]
669
+ }]
670
670
  }] });
671
671
 
672
- class CuiButtonGroupComponent {
673
- }
674
- CuiButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
675
- CuiButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiButtonGroupComponent, selector: "cui-button-group", ngImport: i0, template: "<ng-content select=\"button[cuiButton], a[cuiButton]\"></ng-content>\r\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 });
676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupComponent, decorators: [{
677
- type: Component,
678
- args: [{ selector: 'cui-button-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"button[cuiButton], a[cuiButton]\"></ng-content>\r\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"] }]
672
+ class CuiButtonGroupComponent {
673
+ }
674
+ CuiButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
675
+ CuiButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupComponent, decorators: [{
677
+ type: Component,
678
+ 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"] }]
679
679
  }] });
680
680
 
681
- class CuiButtonGroupModule {
682
- }
683
- CuiButtonGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
684
- CuiButtonGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupModule, declarations: [CuiButtonGroupComponent], exports: [CuiButtonGroupComponent] });
685
- CuiButtonGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupModule });
686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupModule, decorators: [{
687
- type: NgModule,
688
- args: [{
689
- declarations: [CuiButtonGroupComponent],
690
- exports: [CuiButtonGroupComponent]
691
- }]
681
+ class CuiButtonGroupModule {
682
+ }
683
+ CuiButtonGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
684
+ CuiButtonGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupModule, declarations: [CuiButtonGroupComponent], exports: [CuiButtonGroupComponent] });
685
+ CuiButtonGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupModule });
686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonGroupModule, decorators: [{
687
+ type: NgModule,
688
+ args: [{
689
+ declarations: [CuiButtonGroupComponent],
690
+ exports: [CuiButtonGroupComponent]
691
+ }]
692
692
  }] });
693
693
 
694
- class CuiCheckboxComponent {
695
- }
696
- CuiCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
697
- CuiCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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;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:var(--cui-base-0)}: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{background:var(--cui-gray-500)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxComponent, decorators: [{
699
- type: Component,
700
- 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;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:var(--cui-base-0)}: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{background:var(--cui-gray-500)}\n"] }]
694
+ class CuiCheckboxComponent {
695
+ }
696
+ CuiCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
697
+ CuiCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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;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:var(--cui-base-0)}: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{background:var(--cui-gray-500)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
698
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxComponent, decorators: [{
699
+ type: Component,
700
+ 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;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:var(--cui-base-0)}: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{background:var(--cui-gray-500)}\n"] }]
701
701
  }] });
702
702
 
703
- class CuiCheckboxModule {
704
- }
705
- CuiCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
706
- CuiCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxModule, declarations: [CuiCheckboxComponent], exports: [CuiCheckboxComponent] });
707
- CuiCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxModule });
708
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxModule, decorators: [{
709
- type: NgModule,
710
- args: [{
711
- declarations: [CuiCheckboxComponent],
712
- exports: [CuiCheckboxComponent]
713
- }]
703
+ class CuiCheckboxModule {
704
+ }
705
+ CuiCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
706
+ CuiCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxModule, declarations: [CuiCheckboxComponent], exports: [CuiCheckboxComponent] });
707
+ CuiCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxModule });
708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiCheckboxModule, decorators: [{
709
+ type: NgModule,
710
+ args: [{
711
+ declarations: [CuiCheckboxComponent],
712
+ exports: [CuiCheckboxComponent]
713
+ }]
714
714
  }] });
715
715
 
716
716
  const CUI_ROOT_SELECTOR = 'cui-root';
717
717
 
718
- const CUI_DIALOGS = cuiCreateToken(new BehaviorSubject([]));
719
- const CUI_DIALOG_DEFAULT_OPTIONS = {
720
- size: 'auto',
721
- data: undefined
722
- };
723
- const CUI_DIALOG_OPTIONS = cuiCreateToken(CUI_DIALOG_DEFAULT_OPTIONS);
718
+ const CUI_DIALOGS = cuiCreateToken(new BehaviorSubject([]));
719
+ const CUI_DIALOG_DEFAULT_OPTIONS = {
720
+ size: 'auto',
721
+ data: undefined
722
+ };
723
+ const CUI_DIALOG_OPTIONS = cuiCreateToken(CUI_DIALOG_DEFAULT_OPTIONS);
724
724
  const CUI_DIALOG_CONTEXT = new InjectionToken('');
725
725
 
726
- class CuiDialogsComponent {
727
- constructor() {
728
- this.destroy$ = inject(CuiDestroyService, { self: true });
729
- this.dialogs$ = inject(CUI_DIALOGS);
730
- this.dialogInjectorCache = new Map();
731
- }
732
- ngOnInit() {
733
- this.initDialogInjectorsSubscription();
734
- }
735
- trackByFn(_, dialog) {
736
- return dialog.id;
737
- }
738
- initDialogInjectorsSubscription() {
739
- this.dialogs$
740
- .pipe(takeUntil(this.destroy$))
741
- .subscribe(dialogs => {
742
- this.dialogInjectors = dialogs.map(dialog => {
743
- if (!this.dialogInjectorCache.has(dialog.id)) {
744
- this.dialogInjectorCache.set(dialog.id, Injector.create({
745
- providers: [{ provide: CUI_DIALOG_CONTEXT, useValue: dialog }],
746
- parent: dialog.injector
747
- }));
748
- }
749
- return this.dialogInjectorCache.get(dialog.id);
750
- });
751
- this.dialogInjectorCache.forEach((_, dialogId) => {
752
- if (dialogs.find(dialog => dialog.id === dialogId)) {
753
- return;
754
- }
755
- this.dialogInjectorCache.delete(dialogId);
756
- });
757
- });
758
- }
759
- }
760
- CuiDialogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
761
- CuiDialogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogsComponent, selector: "cui-dialogs", providers: [CuiDestroyService], ngImport: i0, template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\r\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\r\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\r\n </ng-container>\r\n <div\r\n *ngIf=\"dialogs!.length\"\r\n class=\"c-overlay\"\r\n ></div>\r\n</ng-container>\r\n", styles: [":host{isolation:isolate}.c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "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: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
762
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogsComponent, decorators: [{
763
- type: Component,
764
- args: [{ selector: 'cui-dialogs', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\r\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\r\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\r\n </ng-container>\r\n <div\r\n *ngIf=\"dialogs!.length\"\r\n class=\"c-overlay\"\r\n ></div>\r\n</ng-container>\r\n", styles: [":host{isolation:isolate}.c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"] }]
726
+ class CuiDialogsComponent {
727
+ constructor() {
728
+ this.destroy$ = inject(CuiDestroyService, { self: true });
729
+ this.dialogs$ = inject(CUI_DIALOGS);
730
+ this.dialogInjectorCache = new Map();
731
+ }
732
+ ngOnInit() {
733
+ this.initDialogInjectorsSubscription();
734
+ }
735
+ trackByFn(_, dialog) {
736
+ return dialog.id;
737
+ }
738
+ initDialogInjectorsSubscription() {
739
+ this.dialogs$
740
+ .pipe(takeUntil(this.destroy$))
741
+ .subscribe(dialogs => {
742
+ this.dialogInjectors = dialogs.map(dialog => {
743
+ if (!this.dialogInjectorCache.has(dialog.id)) {
744
+ this.dialogInjectorCache.set(dialog.id, Injector.create({
745
+ providers: [{ provide: CUI_DIALOG_CONTEXT, useValue: dialog }],
746
+ parent: dialog.injector
747
+ }));
748
+ }
749
+ return this.dialogInjectorCache.get(dialog.id);
750
+ });
751
+ this.dialogInjectorCache.forEach((_, dialogId) => {
752
+ if (dialogs.find(dialog => dialog.id === dialogId)) {
753
+ return;
754
+ }
755
+ this.dialogInjectorCache.delete(dialogId);
756
+ });
757
+ });
758
+ }
759
+ }
760
+ CuiDialogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
761
+ CuiDialogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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-900);opacity:.3}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "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: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogsComponent, decorators: [{
763
+ type: Component,
764
+ 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-900);opacity:.3}\n"] }]
765
765
  }] });
766
766
 
767
- class CuiRootComponent {
768
- constructor() {
769
- this.document = inject(DOCUMENT);
770
- this.theme$ = inject(CuiThemeService);
771
- this.destroy$ = inject(CuiDestroyService);
772
- }
773
- ngOnInit() {
774
- this.initThemeSubscription();
775
- }
776
- initThemeSubscription() {
777
- this.theme$
778
- .pipe(takeUntil(this.destroy$))
779
- .subscribe(theme => this.document.documentElement.setAttribute('cuiTheme', theme));
780
- }
781
- }
782
- CuiRootComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
783
- CuiRootComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiRootComponent, selector: "cui-root", providers: [CuiDestroyService], ngImport: i0, template: "<div class=\"c-content\">\r\n <ng-content />\r\n</div>\r\n<cui-dialogs />\r\n<cui-alerts />\r\n", styles: [".c-content{isolation:isolate}\n"], dependencies: [{ kind: "component", type: CuiDialogsComponent, selector: "cui-dialogs" }, { kind: "component", type: CuiAlertsComponent, selector: "cui-alerts" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootComponent, decorators: [{
785
- type: Component,
786
- args: [{ selector: CUI_ROOT_SELECTOR, changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<div class=\"c-content\">\r\n <ng-content />\r\n</div>\r\n<cui-dialogs />\r\n<cui-alerts />\r\n", styles: [".c-content{isolation:isolate}\n"] }]
767
+ class CuiRootComponent {
768
+ constructor() {
769
+ this.document = inject(DOCUMENT);
770
+ this.theme$ = inject(CuiThemeService);
771
+ this.destroy$ = inject(CuiDestroyService);
772
+ }
773
+ ngOnInit() {
774
+ this.initThemeSubscription();
775
+ }
776
+ initThemeSubscription() {
777
+ this.theme$
778
+ .pipe(takeUntil(this.destroy$))
779
+ .subscribe(theme => this.document.documentElement.setAttribute('cuiTheme', theme));
780
+ }
781
+ }
782
+ CuiRootComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
783
+ CuiRootComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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", styles: [".c-content{isolation:isolate}\n"], dependencies: [{ kind: "component", type: CuiDialogsComponent, selector: "cui-dialogs" }, { kind: "component", type: CuiAlertsComponent, selector: "cui-alerts" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootComponent, decorators: [{
785
+ type: Component,
786
+ 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", styles: [".c-content{isolation:isolate}\n"] }]
787
787
  }] });
788
788
 
789
- // TODO: сделать структурную директиву
790
- const ContentType = {
791
- String: 'string',
792
- Template: 'template',
793
- Component: 'component'
794
- };
795
- class CuiDialogComponent {
796
- constructor() {
797
- this.document = inject(DOCUMENT);
798
- this.element = inject(ElementRef).nativeElement;
799
- this.context = inject(CUI_DIALOG_CONTEXT);
800
- this.LAST_OF_TYPE_SELECTOR = ':last-of-type';
801
- this.ContentType = ContentType;
802
- this.contentType = ContentType.Component;
803
- }
804
- get size() {
805
- return this.context.size;
806
- }
807
- ngOnInit() {
808
- this.initBodyScrollHiding();
809
- this.initContentType();
810
- }
811
- ngOnDestroy() {
812
- this.destroyBodyScrollHiding();
813
- }
814
- get contentTemplateRef() {
815
- return this.context.content;
816
- }
817
- get componentType() {
818
- return this.context.content;
819
- }
820
- onEscape() {
821
- if (!this.element.matches(this.LAST_OF_TYPE_SELECTOR)) {
822
- return;
823
- }
824
- this.context.completeWith();
825
- }
826
- initContentType() {
827
- const content = this.context.content;
828
- switch (true) {
829
- case (typeof content === 'string'):
830
- this.contentType = ContentType.String;
831
- return;
832
- case (content instanceof TemplateRef):
833
- this.contentType = ContentType.Template;
834
- return;
835
- }
836
- }
837
- initBodyScrollHiding() {
838
- this.document.body.style.overflow = 'hidden';
839
- }
840
- destroyBodyScrollHiding() {
841
- this.document.body.style.overflow = '';
842
- }
843
- }
844
- CuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
845
- CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", host: { listeners: { "document:keydown.escape": "onEscape($event)" }, properties: { "attr.data-size": "this.size" } }, hostDirectives: [{ directive: i2.CuiFocusTrapDirective }], ngImport: i0, template: "<ng-container [ngSwitch]=\"contentType\">\r\n <ng-container *ngSwitchCase=\"ContentType.String\">\r\n {{ context.content }}\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"ContentType.Template\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"ContentType.Component\">\r\n <div class=\"c-component-container\">\r\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\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)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}: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", "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 });
846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, decorators: [{
847
- type: Component,
848
- args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [CuiFocusTrapDirective], template: "<ng-container [ngSwitch]=\"contentType\">\r\n <ng-container *ngSwitchCase=\"ContentType.String\">\r\n {{ context.content }}\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"ContentType.Template\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"ContentType.Component\">\r\n <div class=\"c-component-container\">\r\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\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)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}:host[data-size=xl]{max-width:1080px}.c-component-container{display:contents}.c-component-container ::ng-deep>*{display:contents}\n"] }]
849
- }], propDecorators: { size: [{
850
- type: HostBinding,
851
- args: ['attr.data-size']
852
- }], onEscape: [{
853
- type: HostListener,
854
- args: ['document:keydown.escape', ['$event']]
789
+ // TODO: сделать структурную директиву
790
+ const ContentType = {
791
+ String: 'string',
792
+ Template: 'template',
793
+ Component: 'component'
794
+ };
795
+ class CuiDialogComponent {
796
+ constructor() {
797
+ this.document = inject(DOCUMENT);
798
+ this.element = inject(ElementRef).nativeElement;
799
+ this.context = inject(CUI_DIALOG_CONTEXT);
800
+ this.LAST_OF_TYPE_SELECTOR = ':last-of-type';
801
+ this.ContentType = ContentType;
802
+ this.contentType = ContentType.Component;
803
+ }
804
+ get size() {
805
+ return this.context.size;
806
+ }
807
+ ngOnInit() {
808
+ this.initBodyScrollHiding();
809
+ this.initContentType();
810
+ }
811
+ ngOnDestroy() {
812
+ this.destroyBodyScrollHiding();
813
+ }
814
+ get contentTemplateRef() {
815
+ return this.context.content;
816
+ }
817
+ get componentType() {
818
+ return this.context.content;
819
+ }
820
+ onEscape() {
821
+ if (!this.element.matches(this.LAST_OF_TYPE_SELECTOR)) {
822
+ return;
823
+ }
824
+ this.context.completeWith();
825
+ }
826
+ initContentType() {
827
+ const content = this.context.content;
828
+ switch (true) {
829
+ case (typeof content === 'string'):
830
+ this.contentType = ContentType.String;
831
+ return;
832
+ case (content instanceof TemplateRef):
833
+ this.contentType = ContentType.Template;
834
+ return;
835
+ }
836
+ }
837
+ initBodyScrollHiding() {
838
+ this.document.body.style.overflow = 'hidden';
839
+ }
840
+ destroyBodyScrollHiding() {
841
+ this.document.body.style.overflow = '';
842
+ }
843
+ }
844
+ CuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
845
+ CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", host: { listeners: { "document:keydown.escape": "onEscape($event)" }, properties: { "attr.data-size": "this.size" } }, hostDirectives: [{ directive: i2.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)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}: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", "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 });
846
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, decorators: [{
847
+ type: Component,
848
+ 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)}:host:last-of-type{z-index:1}:host[data-size=auto]{width:auto}:host[data-size=xl]{max-width:1080px}.c-component-container{display:contents}.c-component-container ::ng-deep>*{display:contents}\n"] }]
849
+ }], propDecorators: { size: [{
850
+ type: HostBinding,
851
+ args: ['attr.data-size']
852
+ }], onEscape: [{
853
+ type: HostListener,
854
+ args: ['document:keydown.escape', ['$event']]
855
855
  }] } });
856
856
 
857
- class CuiDialogActionsComponent {
858
- }
859
- CuiDialogActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
860
- CuiDialogActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogActionsComponent, selector: "cui-dialog-actions", ngImport: i0, template: "<div class=\"c-divider\"></div>\r\n<div class=\"c-content\">\r\n <ng-content />\r\n</div>\r\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 });
861
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogActionsComponent, decorators: [{
862
- type: Component,
863
- args: [{ selector: 'cui-dialog-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"c-divider\"></div>\r\n<div class=\"c-content\">\r\n <ng-content />\r\n</div>\r\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"] }]
857
+ class CuiDialogActionsComponent {
858
+ }
859
+ CuiDialogActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
860
+ CuiDialogActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
861
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogActionsComponent, decorators: [{
862
+ type: Component,
863
+ 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"] }]
864
864
  }] });
865
865
 
866
- class CuiDialogHeaderComponent {
867
- constructor() {
868
- this.closed = new EventEmitter();
869
- }
870
- onClose(event) {
871
- this.closed.emit(event);
872
- }
873
- }
874
- CuiDialogHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
875
- CuiDialogHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogHeaderComponent, selector: "header[cuiDialogHeader][heading]", inputs: { heading: "heading", headingContext: "headingContext", subheading: "subheading" }, outputs: { closed: "closed" }, ngImport: i0, template: "<div class=\"c-heading\">\r\n <ng-container *polymorpheusOutlet=\"heading as heading; context: headingContext\">{{ heading }}</ng-container>\r\n</div>\r\n<button\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n icon=\"cuiIconClearSm\"\r\n class=\"c-button\"\r\n (click)=\"onClose($event)\"\r\n></button>\r\n<span *ngIf=\"subheading\">{{ subheading }}</span>\r\n<ng-content />\r\n", styles: [":host{padding:16px 24px;font-weight:500;font-size:14px;line-height:20px;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$1.PolymorpheusOutletDirective, 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 });
876
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogHeaderComponent, decorators: [{
877
- type: Component,
878
- args: [{ selector: 'header[cuiDialogHeader][heading]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"c-heading\">\r\n <ng-container *polymorpheusOutlet=\"heading as heading; context: headingContext\">{{ heading }}</ng-container>\r\n</div>\r\n<button\r\n cuiButton\r\n type=\"button\"\r\n appearance=\"ghost\"\r\n icon=\"cuiIconClearSm\"\r\n class=\"c-button\"\r\n (click)=\"onClose($event)\"\r\n></button>\r\n<span *ngIf=\"subheading\">{{ subheading }}</span>\r\n<ng-content />\r\n", styles: [":host{padding:16px 24px;font-weight:500;font-size:14px;line-height:20px;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"] }]
879
- }], propDecorators: { heading: [{
880
- type: Input
881
- }], headingContext: [{
882
- type: Input
883
- }], subheading: [{
884
- type: Input
885
- }], closed: [{
886
- type: Output
866
+ class CuiDialogHeaderComponent {
867
+ constructor() {
868
+ this.closed = new EventEmitter();
869
+ }
870
+ onClose(event) {
871
+ this.closed.emit(event);
872
+ }
873
+ }
874
+ CuiDialogHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
875
+ CuiDialogHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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;font-weight:500;font-size:14px;line-height:20px;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$1.PolymorpheusOutletDirective, 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 });
876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogHeaderComponent, decorators: [{
877
+ type: Component,
878
+ 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;font-weight:500;font-size:14px;line-height:20px;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"] }]
879
+ }], propDecorators: { heading: [{
880
+ type: Input
881
+ }], headingContext: [{
882
+ type: Input
883
+ }], subheading: [{
884
+ type: Input
885
+ }], closed: [{
886
+ type: Output
887
887
  }] } });
888
888
 
889
- class CuiDialogModule {
890
- }
891
- CuiDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
892
- CuiDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogModule, declarations: [CuiDialogComponent,
893
- CuiDialogsComponent,
894
- CuiDialogActionsComponent,
895
- CuiDialogHeaderComponent], imports: [CommonModule,
896
- PolymorpheusModule,
897
- CuiLetDirective,
898
- CuiButtonModule], exports: [CuiDialogComponent,
899
- CuiDialogsComponent,
900
- CuiDialogActionsComponent,
901
- CuiDialogHeaderComponent] });
902
- CuiDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogModule, imports: [CommonModule,
903
- PolymorpheusModule,
904
- CuiButtonModule] });
905
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogModule, decorators: [{
906
- type: NgModule,
907
- args: [{
908
- imports: [
909
- CommonModule,
910
- PolymorpheusModule,
911
- CuiLetDirective,
912
- CuiButtonModule
913
- ],
914
- declarations: [
915
- CuiDialogComponent,
916
- CuiDialogsComponent,
917
- CuiDialogActionsComponent,
918
- CuiDialogHeaderComponent
919
- ],
920
- exports: [
921
- CuiDialogComponent,
922
- CuiDialogsComponent,
923
- CuiDialogActionsComponent,
924
- CuiDialogHeaderComponent
925
- ]
926
- }]
889
+ class CuiDialogModule {
890
+ }
891
+ CuiDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
892
+ CuiDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogModule, declarations: [CuiDialogComponent,
893
+ CuiDialogsComponent,
894
+ CuiDialogActionsComponent,
895
+ CuiDialogHeaderComponent], imports: [CommonModule,
896
+ PolymorpheusModule,
897
+ CuiLetDirective,
898
+ CuiButtonModule], exports: [CuiDialogComponent,
899
+ CuiDialogsComponent,
900
+ CuiDialogActionsComponent,
901
+ CuiDialogHeaderComponent] });
902
+ CuiDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogModule, imports: [CommonModule,
903
+ PolymorpheusModule,
904
+ CuiButtonModule] });
905
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogModule, decorators: [{
906
+ type: NgModule,
907
+ args: [{
908
+ imports: [
909
+ CommonModule,
910
+ PolymorpheusModule,
911
+ CuiLetDirective,
912
+ CuiButtonModule
913
+ ],
914
+ declarations: [
915
+ CuiDialogComponent,
916
+ CuiDialogsComponent,
917
+ CuiDialogActionsComponent,
918
+ CuiDialogHeaderComponent
919
+ ],
920
+ exports: [
921
+ CuiDialogComponent,
922
+ CuiDialogsComponent,
923
+ CuiDialogActionsComponent,
924
+ CuiDialogHeaderComponent
925
+ ]
926
+ }]
927
927
  }] });
928
928
 
929
- class CuiDialogService extends CuiPopoverService {
930
- }
931
- CuiDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
932
- CuiDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogService, providedIn: 'root', useFactory: () => new CuiDialogService(CUI_DIALOGS, CuiDialogComponent, inject(CUI_DIALOG_OPTIONS)) });
933
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogService, decorators: [{
934
- type: Injectable,
935
- args: [{
936
- providedIn: 'root',
937
- useFactory: () => new CuiDialogService(CUI_DIALOGS, CuiDialogComponent, inject(CUI_DIALOG_OPTIONS))
938
- }]
929
+ class CuiDialogService extends CuiPopoverService {
930
+ }
931
+ CuiDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
932
+ CuiDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogService, providedIn: 'root', useFactory: () => new CuiDialogService(CUI_DIALOGS, CuiDialogComponent, inject(CUI_DIALOG_OPTIONS)) });
933
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogService, decorators: [{
934
+ type: Injectable,
935
+ args: [{
936
+ providedIn: 'root',
937
+ useFactory: () => new CuiDialogService(CUI_DIALOGS, CuiDialogComponent, inject(CUI_DIALOG_OPTIONS))
938
+ }]
939
939
  }] });
940
940
 
941
- class CuiRootModule {
942
- }
943
- CuiRootModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
944
- CuiRootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiRootModule, declarations: [CuiRootComponent], imports: [CommonModule,
945
- CuiDialogModule,
946
- CuiAlertModule], exports: [CuiRootComponent] });
947
- CuiRootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootModule, imports: [CommonModule,
948
- CuiDialogModule,
949
- CuiAlertModule] });
950
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootModule, decorators: [{
951
- type: NgModule,
952
- args: [{
953
- imports: [
954
- CommonModule,
955
- CuiDialogModule,
956
- CuiAlertModule
957
- ],
958
- declarations: [CuiRootComponent],
959
- exports: [CuiRootComponent]
960
- }]
941
+ class CuiRootModule {
942
+ }
943
+ CuiRootModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
944
+ CuiRootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiRootModule, declarations: [CuiRootComponent], imports: [CommonModule,
945
+ CuiDialogModule,
946
+ CuiAlertModule], exports: [CuiRootComponent] });
947
+ CuiRootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootModule, imports: [CommonModule,
948
+ CuiDialogModule,
949
+ CuiAlertModule] });
950
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRootModule, decorators: [{
951
+ type: NgModule,
952
+ args: [{
953
+ imports: [
954
+ CommonModule,
955
+ CuiDialogModule,
956
+ CuiAlertModule
957
+ ],
958
+ declarations: [CuiRootComponent],
959
+ exports: [CuiRootComponent]
960
+ }]
961
961
  }] });
962
962
 
963
- class CuiContextMenuComponent {
964
- constructor() {
965
- this.changeDetectorRef = inject(ChangeDetectorRef);
966
- this.viewContainerRef = inject(ViewContainerRef);
967
- this.document = inject(DOCUMENT);
968
- this.documentElement = this.document.documentElement;
969
- this.window = inject(CUI_WINDOW);
970
- this.destroy$ = inject(CuiDestroyService, { self: true });
971
- this.cuiClickOutsideDirective = inject(CuiClickOutsideDirective, { self: true });
972
- this.cuiTargetDirective = inject(CuiTargetDirective, { self: true });
973
- this.EXTRA_OFFSET_LEFT = 0;
974
- this.EXTRA_OFFSET_TOP = 0;
975
- this.isVisible = false;
976
- }
977
- ngOnInit() {
978
- this.initClickOutsideSubscription();
979
- }
980
- ngOnDestroy() {
981
- this.clearViewContainerRef();
982
- }
983
- ngAfterViewInit() {
984
- this.initTargetElementListener();
985
- }
986
- onSelect(item) {
987
- var _a;
988
- this.close();
989
- (_a = item.command) === null || _a === void 0 ? void 0 : _a.call(item);
990
- }
991
- onClose() {
992
- this.close();
993
- }
994
- onStopClickPropagation(event) {
995
- event.stopPropagation();
996
- }
997
- trackByFn(_, item) {
998
- return item.label;
999
- }
1000
- initClickOutsideSubscription() {
1001
- this.cuiClickOutsideDirective.cuiClickOutside
1002
- .pipe(takeUntil(this.destroy$))
1003
- .subscribe((target) => {
1004
- if (this.target.contains(target)) {
1005
- return;
1006
- }
1007
- this.close();
1008
- });
1009
- }
1010
- initTargetElementListener() {
1011
- this.targetEventListener = (event) => {
1012
- event.stopPropagation();
1013
- this.document.body.click();
1014
- this.isVisible = !this.isVisible;
1015
- this.clearViewContainerRef();
1016
- if (this.isVisible) {
1017
- this.renderList();
1018
- this.changePosition(event.clientX, event.clientY);
1019
- this.initHidingSubscription();
1020
- }
1021
- this.changeDetectorRef.markForCheck();
1022
- };
1023
- this.cuiTargetDirective.clicked
1024
- .pipe(takeUntil(this.destroy$))
1025
- .subscribe(this.targetEventListener);
1026
- }
1027
- initHidingSubscription() {
1028
- this.initHidingFromWindowEvent('scroll');
1029
- this.initHidingFromWindowEvent('resize');
1030
- }
1031
- initHidingFromWindowEvent(eventName) {
1032
- fromEvent(this.window, eventName)
1033
- .pipe(take(1))
1034
- .subscribe(() => {
1035
- this.close();
1036
- this.changeDetectorRef.markForCheck();
1037
- });
1038
- }
1039
- close() {
1040
- this.isVisible = false;
1041
- this.clearViewContainerRef();
1042
- }
1043
- renderList() {
1044
- const embeddedViewRef = this.viewContainerRef.createEmbeddedView(this.list);
1045
- this.node = embeddedViewRef.rootNodes[0];
1046
- embeddedViewRef.detectChanges();
1047
- this.document.querySelector(CUI_ROOT_SELECTOR).appendChild(this.node);
1048
- }
1049
- changePosition(x, y) {
1050
- this.node.style.visibility = 'hidden';
1051
- setTimeout(() => {
1052
- const { clientWidth, clientHeight } = this.documentElement;
1053
- const width = this.node.offsetWidth;
1054
- const height = this.node.offsetHeight;
1055
- let left = x;
1056
- let top = y;
1057
- if (left + width > clientWidth) {
1058
- left -= width;
1059
- }
1060
- if (top + height > clientHeight) {
1061
- top -= height;
1062
- }
1063
- left = Math.max(left, this.EXTRA_OFFSET_LEFT);
1064
- top = Math.max(top, this.EXTRA_OFFSET_TOP);
1065
- this.node.style.left = left + 'px';
1066
- this.node.style.top = top + 'px';
1067
- this.node.style.visibility = '';
1068
- this.changeDetectorRef.markForCheck();
1069
- });
1070
- }
1071
- clearViewContainerRef() {
1072
- this.viewContainerRef.clear();
1073
- }
1074
- }
1075
- CuiContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1076
- CuiContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: i2.CuiClickOutsideDirective }, { directive: i2.CuiTargetDirective, inputs: ["ccTarget", "target"] }], ngImport: i0, template: "<ng-template #list>\r\n <div class=\"c-container\">\r\n <ul\r\n *ngIf=\"isVisible\"\r\n class=\"c-ul\"\r\n >\r\n <li\r\n *ngFor=\"let item of items; trackBy: trackByFn\"\r\n [style.color]=\"item.color\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"c-button\"\r\n (click)=\"onSelect(item)\"\r\n >\r\n <cui-svg\r\n *ngIf=\"item.icon\"\r\n [icon]=\"item.icon\"\r\n [color]=\"item.color\"\r\n ></cui-svg>\r\n <span>{{ item.label }}</span>\r\n </button>\r\n </li>\r\n </ul>\r\n </div>\r\n</ng-template>\r\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 });
1077
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuComponent, decorators: [{
1078
- type: Component,
1079
- args: [{ selector: 'cui-context-menu[items][target]', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], hostDirectives: [
1080
- CuiClickOutsideDirective,
1081
- {
1082
- directive: CuiTargetDirective,
1083
- inputs: ['ccTarget: target']
1084
- }
1085
- ], template: "<ng-template #list>\r\n <div class=\"c-container\">\r\n <ul\r\n *ngIf=\"isVisible\"\r\n class=\"c-ul\"\r\n >\r\n <li\r\n *ngFor=\"let item of items; trackBy: trackByFn\"\r\n [style.color]=\"item.color\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"c-button\"\r\n (click)=\"onSelect(item)\"\r\n >\r\n <cui-svg\r\n *ngIf=\"item.icon\"\r\n [icon]=\"item.icon\"\r\n [color]=\"item.color\"\r\n ></cui-svg>\r\n <span>{{ item.label }}</span>\r\n </button>\r\n </li>\r\n </ul>\r\n </div>\r\n</ng-template>\r\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"] }]
1086
- }], propDecorators: { items: [{
1087
- type: Input
1088
- }], target: [{
1089
- type: Input
1090
- }], list: [{
1091
- type: ViewChild,
1092
- args: ['list']
1093
- }], onClose: [{
1094
- type: HostListener,
1095
- args: ['window:resize']
1096
- }], onStopClickPropagation: [{
1097
- type: HostListener,
1098
- args: ['click', ['$event']]
963
+ class CuiContextMenuComponent {
964
+ constructor() {
965
+ this.changeDetectorRef = inject(ChangeDetectorRef);
966
+ this.viewContainerRef = inject(ViewContainerRef);
967
+ this.document = inject(DOCUMENT);
968
+ this.documentElement = this.document.documentElement;
969
+ this.window = inject(CUI_WINDOW);
970
+ this.destroy$ = inject(CuiDestroyService, { self: true });
971
+ this.cuiClickOutsideDirective = inject(CuiClickOutsideDirective, { self: true });
972
+ this.cuiTargetDirective = inject(CuiTargetDirective, { self: true });
973
+ this.EXTRA_OFFSET_LEFT = 0;
974
+ this.EXTRA_OFFSET_TOP = 0;
975
+ this.isVisible = false;
976
+ }
977
+ ngOnInit() {
978
+ this.initClickOutsideSubscription();
979
+ }
980
+ ngOnDestroy() {
981
+ this.clearViewContainerRef();
982
+ }
983
+ ngAfterViewInit() {
984
+ this.initTargetElementListener();
985
+ }
986
+ onSelect(item) {
987
+ var _a;
988
+ this.close();
989
+ (_a = item.command) === null || _a === void 0 ? void 0 : _a.call(item);
990
+ }
991
+ onClose() {
992
+ this.close();
993
+ }
994
+ onStopClickPropagation(event) {
995
+ event.stopPropagation();
996
+ }
997
+ trackByFn(_, item) {
998
+ return item.label;
999
+ }
1000
+ initClickOutsideSubscription() {
1001
+ this.cuiClickOutsideDirective.cuiClickOutside
1002
+ .pipe(takeUntil(this.destroy$))
1003
+ .subscribe((target) => {
1004
+ if (this.target.contains(target)) {
1005
+ return;
1006
+ }
1007
+ this.close();
1008
+ });
1009
+ }
1010
+ initTargetElementListener() {
1011
+ this.targetEventListener = (event) => {
1012
+ event.stopPropagation();
1013
+ this.document.body.click();
1014
+ this.isVisible = !this.isVisible;
1015
+ this.clearViewContainerRef();
1016
+ if (this.isVisible) {
1017
+ this.renderList();
1018
+ this.changePosition(event.clientX, event.clientY);
1019
+ this.initHidingSubscription();
1020
+ }
1021
+ this.changeDetectorRef.markForCheck();
1022
+ };
1023
+ this.cuiTargetDirective.clicked
1024
+ .pipe(takeUntil(this.destroy$))
1025
+ .subscribe(this.targetEventListener);
1026
+ }
1027
+ initHidingSubscription() {
1028
+ this.initHidingFromWindowEvent('scroll');
1029
+ this.initHidingFromWindowEvent('resize');
1030
+ }
1031
+ initHidingFromWindowEvent(eventName) {
1032
+ fromEvent(this.window, eventName)
1033
+ .pipe(take(1))
1034
+ .subscribe(() => {
1035
+ this.close();
1036
+ this.changeDetectorRef.markForCheck();
1037
+ });
1038
+ }
1039
+ close() {
1040
+ this.isVisible = false;
1041
+ this.clearViewContainerRef();
1042
+ }
1043
+ renderList() {
1044
+ const embeddedViewRef = this.viewContainerRef.createEmbeddedView(this.list);
1045
+ this.node = embeddedViewRef.rootNodes[0];
1046
+ embeddedViewRef.detectChanges();
1047
+ this.document.querySelector(CUI_ROOT_SELECTOR).appendChild(this.node);
1048
+ }
1049
+ changePosition(x, y) {
1050
+ this.node.style.visibility = 'hidden';
1051
+ setTimeout(() => {
1052
+ const { clientWidth, clientHeight } = this.documentElement;
1053
+ const width = this.node.offsetWidth;
1054
+ const height = this.node.offsetHeight;
1055
+ let left = x;
1056
+ let top = y;
1057
+ if (left + width > clientWidth) {
1058
+ left -= width;
1059
+ }
1060
+ if (top + height > clientHeight) {
1061
+ top -= height;
1062
+ }
1063
+ left = Math.max(left, this.EXTRA_OFFSET_LEFT);
1064
+ top = Math.max(top, this.EXTRA_OFFSET_TOP);
1065
+ this.node.style.left = left + 'px';
1066
+ this.node.style.top = top + 'px';
1067
+ this.node.style.visibility = '';
1068
+ this.changeDetectorRef.markForCheck();
1069
+ });
1070
+ }
1071
+ clearViewContainerRef() {
1072
+ this.viewContainerRef.clear();
1073
+ }
1074
+ }
1075
+ CuiContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1076
+ CuiContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: i2.CuiClickOutsideDirective }, { directive: i2.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 });
1077
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuComponent, decorators: [{
1078
+ type: Component,
1079
+ args: [{ selector: 'cui-context-menu[items][target]', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], hostDirectives: [
1080
+ CuiClickOutsideDirective,
1081
+ {
1082
+ directive: CuiTargetDirective,
1083
+ inputs: ['ccTarget: target']
1084
+ }
1085
+ ], 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"] }]
1086
+ }], propDecorators: { items: [{
1087
+ type: Input
1088
+ }], target: [{
1089
+ type: Input
1090
+ }], list: [{
1091
+ type: ViewChild,
1092
+ args: ['list']
1093
+ }], onClose: [{
1094
+ type: HostListener,
1095
+ args: ['window:resize']
1096
+ }], onStopClickPropagation: [{
1097
+ type: HostListener,
1098
+ args: ['click', ['$event']]
1099
1099
  }] } });
1100
1100
 
1101
- class CuiContextMenuModule {
1102
- }
1103
- CuiContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1104
- CuiContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuModule, declarations: [CuiContextMenuComponent], imports: [CommonModule,
1105
- CuiSvgModule], exports: [CuiContextMenuComponent] });
1106
- CuiContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuModule, imports: [CommonModule,
1107
- CuiSvgModule] });
1108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuModule, decorators: [{
1109
- type: NgModule,
1110
- args: [{
1111
- imports: [
1112
- CommonModule,
1113
- CuiSvgModule
1114
- ],
1115
- declarations: [CuiContextMenuComponent],
1116
- exports: [CuiContextMenuComponent]
1117
- }]
1101
+ class CuiContextMenuModule {
1102
+ }
1103
+ CuiContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1104
+ CuiContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuModule, declarations: [CuiContextMenuComponent], imports: [CommonModule,
1105
+ CuiSvgModule], exports: [CuiContextMenuComponent] });
1106
+ CuiContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuModule, imports: [CommonModule,
1107
+ CuiSvgModule] });
1108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiContextMenuModule, decorators: [{
1109
+ type: NgModule,
1110
+ args: [{
1111
+ imports: [
1112
+ CommonModule,
1113
+ CuiSvgModule
1114
+ ],
1115
+ declarations: [CuiContextMenuComponent],
1116
+ exports: [CuiContextMenuComponent]
1117
+ }]
1118
1118
  }] });
1119
1119
 
1120
- class CuiFormFieldComponent {
1121
- }
1122
- CuiFormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1123
- CuiFormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiFormFieldComponent, selector: "cui-form-field", ngImport: i0, template: "<ng-content select=\"label[cuiLabel]\" />\r\n<ng-content />\r\n<div class=\"c-hint-container\">\r\n <ng-content select=\"cui-hint\" />\r\n</div>\r\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 });
1124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldComponent, decorators: [{
1125
- type: Component,
1126
- args: [{ selector: 'cui-form-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"label[cuiLabel]\" />\r\n<ng-content />\r\n<div class=\"c-hint-container\">\r\n <ng-content select=\"cui-hint\" />\r\n</div>\r\n", styles: [":host{display:flex;flex-direction:column;gap:4px}.c-hint-container{margin-top:2px}.c-hint-container:empty{display:contents}\n"] }]
1120
+ class CuiFormFieldComponent {
1121
+ }
1122
+ CuiFormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1123
+ CuiFormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
1124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldComponent, decorators: [{
1125
+ type: Component,
1126
+ 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"] }]
1127
1127
  }] });
1128
1128
 
1129
- class CuiFormFieldModule {
1130
- }
1131
- CuiFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1132
- CuiFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldModule, declarations: [CuiFormFieldComponent], exports: [CuiFormFieldComponent] });
1133
- CuiFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldModule });
1134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldModule, decorators: [{
1135
- type: NgModule,
1136
- args: [{
1137
- declarations: [CuiFormFieldComponent],
1138
- exports: [CuiFormFieldComponent]
1139
- }]
1129
+ class CuiFormFieldModule {
1130
+ }
1131
+ CuiFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1132
+ CuiFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldModule, declarations: [CuiFormFieldComponent], exports: [CuiFormFieldComponent] });
1133
+ CuiFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldModule });
1134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiFormFieldModule, decorators: [{
1135
+ type: NgModule,
1136
+ args: [{
1137
+ declarations: [CuiFormFieldComponent],
1138
+ exports: [CuiFormFieldComponent]
1139
+ }]
1140
1140
  }] });
1141
1141
 
1142
- class CuiHintComponent {
1143
- constructor() {
1144
- this.hintType = 'info';
1145
- }
1146
- }
1147
- CuiHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1148
- CuiHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiHintComponent, selector: "cui-hint", inputs: { hintType: "hintType" }, host: { properties: { "attr.data-hint-type": "this.hintType" } }, ngImport: i0, template: "<ng-content></ng-content>\r\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 });
1149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintComponent, decorators: [{
1150
- type: Component,
1151
- args: [{ selector: 'cui-hint', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\r\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"] }]
1152
- }], propDecorators: { hintType: [{
1153
- type: Input
1154
- }, {
1155
- type: HostBinding,
1156
- args: ['attr.data-hint-type']
1142
+ class CuiHintComponent {
1143
+ constructor() {
1144
+ this.hintType = 'info';
1145
+ }
1146
+ }
1147
+ CuiHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1148
+ CuiHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
1149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintComponent, decorators: [{
1150
+ type: Component,
1151
+ 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"] }]
1152
+ }], propDecorators: { hintType: [{
1153
+ type: Input
1154
+ }, {
1155
+ type: HostBinding,
1156
+ args: ['attr.data-hint-type']
1157
1157
  }] } });
1158
1158
 
1159
- class CuiHintModule {
1160
- }
1161
- CuiHintModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1162
- CuiHintModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiHintModule, declarations: [CuiHintComponent], exports: [CuiHintComponent] });
1163
- CuiHintModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintModule });
1164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintModule, decorators: [{
1165
- type: NgModule,
1166
- args: [{
1167
- declarations: [CuiHintComponent],
1168
- exports: [CuiHintComponent]
1169
- }]
1159
+ class CuiHintModule {
1160
+ }
1161
+ CuiHintModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1162
+ CuiHintModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiHintModule, declarations: [CuiHintComponent], exports: [CuiHintComponent] });
1163
+ CuiHintModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintModule });
1164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiHintModule, decorators: [{
1165
+ type: NgModule,
1166
+ args: [{
1167
+ declarations: [CuiHintComponent],
1168
+ exports: [CuiHintComponent]
1169
+ }]
1170
1170
  }] });
1171
1171
 
1172
- class CuiIconButtonComponent {
1173
- constructor() {
1174
- this.ICON_WIDTH = 16;
1175
- this.ICON_HEIGHT = 16;
1176
- this.ICON_STROKE_WIDTH = 1.5;
1177
- }
1178
- get isWithHoverColor() {
1179
- return !!this.hoverColor;
1180
- }
1181
- }
1182
- CuiIconButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1183
- CuiIconButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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\r\n [icon]=\"icon\"\r\n [width]=\"ICON_WIDTH\"\r\n [height]=\"ICON_HEIGHT\"\r\n [color]=\"color\"\r\n [strokeWidth]=\"ICON_STROKE_WIDTH\"\r\n class=\"c-icon\"\r\n></cui-svg>\r\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 });
1184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonComponent, decorators: [{
1185
- type: Component,
1186
- args: [{ selector: 'button[cuiIconButton][icon], a[cuiIconButton][icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cui-svg\r\n [icon]=\"icon\"\r\n [width]=\"ICON_WIDTH\"\r\n [height]=\"ICON_HEIGHT\"\r\n [color]=\"color\"\r\n [strokeWidth]=\"ICON_STROKE_WIDTH\"\r\n class=\"c-icon\"\r\n></cui-svg>\r\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"] }]
1187
- }], propDecorators: { icon: [{
1188
- type: Input
1189
- }], color: [{
1190
- type: Input
1191
- }], hoverColor: [{
1192
- type: Input
1193
- }, {
1194
- type: HostBinding,
1195
- args: ['style.--icon-hover-color']
1196
- }], isWithHoverColor: [{
1197
- type: HostBinding,
1198
- args: ['class._with-hover-color']
1172
+ class CuiIconButtonComponent {
1173
+ constructor() {
1174
+ this.ICON_WIDTH = 16;
1175
+ this.ICON_HEIGHT = 16;
1176
+ this.ICON_STROKE_WIDTH = 1.5;
1177
+ }
1178
+ get isWithHoverColor() {
1179
+ return !!this.hoverColor;
1180
+ }
1181
+ }
1182
+ CuiIconButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1183
+ CuiIconButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
1184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonComponent, decorators: [{
1185
+ type: Component,
1186
+ 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"] }]
1187
+ }], propDecorators: { icon: [{
1188
+ type: Input
1189
+ }], color: [{
1190
+ type: Input
1191
+ }], hoverColor: [{
1192
+ type: Input
1193
+ }, {
1194
+ type: HostBinding,
1195
+ args: ['style.--icon-hover-color']
1196
+ }], isWithHoverColor: [{
1197
+ type: HostBinding,
1198
+ args: ['class._with-hover-color']
1199
1199
  }] } });
1200
1200
 
1201
- class CuiIconButtonModule {
1202
- }
1203
- CuiIconButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1204
- CuiIconButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonModule, declarations: [CuiIconButtonComponent], imports: [CommonModule,
1205
- CuiSvgModule], exports: [CuiIconButtonComponent] });
1206
- CuiIconButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonModule, imports: [CommonModule,
1207
- CuiSvgModule] });
1208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonModule, decorators: [{
1209
- type: NgModule,
1210
- args: [{
1211
- imports: [
1212
- CommonModule,
1213
- CuiSvgModule
1214
- ],
1215
- declarations: [CuiIconButtonComponent],
1216
- exports: [CuiIconButtonComponent]
1217
- }]
1201
+ class CuiIconButtonModule {
1202
+ }
1203
+ CuiIconButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1204
+ CuiIconButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonModule, declarations: [CuiIconButtonComponent], imports: [CommonModule,
1205
+ CuiSvgModule], exports: [CuiIconButtonComponent] });
1206
+ CuiIconButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonModule, imports: [CommonModule,
1207
+ CuiSvgModule] });
1208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiIconButtonModule, decorators: [{
1209
+ type: NgModule,
1210
+ args: [{
1211
+ imports: [
1212
+ CommonModule,
1213
+ CuiSvgModule
1214
+ ],
1215
+ declarations: [CuiIconButtonComponent],
1216
+ exports: [CuiIconButtonComponent]
1217
+ }]
1218
1218
  }] });
1219
1219
 
1220
- const CUI_INPUT_NUMBER_DEFAULT_OPTIONS = {
1221
- min: -Infinity,
1222
- max: Infinity,
1223
- step: 1,
1224
- precision: 3
1225
- };
1226
- const CUI_INPUT_NUMBER_OPTIONS = new InjectionToken('', {
1227
- factory: () => CUI_INPUT_NUMBER_DEFAULT_OPTIONS
1220
+ const CUI_INPUT_NUMBER_DEFAULT_OPTIONS = {
1221
+ min: -Infinity,
1222
+ max: Infinity,
1223
+ step: 1,
1224
+ precision: 3
1225
+ };
1226
+ const CUI_INPUT_NUMBER_OPTIONS = new InjectionToken('', {
1227
+ factory: () => CUI_INPUT_NUMBER_DEFAULT_OPTIONS
1228
1228
  });
1229
1229
 
1230
- function cuiRemoveSpaces(value) {
1231
- return value.replace(/\s+/g, '');
1232
- }
1233
-
1234
- function cuiReplace(value, search, replace) {
1235
- const regex = new RegExp(search.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g');
1236
- return value.replace(regex, replace);
1237
- }
1238
-
1239
- class CuiTextFieldController {
1240
- constructor(iconLeftDirective, idDirective, isErrorDirective, placeholderDirective, sizeDirective) {
1241
- this.iconLeftDirective = iconLeftDirective;
1242
- this.idDirective = idDirective;
1243
- this.isErrorDirective = isErrorDirective;
1244
- this.placeholderDirective = placeholderDirective;
1245
- this.sizeDirective = sizeDirective;
1246
- }
1247
- get iconLeft() {
1248
- return this.iconLeftDirective.iconLeft;
1249
- }
1250
- get id() {
1251
- return this.idDirective.id;
1252
- }
1253
- get isError() {
1254
- return this.isErrorDirective.isError;
1255
- }
1256
- get placeholder() {
1257
- return this.placeholderDirective.placeholder;
1258
- }
1259
- get size() {
1260
- return this.sizeDirective.size;
1261
- }
1262
- }
1263
-
1264
- const CUI_TEXT_FIELD_ICON_LEFT = new InjectionToken('', {
1265
- factory: () => new CuiTextFieldIconLeftDirective()
1266
- });
1267
- class CuiTextFieldIconLeftDirective {
1268
- }
1269
- CuiTextFieldIconLeftDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIconLeftDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1270
- CuiTextFieldIconLeftDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldIconLeftDirective, selector: "[cuiTextFieldIconLeft]", inputs: { iconLeft: ["cuiTextFieldIconLeft", "iconLeft"] }, providers: [cuiProvide(CUI_TEXT_FIELD_ICON_LEFT, CuiTextFieldIconLeftDirective)], ngImport: i0 });
1271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIconLeftDirective, decorators: [{
1272
- type: Directive,
1273
- args: [{
1274
- selector: '[cuiTextFieldIconLeft]',
1275
- providers: [cuiProvide(CUI_TEXT_FIELD_ICON_LEFT, CuiTextFieldIconLeftDirective)]
1276
- }]
1277
- }], propDecorators: { iconLeft: [{
1278
- type: Input,
1279
- args: ['cuiTextFieldIconLeft']
1230
+ function cuiRemoveSpaces(value) {
1231
+ return value.replace(/\s+/g, '');
1232
+ }
1233
+
1234
+ function cuiReplace(value, search, replace) {
1235
+ const regex = new RegExp(search.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g');
1236
+ return value.replace(regex, replace);
1237
+ }
1238
+
1239
+ class CuiTextFieldController {
1240
+ constructor(iconLeftDirective, idDirective, isErrorDirective, placeholderDirective, sizeDirective) {
1241
+ this.iconLeftDirective = iconLeftDirective;
1242
+ this.idDirective = idDirective;
1243
+ this.isErrorDirective = isErrorDirective;
1244
+ this.placeholderDirective = placeholderDirective;
1245
+ this.sizeDirective = sizeDirective;
1246
+ }
1247
+ get iconLeft() {
1248
+ return this.iconLeftDirective.iconLeft;
1249
+ }
1250
+ get id() {
1251
+ return this.idDirective.id;
1252
+ }
1253
+ get isError() {
1254
+ return this.isErrorDirective.isError;
1255
+ }
1256
+ get placeholder() {
1257
+ return this.placeholderDirective.placeholder;
1258
+ }
1259
+ get size() {
1260
+ return this.sizeDirective.size;
1261
+ }
1262
+ }
1263
+
1264
+ const CUI_TEXT_FIELD_ICON_LEFT = new InjectionToken('', {
1265
+ factory: () => new CuiTextFieldIconLeftDirective()
1266
+ });
1267
+ class CuiTextFieldIconLeftDirective {
1268
+ }
1269
+ CuiTextFieldIconLeftDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIconLeftDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1270
+ CuiTextFieldIconLeftDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldIconLeftDirective, selector: "[cuiTextFieldIconLeft]", inputs: { iconLeft: ["cuiTextFieldIconLeft", "iconLeft"] }, providers: [cuiProvide(CUI_TEXT_FIELD_ICON_LEFT, CuiTextFieldIconLeftDirective)], ngImport: i0 });
1271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIconLeftDirective, decorators: [{
1272
+ type: Directive,
1273
+ args: [{
1274
+ selector: '[cuiTextFieldIconLeft]',
1275
+ providers: [cuiProvide(CUI_TEXT_FIELD_ICON_LEFT, CuiTextFieldIconLeftDirective)]
1276
+ }]
1277
+ }], propDecorators: { iconLeft: [{
1278
+ type: Input,
1279
+ args: ['cuiTextFieldIconLeft']
1280
1280
  }] } });
1281
1281
 
1282
- const CUI_TEXT_FIELD_ID = new InjectionToken('', {
1283
- factory: () => new CuiTextFieldIdDirective()
1284
- });
1285
- class CuiTextFieldIdDirective {
1286
- }
1287
- CuiTextFieldIdDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIdDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1288
- CuiTextFieldIdDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldIdDirective, selector: "[cuiTextFieldId]", inputs: { id: ["cuiTextFieldId", "id"] }, providers: [cuiProvide(CUI_TEXT_FIELD_ID, CuiTextFieldIdDirective)], ngImport: i0 });
1289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIdDirective, decorators: [{
1290
- type: Directive,
1291
- args: [{
1292
- selector: '[cuiTextFieldId]',
1293
- providers: [cuiProvide(CUI_TEXT_FIELD_ID, CuiTextFieldIdDirective)]
1294
- }]
1295
- }], propDecorators: { id: [{
1296
- type: Input,
1297
- args: ['cuiTextFieldId']
1282
+ const CUI_TEXT_FIELD_ID = new InjectionToken('', {
1283
+ factory: () => new CuiTextFieldIdDirective()
1284
+ });
1285
+ class CuiTextFieldIdDirective {
1286
+ }
1287
+ CuiTextFieldIdDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIdDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1288
+ CuiTextFieldIdDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldIdDirective, selector: "[cuiTextFieldId]", inputs: { id: ["cuiTextFieldId", "id"] }, providers: [cuiProvide(CUI_TEXT_FIELD_ID, CuiTextFieldIdDirective)], ngImport: i0 });
1289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIdDirective, decorators: [{
1290
+ type: Directive,
1291
+ args: [{
1292
+ selector: '[cuiTextFieldId]',
1293
+ providers: [cuiProvide(CUI_TEXT_FIELD_ID, CuiTextFieldIdDirective)]
1294
+ }]
1295
+ }], propDecorators: { id: [{
1296
+ type: Input,
1297
+ args: ['cuiTextFieldId']
1298
1298
  }] } });
1299
1299
 
1300
- const CUI_TEXT_FIELD_IS_ERROR = new InjectionToken('', {
1301
- factory: () => new CuiTextFieldIsErrorDirective()
1302
- });
1303
- class CuiTextFieldIsErrorDirective {
1304
- constructor() {
1305
- this.isError = false;
1306
- }
1307
- }
1308
- CuiTextFieldIsErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIsErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1309
- CuiTextFieldIsErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldIsErrorDirective, selector: "[cuiTextFieldIsError]", inputs: { isError: ["cuiTextFieldIsError", "isError"] }, providers: [cuiProvide(CUI_TEXT_FIELD_IS_ERROR, CuiTextFieldIsErrorDirective)], ngImport: i0 });
1310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIsErrorDirective, decorators: [{
1311
- type: Directive,
1312
- args: [{
1313
- selector: '[cuiTextFieldIsError]',
1314
- providers: [cuiProvide(CUI_TEXT_FIELD_IS_ERROR, CuiTextFieldIsErrorDirective)]
1315
- }]
1316
- }], propDecorators: { isError: [{
1317
- type: Input,
1318
- args: ['cuiTextFieldIsError']
1300
+ const CUI_TEXT_FIELD_IS_ERROR = new InjectionToken('', {
1301
+ factory: () => new CuiTextFieldIsErrorDirective()
1302
+ });
1303
+ class CuiTextFieldIsErrorDirective {
1304
+ constructor() {
1305
+ this.isError = false;
1306
+ }
1307
+ }
1308
+ CuiTextFieldIsErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIsErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1309
+ CuiTextFieldIsErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldIsErrorDirective, selector: "[cuiTextFieldIsError]", inputs: { isError: ["cuiTextFieldIsError", "isError"] }, providers: [cuiProvide(CUI_TEXT_FIELD_IS_ERROR, CuiTextFieldIsErrorDirective)], ngImport: i0 });
1310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldIsErrorDirective, decorators: [{
1311
+ type: Directive,
1312
+ args: [{
1313
+ selector: '[cuiTextFieldIsError]',
1314
+ providers: [cuiProvide(CUI_TEXT_FIELD_IS_ERROR, CuiTextFieldIsErrorDirective)]
1315
+ }]
1316
+ }], propDecorators: { isError: [{
1317
+ type: Input,
1318
+ args: ['cuiTextFieldIsError']
1319
1319
  }] } });
1320
1320
 
1321
- const CUI_TEXT_FIELD_PLACEHOLDER = new InjectionToken('', {
1322
- factory: () => new CuiTextFieldPlaceholderDirective()
1323
- });
1324
- class CuiTextFieldPlaceholderDirective {
1325
- }
1326
- CuiTextFieldPlaceholderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldPlaceholderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1327
- CuiTextFieldPlaceholderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldPlaceholderDirective, selector: "[cuiTextFieldPlaceholder]", inputs: { placeholder: ["cuiTextFieldPlaceholder", "placeholder"] }, providers: [cuiProvide(CUI_TEXT_FIELD_PLACEHOLDER, CuiTextFieldPlaceholderDirective)], ngImport: i0 });
1328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldPlaceholderDirective, decorators: [{
1329
- type: Directive,
1330
- args: [{
1331
- selector: '[cuiTextFieldPlaceholder]',
1332
- providers: [cuiProvide(CUI_TEXT_FIELD_PLACEHOLDER, CuiTextFieldPlaceholderDirective)]
1333
- }]
1334
- }], propDecorators: { placeholder: [{
1335
- type: Input,
1336
- args: ['cuiTextFieldPlaceholder']
1321
+ const CUI_TEXT_FIELD_PLACEHOLDER = new InjectionToken('', {
1322
+ factory: () => new CuiTextFieldPlaceholderDirective()
1323
+ });
1324
+ class CuiTextFieldPlaceholderDirective {
1325
+ }
1326
+ CuiTextFieldPlaceholderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldPlaceholderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1327
+ CuiTextFieldPlaceholderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldPlaceholderDirective, selector: "[cuiTextFieldPlaceholder]", inputs: { placeholder: ["cuiTextFieldPlaceholder", "placeholder"] }, providers: [cuiProvide(CUI_TEXT_FIELD_PLACEHOLDER, CuiTextFieldPlaceholderDirective)], ngImport: i0 });
1328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldPlaceholderDirective, decorators: [{
1329
+ type: Directive,
1330
+ args: [{
1331
+ selector: '[cuiTextFieldPlaceholder]',
1332
+ providers: [cuiProvide(CUI_TEXT_FIELD_PLACEHOLDER, CuiTextFieldPlaceholderDirective)]
1333
+ }]
1334
+ }], propDecorators: { placeholder: [{
1335
+ type: Input,
1336
+ args: ['cuiTextFieldPlaceholder']
1337
1337
  }] } });
1338
1338
 
1339
- const CUI_TEXT_FIELD_SIZE = new InjectionToken('', {
1340
- factory: () => new CuiTextFieldSizeDirective()
1341
- });
1342
- class CuiTextFieldSizeDirective {
1343
- constructor() {
1344
- this.size = 'sm';
1345
- }
1346
- }
1347
- CuiTextFieldSizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1348
- CuiTextFieldSizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldSizeDirective, selector: "[cuiTextFieldSize]", inputs: { size: ["cuiTextFieldSize", "size"] }, providers: [cuiProvide(CUI_TEXT_FIELD_SIZE, CuiTextFieldSizeDirective)], ngImport: i0 });
1349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldSizeDirective, decorators: [{
1350
- type: Directive,
1351
- args: [{
1352
- selector: '[cuiTextFieldSize]',
1353
- providers: [cuiProvide(CUI_TEXT_FIELD_SIZE, CuiTextFieldSizeDirective)]
1354
- }]
1355
- }], propDecorators: { size: [{
1356
- type: Input,
1357
- args: ['cuiTextFieldSize']
1339
+ const CUI_TEXT_FIELD_SIZE = new InjectionToken('', {
1340
+ factory: () => new CuiTextFieldSizeDirective()
1341
+ });
1342
+ class CuiTextFieldSizeDirective {
1343
+ constructor() {
1344
+ this.size = 'sm';
1345
+ }
1346
+ }
1347
+ CuiTextFieldSizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1348
+ CuiTextFieldSizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiTextFieldSizeDirective, selector: "[cuiTextFieldSize]", inputs: { size: ["cuiTextFieldSize", "size"] }, providers: [cuiProvide(CUI_TEXT_FIELD_SIZE, CuiTextFieldSizeDirective)], ngImport: i0 });
1349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldSizeDirective, decorators: [{
1350
+ type: Directive,
1351
+ args: [{
1352
+ selector: '[cuiTextFieldSize]',
1353
+ providers: [cuiProvide(CUI_TEXT_FIELD_SIZE, CuiTextFieldSizeDirective)]
1354
+ }]
1355
+ }], propDecorators: { size: [{
1356
+ type: Input,
1357
+ args: ['cuiTextFieldSize']
1358
1358
  }] } });
1359
1359
 
1360
- class CuiTextFieldControllerModule {
1361
- }
1362
- CuiTextFieldControllerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1363
- CuiTextFieldControllerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule, declarations: [CuiTextFieldIconLeftDirective,
1364
- CuiTextFieldIdDirective,
1365
- CuiTextFieldPlaceholderDirective,
1366
- CuiTextFieldIsErrorDirective,
1367
- CuiTextFieldSizeDirective], exports: [CuiTextFieldIconLeftDirective,
1368
- CuiTextFieldIdDirective,
1369
- CuiTextFieldPlaceholderDirective,
1370
- CuiTextFieldIsErrorDirective,
1371
- CuiTextFieldSizeDirective] });
1372
- CuiTextFieldControllerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule });
1373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule, decorators: [{
1374
- type: NgModule,
1375
- args: [{
1376
- declarations: [
1377
- CuiTextFieldIconLeftDirective,
1378
- CuiTextFieldIdDirective,
1379
- CuiTextFieldPlaceholderDirective,
1380
- CuiTextFieldIsErrorDirective,
1381
- CuiTextFieldSizeDirective
1382
- ],
1383
- exports: [
1384
- CuiTextFieldIconLeftDirective,
1385
- CuiTextFieldIdDirective,
1386
- CuiTextFieldPlaceholderDirective,
1387
- CuiTextFieldIsErrorDirective,
1388
- CuiTextFieldSizeDirective
1389
- ]
1390
- }]
1360
+ class CuiTextFieldControllerModule {
1361
+ }
1362
+ CuiTextFieldControllerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1363
+ CuiTextFieldControllerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule, declarations: [CuiTextFieldIconLeftDirective,
1364
+ CuiTextFieldIdDirective,
1365
+ CuiTextFieldPlaceholderDirective,
1366
+ CuiTextFieldIsErrorDirective,
1367
+ CuiTextFieldSizeDirective], exports: [CuiTextFieldIconLeftDirective,
1368
+ CuiTextFieldIdDirective,
1369
+ CuiTextFieldPlaceholderDirective,
1370
+ CuiTextFieldIsErrorDirective,
1371
+ CuiTextFieldSizeDirective] });
1372
+ CuiTextFieldControllerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule });
1373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextFieldControllerModule, decorators: [{
1374
+ type: NgModule,
1375
+ args: [{
1376
+ declarations: [
1377
+ CuiTextFieldIconLeftDirective,
1378
+ CuiTextFieldIdDirective,
1379
+ CuiTextFieldPlaceholderDirective,
1380
+ CuiTextFieldIsErrorDirective,
1381
+ CuiTextFieldSizeDirective
1382
+ ],
1383
+ exports: [
1384
+ CuiTextFieldIconLeftDirective,
1385
+ CuiTextFieldIdDirective,
1386
+ CuiTextFieldPlaceholderDirective,
1387
+ CuiTextFieldIsErrorDirective,
1388
+ CuiTextFieldSizeDirective
1389
+ ]
1390
+ }]
1391
1391
  }] });
1392
1392
 
1393
- const CUI_TEXT_FIELD_CONTROLLER = new InjectionToken('');
1394
- const CUI_TEXT_FILED_CONTROLLER_PROVIDER = [
1395
- {
1396
- provide: CUI_TEXT_FIELD_CONTROLLER,
1397
- useFactory: (...controllers) => {
1398
- return new CuiTextFieldController(...controllers);
1399
- },
1400
- deps: [
1401
- CUI_TEXT_FIELD_ICON_LEFT,
1402
- CUI_TEXT_FIELD_ID,
1403
- CUI_TEXT_FIELD_IS_ERROR,
1404
- CUI_TEXT_FIELD_PLACEHOLDER,
1405
- CUI_TEXT_FIELD_SIZE
1406
- ]
1407
- }
1393
+ const CUI_TEXT_FIELD_CONTROLLER = new InjectionToken('');
1394
+ const CUI_TEXT_FILED_CONTROLLER_PROVIDER = [
1395
+ {
1396
+ provide: CUI_TEXT_FIELD_CONTROLLER,
1397
+ useFactory: (...controllers) => {
1398
+ return new CuiTextFieldController(...controllers);
1399
+ },
1400
+ deps: [
1401
+ CUI_TEXT_FIELD_ICON_LEFT,
1402
+ CUI_TEXT_FIELD_ID,
1403
+ CUI_TEXT_FIELD_IS_ERROR,
1404
+ CUI_TEXT_FIELD_PLACEHOLDER,
1405
+ CUI_TEXT_FIELD_SIZE
1406
+ ]
1407
+ }
1408
1408
  ];
1409
1409
 
1410
- class CuiInputNumberComponent {
1411
- constructor() {
1412
- this.changeDetectorRef = inject(ChangeDetectorRef);
1413
- this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
1414
- this.cuiInputNumberOptions = inject(CUI_INPUT_NUMBER_OPTIONS);
1415
- this.MIN_JS_NUMBER = -(Math.pow(2, 53));
1416
- this.MAX_JS_NUMBER = Math.pow(2, 53);
1417
- this.INPUT_VALUE_REGEX = /^-?[\d\s]*(,\d*)?$/;
1418
- this.INTERVAL_BETWEEN_SPACES = 3;
1419
- this.formattedValue = '';
1420
- this._min = this.calculateValidMinValue(this.cuiInputNumberOptions.min);
1421
- this._max = this.calculateValidMaxValue(this.cuiInputNumberOptions.max);
1422
- this.step = this.cuiInputNumberOptions.step;
1423
- this.precision = this.cuiInputNumberOptions.precision;
1424
- }
1425
- set min(min) {
1426
- this._min = this.calculateValidMinValue(min);
1427
- }
1428
- set max(max) {
1429
- this._max = this.calculateValidMaxValue(max);
1430
- }
1431
- get id() {
1432
- return this.cuiTextFieldController.id;
1433
- }
1434
- get placeholder() {
1435
- return this.cuiTextFieldController.placeholder;
1436
- }
1437
- get iconLeft() {
1438
- return this.cuiTextFieldController.iconLeft;
1439
- }
1440
- get size() {
1441
- return this.cuiTextFieldController.size;
1442
- }
1443
- get isError() {
1444
- return this.cuiTextFieldController.isError;
1445
- }
1446
- writeValue(value) {
1447
- var _a;
1448
- this.value = (_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : null;
1449
- this.formattedValue = this.formatValue(this.value);
1450
- this.changeDetectorRef.markForCheck();
1451
- }
1452
- registerOnChange(fn) {
1453
- this.onChange = fn;
1454
- }
1455
- registerOnTouched(fn) {
1456
- this.onTouched = fn;
1457
- }
1458
- setDisabledState(isDisabled) {
1459
- this.isDisabled = isDisabled;
1460
- this.changeDetectorRef.markForCheck();
1461
- }
1462
- onInput(event) {
1463
- var _a;
1464
- const eventTarget = event.target;
1465
- const targetValue = eventTarget.value;
1466
- const selectionStart = (_a = this.input.nativeElement.selectionStart) !== null && _a !== void 0 ? _a : 0;
1467
- const previousFormattedValue = this.formattedValue;
1468
- if (this.isInputValueCorrect(targetValue)) {
1469
- const parsedValue = this.parseValue(targetValue);
1470
- this.changeModel(parsedValue);
1471
- }
1472
- this.formattedValue = this.formatValue(this.value);
1473
- eventTarget.value = this.formattedValue;
1474
- const currentCaretPosition = selectionStart
1475
- + (this.formattedValue.length - previousFormattedValue.length === 2 ? 1 : 0);
1476
- this.input.nativeElement.setSelectionRange(currentCaretPosition, currentCaretPosition);
1477
- }
1478
- onArrowUp() {
1479
- this.increaseByStep();
1480
- }
1481
- onArrowDown() {
1482
- this.decreaseByStep();
1483
- }
1484
- onFocus() {
1485
- this.input.nativeElement.focus();
1486
- }
1487
- isInputValueCorrect(inputValue) {
1488
- return this.INPUT_VALUE_REGEX.test(inputValue) && this.isInputValueValid(inputValue);
1489
- }
1490
- isInputValueValid(inputValue) {
1491
- const [, fractionPart = ''] = inputValue.split(',');
1492
- return this.isNumberValid(inputValue) && this.isPrecisionCountCorrect(fractionPart);
1493
- }
1494
- isNumberValid(inputValue) {
1495
- if (inputValue === '-' && this._min > 0) {
1496
- return false;
1497
- }
1498
- if (inputValue === ',' || inputValue === '-' || inputValue === '-,' || inputValue === '') {
1499
- return true;
1500
- }
1501
- const convertedValue = +cuiReplace(cuiRemoveSpaces(inputValue), ',', '.');
1502
- return convertedValue <= this._max && convertedValue >= this._min;
1503
- }
1504
- isPrecisionCountCorrect(fractionPart = '') {
1505
- return fractionPart.length <= this.precision;
1506
- }
1507
- parseValue(inputValue) {
1508
- const valueWithoutSpaces = cuiRemoveSpaces(inputValue);
1509
- switch (valueWithoutSpaces) {
1510
- case ',':
1511
- return '0.';
1512
- case '-,':
1513
- return '-0.';
1514
- default:
1515
- return cuiReplace(valueWithoutSpaces, ',', '.');
1516
- }
1517
- }
1518
- formatValue(value) {
1519
- if (!value) {
1520
- return '';
1521
- }
1522
- const [integerPart, fractionPart] = value.split('.');
1523
- let formattedInteger = this.insertSpacesWithInterval(integerPart) || '0';
1524
- if (fractionPart !== undefined && integerPart.startsWith('-') && !formattedInteger.slice(1)) {
1525
- formattedInteger = '-0';
1526
- }
1527
- return fractionPart !== undefined ? `${formattedInteger},${fractionPart}` : formattedInteger;
1528
- }
1529
- insertSpacesWithInterval(value) {
1530
- const regex = new RegExp(`\\B(?=(\\d{${this.INTERVAL_BETWEEN_SPACES}})+(?!\\d))`, 'g');
1531
- return value.replace(regex, ' ');
1532
- }
1533
- changeModel(value) {
1534
- this.value = value;
1535
- this.onChange(value === '-' ? 0 : +value);
1536
- }
1537
- increaseByStep() {
1538
- const value = this.value === '-'
1539
- ? this.step
1540
- : (+(Number(this.value) + this.step).toFixed(this.precision));
1541
- if (value > this._max) {
1542
- return;
1543
- }
1544
- const convertedValue = value.toString();
1545
- this.formattedValue = this.formatValue(convertedValue);
1546
- this.changeModel(convertedValue);
1547
- }
1548
- decreaseByStep() {
1549
- const value = this.value === '-'
1550
- ? -this.step
1551
- : (+(Number(this.value) - this.step).toFixed(this.precision));
1552
- if (value < this._min) {
1553
- return;
1554
- }
1555
- const convertedValue = value.toString();
1556
- this.formattedValue = this.formatValue(convertedValue);
1557
- this.changeModel(convertedValue);
1558
- }
1559
- calculateValidMinValue(initialValue) {
1560
- return initialValue >= this.MIN_JS_NUMBER
1561
- ? initialValue
1562
- : this.MIN_JS_NUMBER;
1563
- }
1564
- calculateValidMaxValue(initialValue) {
1565
- return initialValue <= this.MAX_JS_NUMBER
1566
- ? initialValue
1567
- : this.MAX_JS_NUMBER;
1568
- }
1569
- }
1570
- CuiInputNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1571
- CuiInputNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputNumberComponent, selector: "cui-input-number", inputs: { step: "step", 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: [
1572
- CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1573
- cuiProvide(NG_VALUE_ACCESSOR, CuiInputNumberComponent, true),
1574
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<cui-svg\r\n *ngIf=\"iconLeft\"\r\n [icon]=\"iconLeft\"\r\n color=\"var(--cui-base-500)\"\r\n></cui-svg>\r\n<input\r\n #input\r\n [ngModel]=\"formattedValue\"\r\n [attr.id]=\"id\"\r\n [attr.placeholder]=\"placeholder\"\r\n type=\"text\"\r\n [disabled]=\"isDisabled\"\r\n class=\"c-input\"\r\n (input)=\"onInput($event)\"\r\n (focus)=\"onTouched()\"\r\n (keydown.arrowUp)=\"onArrowUp()\"\r\n (keydown.arrowDown)=\"onArrowDown()\"\r\n>\r\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$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.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 });
1575
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberComponent, decorators: [{
1576
- type: Component,
1577
- args: [{ selector: 'cui-input-number', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1578
- CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1579
- cuiProvide(NG_VALUE_ACCESSOR, CuiInputNumberComponent, true),
1580
- ], template: "<cui-svg\r\n *ngIf=\"iconLeft\"\r\n [icon]=\"iconLeft\"\r\n color=\"var(--cui-base-500)\"\r\n></cui-svg>\r\n<input\r\n #input\r\n [ngModel]=\"formattedValue\"\r\n [attr.id]=\"id\"\r\n [attr.placeholder]=\"placeholder\"\r\n type=\"text\"\r\n [disabled]=\"isDisabled\"\r\n class=\"c-input\"\r\n (input)=\"onInput($event)\"\r\n (focus)=\"onTouched()\"\r\n (keydown.arrowUp)=\"onArrowUp()\"\r\n (keydown.arrowDown)=\"onArrowDown()\"\r\n>\r\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"] }]
1581
- }], propDecorators: { step: [{
1582
- type: Input
1583
- }], precision: [{
1584
- type: Input
1585
- }], min: [{
1586
- type: Input
1587
- }], max: [{
1588
- type: Input
1589
- }], isDisabled: [{
1590
- type: HostBinding,
1591
- args: ['class._disabled']
1592
- }], input: [{
1593
- type: ViewChild,
1594
- args: ['input']
1595
- }], size: [{
1596
- type: HostBinding,
1597
- args: ['attr.data-size']
1598
- }], isError: [{
1599
- type: HostBinding,
1600
- args: ['class._with-error']
1601
- }], onFocus: [{
1602
- type: HostListener,
1603
- args: ['click']
1410
+ class CuiInputNumberComponent {
1411
+ constructor() {
1412
+ this.changeDetectorRef = inject(ChangeDetectorRef);
1413
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
1414
+ this.cuiInputNumberOptions = inject(CUI_INPUT_NUMBER_OPTIONS);
1415
+ this.MIN_JS_NUMBER = -(Math.pow(2, 53));
1416
+ this.MAX_JS_NUMBER = Math.pow(2, 53);
1417
+ this.INPUT_VALUE_REGEX = /^-?[\d\s]*(,\d*)?$/;
1418
+ this.INTERVAL_BETWEEN_SPACES = 3;
1419
+ this.formattedValue = '';
1420
+ this._min = this.calculateValidMinValue(this.cuiInputNumberOptions.min);
1421
+ this._max = this.calculateValidMaxValue(this.cuiInputNumberOptions.max);
1422
+ this.step = this.cuiInputNumberOptions.step;
1423
+ this.precision = this.cuiInputNumberOptions.precision;
1424
+ }
1425
+ set min(min) {
1426
+ this._min = this.calculateValidMinValue(min);
1427
+ }
1428
+ set max(max) {
1429
+ this._max = this.calculateValidMaxValue(max);
1430
+ }
1431
+ get id() {
1432
+ return this.cuiTextFieldController.id;
1433
+ }
1434
+ get placeholder() {
1435
+ return this.cuiTextFieldController.placeholder;
1436
+ }
1437
+ get iconLeft() {
1438
+ return this.cuiTextFieldController.iconLeft;
1439
+ }
1440
+ get size() {
1441
+ return this.cuiTextFieldController.size;
1442
+ }
1443
+ get isError() {
1444
+ return this.cuiTextFieldController.isError;
1445
+ }
1446
+ writeValue(value) {
1447
+ var _a;
1448
+ this.value = (_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : null;
1449
+ this.formattedValue = this.formatValue(this.value);
1450
+ this.changeDetectorRef.markForCheck();
1451
+ }
1452
+ registerOnChange(fn) {
1453
+ this.onChange = fn;
1454
+ }
1455
+ registerOnTouched(fn) {
1456
+ this.onTouched = fn;
1457
+ }
1458
+ setDisabledState(isDisabled) {
1459
+ this.isDisabled = isDisabled;
1460
+ this.changeDetectorRef.markForCheck();
1461
+ }
1462
+ onInput(event) {
1463
+ var _a;
1464
+ const eventTarget = event.target;
1465
+ const targetValue = eventTarget.value;
1466
+ const selectionStart = (_a = this.input.nativeElement.selectionStart) !== null && _a !== void 0 ? _a : 0;
1467
+ const previousFormattedValue = this.formattedValue;
1468
+ if (this.isInputValueCorrect(targetValue)) {
1469
+ const parsedValue = this.parseValue(targetValue);
1470
+ this.changeModel(parsedValue);
1471
+ }
1472
+ this.formattedValue = this.formatValue(this.value);
1473
+ eventTarget.value = this.formattedValue;
1474
+ const currentCaretPosition = selectionStart
1475
+ + (this.formattedValue.length - previousFormattedValue.length === 2 ? 1 : 0);
1476
+ this.input.nativeElement.setSelectionRange(currentCaretPosition, currentCaretPosition);
1477
+ }
1478
+ onArrowUp() {
1479
+ this.increaseByStep();
1480
+ }
1481
+ onArrowDown() {
1482
+ this.decreaseByStep();
1483
+ }
1484
+ onFocus() {
1485
+ this.input.nativeElement.focus();
1486
+ }
1487
+ isInputValueCorrect(inputValue) {
1488
+ return this.INPUT_VALUE_REGEX.test(inputValue) && this.isInputValueValid(inputValue);
1489
+ }
1490
+ isInputValueValid(inputValue) {
1491
+ const [, fractionPart = ''] = inputValue.split(',');
1492
+ return this.isNumberValid(inputValue) && this.isPrecisionCountCorrect(fractionPart);
1493
+ }
1494
+ isNumberValid(inputValue) {
1495
+ if (inputValue === '-' && this._min > 0) {
1496
+ return false;
1497
+ }
1498
+ if (inputValue === ',' || inputValue === '-' || inputValue === '-,' || inputValue === '') {
1499
+ return true;
1500
+ }
1501
+ const convertedValue = +cuiReplace(cuiRemoveSpaces(inputValue), ',', '.');
1502
+ return convertedValue <= this._max && convertedValue >= this._min;
1503
+ }
1504
+ isPrecisionCountCorrect(fractionPart = '') {
1505
+ return fractionPart.length <= this.precision;
1506
+ }
1507
+ parseValue(inputValue) {
1508
+ const valueWithoutSpaces = cuiRemoveSpaces(inputValue);
1509
+ switch (valueWithoutSpaces) {
1510
+ case ',':
1511
+ return '0.';
1512
+ case '-,':
1513
+ return '-0.';
1514
+ default:
1515
+ return cuiReplace(valueWithoutSpaces, ',', '.');
1516
+ }
1517
+ }
1518
+ formatValue(value) {
1519
+ if (!value) {
1520
+ return '';
1521
+ }
1522
+ const [integerPart, fractionPart] = value.split('.');
1523
+ let formattedInteger = this.insertSpacesWithInterval(integerPart) || '0';
1524
+ if (fractionPart !== undefined && integerPart.startsWith('-') && !formattedInteger.slice(1)) {
1525
+ formattedInteger = '-0';
1526
+ }
1527
+ return fractionPart !== undefined ? `${formattedInteger},${fractionPart}` : formattedInteger;
1528
+ }
1529
+ insertSpacesWithInterval(value) {
1530
+ const regex = new RegExp(`\\B(?=(\\d{${this.INTERVAL_BETWEEN_SPACES}})+(?!\\d))`, 'g');
1531
+ return value.replace(regex, ' ');
1532
+ }
1533
+ changeModel(value) {
1534
+ this.value = value;
1535
+ this.onChange(value === '-' ? 0 : +value);
1536
+ }
1537
+ increaseByStep() {
1538
+ const value = this.value === '-'
1539
+ ? this.step
1540
+ : (+(Number(this.value) + this.step).toFixed(this.precision));
1541
+ if (value > this._max) {
1542
+ return;
1543
+ }
1544
+ const convertedValue = value.toString();
1545
+ this.formattedValue = this.formatValue(convertedValue);
1546
+ this.changeModel(convertedValue);
1547
+ }
1548
+ decreaseByStep() {
1549
+ const value = this.value === '-'
1550
+ ? -this.step
1551
+ : (+(Number(this.value) - this.step).toFixed(this.precision));
1552
+ if (value < this._min) {
1553
+ return;
1554
+ }
1555
+ const convertedValue = value.toString();
1556
+ this.formattedValue = this.formatValue(convertedValue);
1557
+ this.changeModel(convertedValue);
1558
+ }
1559
+ calculateValidMinValue(initialValue) {
1560
+ return initialValue >= this.MIN_JS_NUMBER
1561
+ ? initialValue
1562
+ : this.MIN_JS_NUMBER;
1563
+ }
1564
+ calculateValidMaxValue(initialValue) {
1565
+ return initialValue <= this.MAX_JS_NUMBER
1566
+ ? initialValue
1567
+ : this.MAX_JS_NUMBER;
1568
+ }
1569
+ }
1570
+ CuiInputNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1571
+ CuiInputNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputNumberComponent, selector: "cui-input-number", inputs: { step: "step", 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: [
1572
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1573
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputNumberComponent, true),
1574
+ ], 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]=\"formattedValue\"\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 (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.arrowDown)=\"onArrowDown()\"\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$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.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 });
1575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberComponent, decorators: [{
1576
+ type: Component,
1577
+ args: [{ selector: 'cui-input-number', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1578
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1579
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputNumberComponent, true),
1580
+ ], template: "<cui-svg\n *ngIf=\"iconLeft\"\n [icon]=\"iconLeft\"\n color=\"var(--cui-base-500)\"\n></cui-svg>\n<input\n #input\n [ngModel]=\"formattedValue\"\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 (keydown.arrowUp)=\"onArrowUp()\"\n (keydown.arrowDown)=\"onArrowDown()\"\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"] }]
1581
+ }], propDecorators: { step: [{
1582
+ type: Input
1583
+ }], precision: [{
1584
+ type: Input
1585
+ }], min: [{
1586
+ type: Input
1587
+ }], max: [{
1588
+ type: Input
1589
+ }], isDisabled: [{
1590
+ type: HostBinding,
1591
+ args: ['class._disabled']
1592
+ }], input: [{
1593
+ type: ViewChild,
1594
+ args: ['input']
1595
+ }], size: [{
1596
+ type: HostBinding,
1597
+ args: ['attr.data-size']
1598
+ }], isError: [{
1599
+ type: HostBinding,
1600
+ args: ['class._with-error']
1601
+ }], onFocus: [{
1602
+ type: HostListener,
1603
+ args: ['click']
1604
1604
  }] } });
1605
1605
 
1606
- class CuiInputNumberModule {
1607
- }
1608
- CuiInputNumberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1609
- CuiInputNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, declarations: [CuiInputNumberComponent], imports: [CommonModule,
1610
- FormsModule,
1611
- CuiSvgModule], exports: [CuiInputNumberComponent,
1612
- CuiTextFieldControllerModule] });
1613
- CuiInputNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, imports: [CommonModule,
1614
- FormsModule,
1615
- CuiSvgModule, CuiTextFieldControllerModule] });
1616
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, decorators: [{
1617
- type: NgModule,
1618
- args: [{
1619
- imports: [
1620
- CommonModule,
1621
- FormsModule,
1622
- CuiSvgModule
1623
- ],
1624
- declarations: [CuiInputNumberComponent],
1625
- exports: [
1626
- CuiInputNumberComponent,
1627
- CuiTextFieldControllerModule
1628
- ]
1629
- }]
1606
+ class CuiInputNumberModule {
1607
+ }
1608
+ CuiInputNumberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1609
+ CuiInputNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, declarations: [CuiInputNumberComponent], imports: [CommonModule,
1610
+ FormsModule,
1611
+ CuiSvgModule], exports: [CuiInputNumberComponent,
1612
+ CuiTextFieldControllerModule] });
1613
+ CuiInputNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, imports: [CommonModule,
1614
+ FormsModule,
1615
+ CuiSvgModule, CuiTextFieldControllerModule] });
1616
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputNumberModule, decorators: [{
1617
+ type: NgModule,
1618
+ args: [{
1619
+ imports: [
1620
+ CommonModule,
1621
+ FormsModule,
1622
+ CuiSvgModule
1623
+ ],
1624
+ declarations: [CuiInputNumberComponent],
1625
+ exports: [
1626
+ CuiInputNumberComponent,
1627
+ CuiTextFieldControllerModule
1628
+ ]
1629
+ }]
1630
1630
  }] });
1631
1631
 
1632
- class CuiInputPasswordComponent {
1633
- constructor() {
1634
- this.changeDetectorRef = inject(ChangeDetectorRef);
1635
- this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
1636
- this.isPasswordHidden = true;
1637
- }
1638
- get id() {
1639
- return this.cuiTextFieldController.id;
1640
- }
1641
- get placeholder() {
1642
- return this.cuiTextFieldController.placeholder;
1643
- }
1644
- get iconLeft() {
1645
- return this.cuiTextFieldController.iconLeft;
1646
- }
1647
- get isToggleButtonShown() {
1648
- return !this.isDisabled;
1649
- }
1650
- get icon() {
1651
- return this.isPasswordHidden ? 'cuiIconEye' : 'cuiIconEyeOff';
1652
- }
1653
- get type() {
1654
- return this.isPasswordHidden ? 'password' : 'text';
1655
- }
1656
- get buttonTitle() {
1657
- return this.isPasswordHidden ? 'Reveal password' : 'Hide password';
1658
- }
1659
- get size() {
1660
- return this.cuiTextFieldController.size;
1661
- }
1662
- get isError() {
1663
- return this.cuiTextFieldController.isError;
1664
- }
1665
- writeValue(value) {
1666
- this.value = value;
1667
- this.changeDetectorRef.markForCheck();
1668
- }
1669
- registerOnChange(fn) {
1670
- this.onChange = fn;
1671
- }
1672
- registerOnTouched(fn) {
1673
- this.onTouched = fn;
1674
- }
1675
- setDisabledState(isDisabled) {
1676
- this.isDisabled = isDisabled;
1677
- if (this.isDisabled) {
1678
- this.isPasswordHidden = true;
1679
- }
1680
- this.changeDetectorRef.markForCheck();
1681
- }
1682
- onInput({ target }) {
1683
- const value = target.value;
1684
- this.value = value;
1685
- this.onChange(value);
1686
- }
1687
- onTogglePasswordVisibility() {
1688
- this.isPasswordHidden = !this.isPasswordHidden;
1689
- }
1690
- }
1691
- CuiInputPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1692
- CuiInputPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputPasswordComponent, selector: "cui-input-password", host: { properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
1693
- CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1694
- cuiProvide(NG_VALUE_ACCESSOR, CuiInputPasswordComponent, true)
1695
- ], ngImport: i0, template: "<cui-svg\r\n *ngIf=\"iconLeft\"\r\n [icon]=\"iconLeft\"\r\n color=\"var(--cui-base-500)\"\r\n></cui-svg>\r\n<input\r\n [ngModel]=\"value\"\r\n [attr.id]=\"id\"\r\n [attr.placeholder]=\"placeholder\"\r\n [type]=\"type\"\r\n [disabled]=\"isDisabled\"\r\n class=\"c-input\"\r\n (input)=\"onInput($event)\"\r\n (focus)=\"onTouched()\"\r\n>\r\n<button\r\n *ngIf=\"isToggleButtonShown\"\r\n [title]=\"buttonTitle\"\r\n class=\"c-button\"\r\n (click)=\"onTogglePasswordVisibility()\"\r\n>\r\n <cui-svg\r\n [icon]=\"icon\"\r\n [width]=\"16\"\r\n [height]=\"16\"\r\n color=\"var(--cui-base-500)\"\r\n ></cui-svg>\r\n</button>\r\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$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.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 });
1696
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordComponent, decorators: [{
1697
- type: Component,
1698
- args: [{ selector: 'cui-input-password', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1699
- CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1700
- cuiProvide(NG_VALUE_ACCESSOR, CuiInputPasswordComponent, true)
1701
- ], template: "<cui-svg\r\n *ngIf=\"iconLeft\"\r\n [icon]=\"iconLeft\"\r\n color=\"var(--cui-base-500)\"\r\n></cui-svg>\r\n<input\r\n [ngModel]=\"value\"\r\n [attr.id]=\"id\"\r\n [attr.placeholder]=\"placeholder\"\r\n [type]=\"type\"\r\n [disabled]=\"isDisabled\"\r\n class=\"c-input\"\r\n (input)=\"onInput($event)\"\r\n (focus)=\"onTouched()\"\r\n>\r\n<button\r\n *ngIf=\"isToggleButtonShown\"\r\n [title]=\"buttonTitle\"\r\n class=\"c-button\"\r\n (click)=\"onTogglePasswordVisibility()\"\r\n>\r\n <cui-svg\r\n [icon]=\"icon\"\r\n [width]=\"16\"\r\n [height]=\"16\"\r\n color=\"var(--cui-base-500)\"\r\n ></cui-svg>\r\n</button>\r\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"] }]
1702
- }], propDecorators: { isDisabled: [{
1703
- type: HostBinding,
1704
- args: ['class._disabled']
1705
- }], size: [{
1706
- type: HostBinding,
1707
- args: ['attr.data-size']
1708
- }], isError: [{
1709
- type: HostBinding,
1710
- args: ['class._with-error']
1632
+ class CuiInputPasswordComponent {
1633
+ constructor() {
1634
+ this.changeDetectorRef = inject(ChangeDetectorRef);
1635
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
1636
+ this.isPasswordHidden = true;
1637
+ }
1638
+ get id() {
1639
+ return this.cuiTextFieldController.id;
1640
+ }
1641
+ get placeholder() {
1642
+ return this.cuiTextFieldController.placeholder;
1643
+ }
1644
+ get iconLeft() {
1645
+ return this.cuiTextFieldController.iconLeft;
1646
+ }
1647
+ get isToggleButtonShown() {
1648
+ return !this.isDisabled;
1649
+ }
1650
+ get icon() {
1651
+ return this.isPasswordHidden ? 'cuiIconEye' : 'cuiIconEyeOff';
1652
+ }
1653
+ get type() {
1654
+ return this.isPasswordHidden ? 'password' : 'text';
1655
+ }
1656
+ get buttonTitle() {
1657
+ return this.isPasswordHidden ? 'Reveal password' : 'Hide password';
1658
+ }
1659
+ get size() {
1660
+ return this.cuiTextFieldController.size;
1661
+ }
1662
+ get isError() {
1663
+ return this.cuiTextFieldController.isError;
1664
+ }
1665
+ writeValue(value) {
1666
+ this.value = value;
1667
+ this.changeDetectorRef.markForCheck();
1668
+ }
1669
+ registerOnChange(fn) {
1670
+ this.onChange = fn;
1671
+ }
1672
+ registerOnTouched(fn) {
1673
+ this.onTouched = fn;
1674
+ }
1675
+ setDisabledState(isDisabled) {
1676
+ this.isDisabled = isDisabled;
1677
+ if (this.isDisabled) {
1678
+ this.isPasswordHidden = true;
1679
+ }
1680
+ this.changeDetectorRef.markForCheck();
1681
+ }
1682
+ onInput({ target }) {
1683
+ const value = target.value;
1684
+ this.value = value;
1685
+ this.onChange(value);
1686
+ }
1687
+ onTogglePasswordVisibility() {
1688
+ this.isPasswordHidden = !this.isPasswordHidden;
1689
+ }
1690
+ }
1691
+ CuiInputPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1692
+ CuiInputPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiInputPasswordComponent, selector: "cui-input-password", host: { properties: { "class._disabled": "this.isDisabled", "attr.data-size": "this.size", "class._with-error": "this.isError" } }, providers: [
1693
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1694
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputPasswordComponent, true)
1695
+ ], 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$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.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 });
1696
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordComponent, decorators: [{
1697
+ type: Component,
1698
+ args: [{ selector: 'cui-input-password', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1699
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1700
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputPasswordComponent, true)
1701
+ ], 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"] }]
1702
+ }], propDecorators: { isDisabled: [{
1703
+ type: HostBinding,
1704
+ args: ['class._disabled']
1705
+ }], size: [{
1706
+ type: HostBinding,
1707
+ args: ['attr.data-size']
1708
+ }], isError: [{
1709
+ type: HostBinding,
1710
+ args: ['class._with-error']
1711
1711
  }] } });
1712
1712
 
1713
- class CuiInputPasswordModule {
1714
- }
1715
- CuiInputPasswordModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1716
- CuiInputPasswordModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, declarations: [CuiInputPasswordComponent], imports: [CommonModule,
1717
- FormsModule,
1718
- CuiSvgModule], exports: [CuiInputPasswordComponent,
1719
- CuiTextFieldControllerModule] });
1720
- CuiInputPasswordModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, imports: [CommonModule,
1721
- FormsModule,
1722
- CuiSvgModule, CuiTextFieldControllerModule] });
1723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, decorators: [{
1724
- type: NgModule,
1725
- args: [{
1726
- imports: [
1727
- CommonModule,
1728
- FormsModule,
1729
- CuiSvgModule
1730
- ],
1731
- declarations: [CuiInputPasswordComponent],
1732
- exports: [
1733
- CuiInputPasswordComponent,
1734
- CuiTextFieldControllerModule
1735
- ]
1736
- }]
1713
+ class CuiInputPasswordModule {
1714
+ }
1715
+ CuiInputPasswordModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1716
+ CuiInputPasswordModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, declarations: [CuiInputPasswordComponent], imports: [CommonModule,
1717
+ FormsModule,
1718
+ CuiSvgModule], exports: [CuiInputPasswordComponent,
1719
+ CuiTextFieldControllerModule] });
1720
+ CuiInputPasswordModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, imports: [CommonModule,
1721
+ FormsModule,
1722
+ CuiSvgModule, CuiTextFieldControllerModule] });
1723
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputPasswordModule, decorators: [{
1724
+ type: NgModule,
1725
+ args: [{
1726
+ imports: [
1727
+ CommonModule,
1728
+ FormsModule,
1729
+ CuiSvgModule
1730
+ ],
1731
+ declarations: [CuiInputPasswordComponent],
1732
+ exports: [
1733
+ CuiInputPasswordComponent,
1734
+ CuiTextFieldControllerModule
1735
+ ]
1736
+ }]
1737
1737
  }] });
1738
1738
 
1739
- class CuiInputTextComponent {
1740
- constructor() {
1741
- this.changeDetectorRef = inject(ChangeDetectorRef);
1742
- this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
1743
- }
1744
- get id() {
1745
- return this.cuiTextFieldController.id;
1746
- }
1747
- get placeholder() {
1748
- return this.cuiTextFieldController.placeholder;
1749
- }
1750
- get iconLeft() {
1751
- return this.cuiTextFieldController.iconLeft;
1752
- }
1753
- get isClearButtonHidden() {
1754
- return !(this.value && !this.isDisabled);
1755
- }
1756
- get size() {
1757
- return this.cuiTextFieldController.size;
1758
- }
1759
- get isError() {
1760
- return this.cuiTextFieldController.isError;
1761
- }
1762
- writeValue(value) {
1763
- this.value = value;
1764
- this.changeDetectorRef.markForCheck();
1765
- }
1766
- registerOnChange(fn) {
1767
- this.onChange = fn;
1768
- }
1769
- registerOnTouched(fn) {
1770
- this.onTouched = fn;
1771
- }
1772
- setDisabledState(isDisabled) {
1773
- this.isDisabled = isDisabled;
1774
- this.changeDetectorRef.markForCheck();
1775
- }
1776
- onInput({ target }) {
1777
- this.changeModel(target.value);
1778
- }
1779
- onClear() {
1780
- this.changeModel('');
1781
- }
1782
- onFocus() {
1783
- this.input.nativeElement.focus();
1784
- }
1785
- changeModel(value) {
1786
- this.value = value;
1787
- this.onChange(value);
1788
- }
1789
- }
1790
- CuiInputTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1791
- CuiInputTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: [
1792
- CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1793
- cuiProvide(NG_VALUE_ACCESSOR, CuiInputTextComponent, true)
1794
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<cui-svg\r\n *ngIf=\"iconLeft\"\r\n [icon]=\"iconLeft\"\r\n color=\"var(--cui-base-500)\"\r\n></cui-svg>\r\n<input\r\n #input\r\n [ngModel]=\"value\"\r\n [attr.id]=\"id\"\r\n [attr.placeholder]=\"placeholder\"\r\n type=\"text\"\r\n [disabled]=\"isDisabled\"\r\n class=\"c-input\"\r\n (input)=\"onInput($event)\"\r\n (focus)=\"onTouched()\"\r\n>\r\n<button\r\n type=\"button\"\r\n class=\"c-button\"\r\n [class.c-button_hidden]=\"isClearButtonHidden\"\r\n (click)=\"onClear()\"\r\n>\r\n <cui-svg\r\n icon=\"cuiIconClear\"\r\n color=\"var(--cui-base-300)\"\r\n class=\"c-close-icon\"\r\n />\r\n</button>\r\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$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.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 });
1795
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTextComponent, decorators: [{
1796
- type: Component,
1797
- args: [{ selector: 'cui-input-text', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1798
- CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1799
- cuiProvide(NG_VALUE_ACCESSOR, CuiInputTextComponent, true)
1800
- ], template: "<cui-svg\r\n *ngIf=\"iconLeft\"\r\n [icon]=\"iconLeft\"\r\n color=\"var(--cui-base-500)\"\r\n></cui-svg>\r\n<input\r\n #input\r\n [ngModel]=\"value\"\r\n [attr.id]=\"id\"\r\n [attr.placeholder]=\"placeholder\"\r\n type=\"text\"\r\n [disabled]=\"isDisabled\"\r\n class=\"c-input\"\r\n (input)=\"onInput($event)\"\r\n (focus)=\"onTouched()\"\r\n>\r\n<button\r\n type=\"button\"\r\n class=\"c-button\"\r\n [class.c-button_hidden]=\"isClearButtonHidden\"\r\n (click)=\"onClear()\"\r\n>\r\n <cui-svg\r\n icon=\"cuiIconClear\"\r\n color=\"var(--cui-base-300)\"\r\n class=\"c-close-icon\"\r\n />\r\n</button>\r\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"] }]
1801
- }], propDecorators: { isDisabled: [{
1802
- type: HostBinding,
1803
- args: ['class._disabled']
1804
- }], input: [{
1805
- type: ViewChild,
1806
- args: ['input']
1807
- }], size: [{
1808
- type: HostBinding,
1809
- args: ['attr.data-size']
1810
- }], isError: [{
1811
- type: HostBinding,
1812
- args: ['class._with-error']
1813
- }], onFocus: [{
1814
- type: HostListener,
1815
- args: ['click']
1739
+ class CuiInputTextComponent {
1740
+ constructor() {
1741
+ this.changeDetectorRef = inject(ChangeDetectorRef);
1742
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
1743
+ }
1744
+ get id() {
1745
+ return this.cuiTextFieldController.id;
1746
+ }
1747
+ get placeholder() {
1748
+ return this.cuiTextFieldController.placeholder;
1749
+ }
1750
+ get iconLeft() {
1751
+ return this.cuiTextFieldController.iconLeft;
1752
+ }
1753
+ get isClearButtonHidden() {
1754
+ return !(this.value && !this.isDisabled);
1755
+ }
1756
+ get size() {
1757
+ return this.cuiTextFieldController.size;
1758
+ }
1759
+ get isError() {
1760
+ return this.cuiTextFieldController.isError;
1761
+ }
1762
+ writeValue(value) {
1763
+ this.value = value;
1764
+ this.changeDetectorRef.markForCheck();
1765
+ }
1766
+ registerOnChange(fn) {
1767
+ this.onChange = fn;
1768
+ }
1769
+ registerOnTouched(fn) {
1770
+ this.onTouched = fn;
1771
+ }
1772
+ setDisabledState(isDisabled) {
1773
+ this.isDisabled = isDisabled;
1774
+ this.changeDetectorRef.markForCheck();
1775
+ }
1776
+ onInput({ target }) {
1777
+ this.changeModel(target.value);
1778
+ }
1779
+ onClear() {
1780
+ this.changeModel('');
1781
+ }
1782
+ onFocus() {
1783
+ this.input.nativeElement.focus();
1784
+ }
1785
+ changeModel(value) {
1786
+ this.value = value;
1787
+ this.onChange(value);
1788
+ }
1789
+ }
1790
+ CuiInputTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1791
+ CuiInputTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: [
1792
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1793
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputTextComponent, true)
1794
+ ], 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$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.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 });
1795
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputTextComponent, decorators: [{
1796
+ type: Component,
1797
+ args: [{ selector: 'cui-input-text', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1798
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
1799
+ cuiProvide(NG_VALUE_ACCESSOR, CuiInputTextComponent, true)
1800
+ ], 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"] }]
1801
+ }], propDecorators: { isDisabled: [{
1802
+ type: HostBinding,
1803
+ args: ['class._disabled']
1804
+ }], input: [{
1805
+ type: ViewChild,
1806
+ args: ['input']
1807
+ }], size: [{
1808
+ type: HostBinding,
1809
+ args: ['attr.data-size']
1810
+ }], isError: [{
1811
+ type: HostBinding,
1812
+ args: ['class._with-error']
1813
+ }], onFocus: [{
1814
+ type: HostListener,
1815
+ args: ['click']
1816
1816
  }] } });
1817
1817
 
1818
- class CuiInputModule {
1819
- }
1820
- CuiInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1821
- CuiInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, declarations: [CuiInputTextComponent], imports: [CommonModule,
1822
- FormsModule,
1823
- CuiSvgModule], exports: [CuiInputTextComponent,
1824
- CuiTextFieldControllerModule] });
1825
- CuiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, imports: [CommonModule,
1826
- FormsModule,
1827
- CuiSvgModule, CuiTextFieldControllerModule] });
1828
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, decorators: [{
1829
- type: NgModule,
1830
- args: [{
1831
- imports: [
1832
- CommonModule,
1833
- FormsModule,
1834
- CuiSvgModule
1835
- ],
1836
- declarations: [CuiInputTextComponent],
1837
- exports: [
1838
- CuiInputTextComponent,
1839
- CuiTextFieldControllerModule
1840
- ]
1841
- }]
1818
+ class CuiInputModule {
1819
+ }
1820
+ CuiInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1821
+ CuiInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, declarations: [CuiInputTextComponent], imports: [CommonModule,
1822
+ FormsModule,
1823
+ CuiSvgModule], exports: [CuiInputTextComponent,
1824
+ CuiTextFieldControllerModule] });
1825
+ CuiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, imports: [CommonModule,
1826
+ FormsModule,
1827
+ CuiSvgModule, CuiTextFieldControllerModule] });
1828
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiInputModule, decorators: [{
1829
+ type: NgModule,
1830
+ args: [{
1831
+ imports: [
1832
+ CommonModule,
1833
+ FormsModule,
1834
+ CuiSvgModule
1835
+ ],
1836
+ declarations: [CuiInputTextComponent],
1837
+ exports: [
1838
+ CuiInputTextComponent,
1839
+ CuiTextFieldControllerModule
1840
+ ]
1841
+ }]
1842
1842
  }] });
1843
1843
 
1844
- class CuiLabelComponent {
1845
- constructor() {
1846
- this.isRequired = false;
1847
- }
1848
- }
1849
- CuiLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1850
- CuiLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiLabelComponent, selector: "label[cuiLabel]", inputs: { isRequired: "isRequired" }, ngImport: i0, template: "<span class=\"c-wrapper\">\r\n <ng-content></ng-content>\r\n</span>\r\n<span\r\n *ngIf=\"isRequired\"\r\n class=\"c-star\"\r\n>\r\n *\r\n</span>\r\n", styles: [":host{font-weight:500;font-size:14px;line-height:20px;display:inline-flex;gap:2px;cursor:pointer;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 });
1851
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelComponent, decorators: [{
1852
- type: Component,
1853
- args: [{ selector: 'label[cuiLabel]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"c-wrapper\">\r\n <ng-content></ng-content>\r\n</span>\r\n<span\r\n *ngIf=\"isRequired\"\r\n class=\"c-star\"\r\n>\r\n *\r\n</span>\r\n", styles: [":host{font-weight:500;font-size:14px;line-height:20px;display:inline-flex;gap:2px;cursor:pointer;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"] }]
1854
- }], propDecorators: { isRequired: [{
1855
- type: Input
1844
+ class CuiLabelComponent {
1845
+ constructor() {
1846
+ this.isRequired = false;
1847
+ }
1848
+ }
1849
+ CuiLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1850
+ CuiLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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;cursor:pointer;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 });
1851
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelComponent, decorators: [{
1852
+ type: Component,
1853
+ 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;cursor:pointer;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"] }]
1854
+ }], propDecorators: { isRequired: [{
1855
+ type: Input
1856
1856
  }] } });
1857
1857
 
1858
- class CuiLabelModule {
1859
- }
1860
- CuiLabelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1861
- CuiLabelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelModule, declarations: [CuiLabelComponent], imports: [CommonModule], exports: [CuiLabelComponent] });
1862
- CuiLabelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelModule, imports: [CommonModule] });
1863
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelModule, decorators: [{
1864
- type: NgModule,
1865
- args: [{
1866
- imports: [CommonModule],
1867
- declarations: [CuiLabelComponent],
1868
- exports: [CuiLabelComponent]
1869
- }]
1858
+ class CuiLabelModule {
1859
+ }
1860
+ CuiLabelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1861
+ CuiLabelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelModule, declarations: [CuiLabelComponent], imports: [CommonModule], exports: [CuiLabelComponent] });
1862
+ CuiLabelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelModule, imports: [CommonModule] });
1863
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiLabelModule, decorators: [{
1864
+ type: NgModule,
1865
+ args: [{
1866
+ imports: [CommonModule],
1867
+ declarations: [CuiLabelComponent],
1868
+ exports: [CuiLabelComponent]
1869
+ }]
1870
1870
  }] });
1871
1871
 
1872
- class CuiRadioComponent {
1873
- }
1874
- CuiRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1875
- CuiRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
1876
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioComponent, decorators: [{
1877
- type: Component,
1878
- 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"] }]
1872
+ class CuiRadioComponent {
1873
+ }
1874
+ CuiRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1875
+ CuiRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
1876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioComponent, decorators: [{
1877
+ type: Component,
1878
+ 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"] }]
1879
1879
  }] });
1880
1880
 
1881
- class CuiRadioModule {
1882
- }
1883
- CuiRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1884
- CuiRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioModule, declarations: [CuiRadioComponent], exports: [CuiRadioComponent] });
1885
- CuiRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioModule });
1886
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioModule, decorators: [{
1887
- type: NgModule,
1888
- args: [{
1889
- declarations: [CuiRadioComponent],
1890
- exports: [CuiRadioComponent]
1891
- }]
1881
+ class CuiRadioModule {
1882
+ }
1883
+ CuiRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1884
+ CuiRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioModule, declarations: [CuiRadioComponent], exports: [CuiRadioComponent] });
1885
+ CuiRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioModule });
1886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiRadioModule, decorators: [{
1887
+ type: NgModule,
1888
+ args: [{
1889
+ declarations: [CuiRadioComponent],
1890
+ exports: [CuiRadioComponent]
1891
+ }]
1892
1892
  }] });
1893
1893
 
1894
- class CuiSelectComponent {
1895
- constructor() {
1896
- this.element = inject(ElementRef).nativeElement;
1897
- this.document = inject(DOCUMENT);
1898
- this.changeDetectorRef = inject(ChangeDetectorRef);
1899
- this.viewContainerRef = inject(ViewContainerRef);
1900
- this.destroy$ = inject(CuiDestroyService, { self: true });
1901
- this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
1902
- this.cuiClickOutsideDirective = inject(CuiClickOutsideDirective, { self: true });
1903
- this.SPACE_BETWEEN_BUTTON_AND_OPTIONS = 3;
1904
- this.isOpened = false;
1905
- this.isOptionsListAbove = false;
1906
- this.gap = `${this.SPACE_BETWEEN_BUTTON_AND_OPTIONS}px`;
1907
- }
1908
- get id() {
1909
- return this.cuiTextFieldController.id;
1910
- }
1911
- get size() {
1912
- return this.cuiTextFieldController.size;
1913
- }
1914
- get placeholder() {
1915
- return this.cuiTextFieldController.placeholder;
1916
- }
1917
- get isError() {
1918
- return this.cuiTextFieldController.isError;
1919
- }
1920
- trackByFn(_, item) {
1921
- return item.label;
1922
- }
1923
- writeValue(value) {
1924
- var _a;
1925
- this.value = value;
1926
- // TODO: Непонятно, зачем нужно в construction вторая часть выражения
1927
- this.selectedOption = (_a = this.options.find(option => option.value === value)) !== null && _a !== void 0 ? _a : value;
1928
- this.changeDetectorRef.markForCheck();
1929
- }
1930
- registerOnChange(fn) {
1931
- this.onChange = fn;
1932
- }
1933
- registerOnTouched(fn) {
1934
- this.onTouched = fn;
1935
- }
1936
- ngOnInit() {
1937
- this.initClickOutsideSubscription();
1938
- }
1939
- ngOnDestroy() {
1940
- this.clearViewContainerRef();
1941
- }
1942
- setDisabledState(isDisabled) {
1943
- this.isDisabled = isDisabled;
1944
- this.changeDetectorRef.markForCheck();
1945
- }
1946
- onSelect(option) {
1947
- if (option.isDisabled) {
1948
- return;
1949
- }
1950
- this.value = option.value;
1951
- this.selectedOption = option;
1952
- this.onChange(this.value);
1953
- this.onSwitch();
1954
- this.onTouched();
1955
- }
1956
- onSwitch() {
1957
- if (!this.options.length && !this.defaultOptionText) {
1958
- return;
1959
- }
1960
- if (!this.isOpened) {
1961
- this.open();
1962
- return;
1963
- }
1964
- this.close();
1965
- }
1966
- onClose() {
1967
- this.close();
1968
- }
1969
- onWindowResize() {
1970
- this.button.nativeElement.blur();
1971
- this.close();
1972
- }
1973
- initClickOutsideSubscription() {
1974
- this.cuiClickOutsideDirective.cuiClickOutside
1975
- .pipe(takeUntil(this.destroy$))
1976
- .subscribe(() => {
1977
- if (this.isOpened) {
1978
- this.onTouched();
1979
- }
1980
- this.close();
1981
- });
1982
- }
1983
- open() {
1984
- this.isOpened = true;
1985
- const { top: elementRectTop, left: elementRectLeft, bottom: elementRectBottom } = this.element.getBoundingClientRect();
1986
- const distanceToBottom = this.document.documentElement.clientHeight
1987
- - (elementRectBottom + this.SPACE_BETWEEN_BUTTON_AND_OPTIONS);
1988
- const embeddedViewRef = this.viewContainerRef.createEmbeddedView(this.optionsWrapper);
1989
- const node = embeddedViewRef.rootNodes[0];
1990
- const nodeStyles = node.style;
1991
- this.isOptionsListAbove = distanceToBottom < this.getOptionsListHeightContainer.nativeElement.offsetHeight;
1992
- embeddedViewRef.detectChanges();
1993
- nodeStyles.width = this.element.offsetWidth + 'px';
1994
- nodeStyles.left = window.scrollX + elementRectLeft + 'px';
1995
- if (this.isOptionsListAbove) {
1996
- nodeStyles.top = window.scrollY + elementRectTop
1997
- - this.getOptionsListHeightContainer.nativeElement.offsetHeight
1998
- - this.SPACE_BETWEEN_BUTTON_AND_OPTIONS
1999
- + 'px';
2000
- }
2001
- else {
2002
- nodeStyles.top = window.scrollY + elementRectBottom + this.SPACE_BETWEEN_BUTTON_AND_OPTIONS + 'px';
2003
- }
2004
- this.document.querySelector(CUI_ROOT_SELECTOR).appendChild(embeddedViewRef.rootNodes[0]);
2005
- }
2006
- close() {
2007
- this.isOpened = false;
2008
- this.clearViewContainerRef();
2009
- }
2010
- clearViewContainerRef() {
2011
- this.viewContainerRef.clear();
2012
- }
2013
- }
2014
- CuiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2015
- CuiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiSelectComponent, selector: "cui-select[options]", inputs: { options: "options", defaultOptionText: "defaultOptionText" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "style.--c-gap": "this.gap" } }, providers: [
2016
- CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2017
- cuiProvide(NG_VALUE_ACCESSOR, CuiSelectComponent, true),
2018
- CuiDestroyService
2019
- ], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }, { propertyName: "getOptionsListHeightContainer", first: true, predicate: ["getOptionsListHeightContainer"], descendants: true }, { propertyName: "optionsWrapper", first: true, predicate: ["optionsWrapper"], descendants: true }], hostDirectives: [{ directive: i2.CuiClickOutsideDirective }], ngImport: i0, template: "<button\r\n #button\r\n type=\"button\"\r\n [attr.id]=\"id\"\r\n [attr.data-size]=\"size\"\r\n [disabled]=\"isDisabled\"\r\n class=\"c-button\"\r\n [class.c-button_active]=\"isOpened\"\r\n [class.c-button_with-error]=\"isError\"\r\n (click)=\"onSwitch()\"\r\n>\r\n <ng-container *ngIf=\"selectedOption; else placeholderTemplate\">\r\n {{ selectedOption.label }}\r\n </ng-container>\r\n <ng-template #placeholderTemplate>\r\n <span class=\"c-placeholder\">{{ placeholder }}</span>\r\n </ng-template>\r\n <cui-svg\r\n icon=\"cuiIconChevronDown\"\r\n color=\"var(--cui-base-500)\"\r\n />\r\n</button>\r\n<ng-template #optionsWrapper>\r\n <div\r\n class=\"c-options__wrapper\"\r\n [class.c-options__wrapper_top]=\"isOptionsListAbove\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"optionsList\"/>\r\n </div>\r\n</ng-template>\r\n<div\r\n #getOptionsListHeightContainer\r\n class=\"c-get-options-list-height-container\"\r\n>\r\n <ng-container *ngTemplateOutlet=\"optionsList\"/>\r\n</div>\r\n<ng-template #optionsList>\r\n <ul\r\n class=\"c-options\"\r\n [class.c-options_top]=\"isOptionsListAbove\"\r\n >\r\n <ng-container *ngIf=\"options.length; else empty\">\r\n <li *ngFor=\"let option of options; trackBy: trackByFn\">\r\n <button\r\n type=\"button\"\r\n class=\"c-option-button\"\r\n [class.c-option-button_selected]=\"selectedOption === option\"\r\n [disabled]=\"option.isDisabled\"\r\n (click)=\"onSelect(option)\"\r\n >\r\n <span>{{ option.label }}</span>\r\n <cui-svg\r\n *ngIf=\"selectedOption === option\"\r\n icon=\"cuiIconCheckSm\"\r\n color=\"var(--cui-info)\"\r\n class=\"c-option-button__icon\"\r\n />\r\n </button>\r\n </li>\r\n </ng-container>\r\n <ng-template #empty>\r\n <li *ngIf=\"defaultOptionText\">\r\n <button\r\n type=\"button\"\r\n class=\"c-option-button\"\r\n (click)=\"onClose()\"\r\n >\r\n {{ defaultOptionText }}\r\n </button>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n</ng-template>\r\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)}.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-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}.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2020
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectComponent, decorators: [{
2021
- type: Component,
2022
- args: [{ selector: 'cui-select[options]', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2023
- CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2024
- cuiProvide(NG_VALUE_ACCESSOR, CuiSelectComponent, true),
2025
- CuiDestroyService
2026
- ], hostDirectives: [CuiClickOutsideDirective], template: "<button\r\n #button\r\n type=\"button\"\r\n [attr.id]=\"id\"\r\n [attr.data-size]=\"size\"\r\n [disabled]=\"isDisabled\"\r\n class=\"c-button\"\r\n [class.c-button_active]=\"isOpened\"\r\n [class.c-button_with-error]=\"isError\"\r\n (click)=\"onSwitch()\"\r\n>\r\n <ng-container *ngIf=\"selectedOption; else placeholderTemplate\">\r\n {{ selectedOption.label }}\r\n </ng-container>\r\n <ng-template #placeholderTemplate>\r\n <span class=\"c-placeholder\">{{ placeholder }}</span>\r\n </ng-template>\r\n <cui-svg\r\n icon=\"cuiIconChevronDown\"\r\n color=\"var(--cui-base-500)\"\r\n />\r\n</button>\r\n<ng-template #optionsWrapper>\r\n <div\r\n class=\"c-options__wrapper\"\r\n [class.c-options__wrapper_top]=\"isOptionsListAbove\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"optionsList\"/>\r\n </div>\r\n</ng-template>\r\n<div\r\n #getOptionsListHeightContainer\r\n class=\"c-get-options-list-height-container\"\r\n>\r\n <ng-container *ngTemplateOutlet=\"optionsList\"/>\r\n</div>\r\n<ng-template #optionsList>\r\n <ul\r\n class=\"c-options\"\r\n [class.c-options_top]=\"isOptionsListAbove\"\r\n >\r\n <ng-container *ngIf=\"options.length; else empty\">\r\n <li *ngFor=\"let option of options; trackBy: trackByFn\">\r\n <button\r\n type=\"button\"\r\n class=\"c-option-button\"\r\n [class.c-option-button_selected]=\"selectedOption === option\"\r\n [disabled]=\"option.isDisabled\"\r\n (click)=\"onSelect(option)\"\r\n >\r\n <span>{{ option.label }}</span>\r\n <cui-svg\r\n *ngIf=\"selectedOption === option\"\r\n icon=\"cuiIconCheckSm\"\r\n color=\"var(--cui-info)\"\r\n class=\"c-option-button__icon\"\r\n />\r\n </button>\r\n </li>\r\n </ng-container>\r\n <ng-template #empty>\r\n <li *ngIf=\"defaultOptionText\">\r\n <button\r\n type=\"button\"\r\n class=\"c-option-button\"\r\n (click)=\"onClose()\"\r\n >\r\n {{ defaultOptionText }}\r\n </button>\r\n </li>\r\n </ng-template>\r\n </ul>\r\n</ng-template>\r\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)}.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-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}.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"] }]
2027
- }], propDecorators: { options: [{
2028
- type: Input
2029
- }], defaultOptionText: [{
2030
- type: Input
2031
- }], button: [{
2032
- type: ViewChild,
2033
- args: ['button']
2034
- }], getOptionsListHeightContainer: [{
2035
- type: ViewChild,
2036
- args: ['getOptionsListHeightContainer']
2037
- }], optionsWrapper: [{
2038
- type: ViewChild,
2039
- args: ['optionsWrapper']
2040
- }], gap: [{
2041
- type: HostBinding,
2042
- args: ['style.--c-gap']
2043
- }], onWindowResize: [{
2044
- type: HostListener,
2045
- args: ['window:resize']
1894
+ class CuiSelectComponent {
1895
+ constructor() {
1896
+ this.element = inject(ElementRef).nativeElement;
1897
+ this.document = inject(DOCUMENT);
1898
+ this.changeDetectorRef = inject(ChangeDetectorRef);
1899
+ this.viewContainerRef = inject(ViewContainerRef);
1900
+ this.destroy$ = inject(CuiDestroyService, { self: true });
1901
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
1902
+ this.cuiClickOutsideDirective = inject(CuiClickOutsideDirective, { self: true });
1903
+ this.SPACE_BETWEEN_BUTTON_AND_OPTIONS = 3;
1904
+ this.isOpened = false;
1905
+ this.isOptionsListAbove = false;
1906
+ this.gap = `${this.SPACE_BETWEEN_BUTTON_AND_OPTIONS}px`;
1907
+ }
1908
+ get id() {
1909
+ return this.cuiTextFieldController.id;
1910
+ }
1911
+ get size() {
1912
+ return this.cuiTextFieldController.size;
1913
+ }
1914
+ get placeholder() {
1915
+ return this.cuiTextFieldController.placeholder;
1916
+ }
1917
+ get isError() {
1918
+ return this.cuiTextFieldController.isError;
1919
+ }
1920
+ trackByFn(_, item) {
1921
+ return item.label;
1922
+ }
1923
+ writeValue(value) {
1924
+ var _a;
1925
+ this.value = value;
1926
+ // TODO: Непонятно, зачем нужно в construction вторая часть выражения
1927
+ this.selectedOption = (_a = this.options.find(option => option.value === value)) !== null && _a !== void 0 ? _a : value;
1928
+ this.changeDetectorRef.markForCheck();
1929
+ }
1930
+ registerOnChange(fn) {
1931
+ this.onChange = fn;
1932
+ }
1933
+ registerOnTouched(fn) {
1934
+ this.onTouched = fn;
1935
+ }
1936
+ ngOnInit() {
1937
+ this.initClickOutsideSubscription();
1938
+ }
1939
+ ngOnDestroy() {
1940
+ this.clearViewContainerRef();
1941
+ }
1942
+ setDisabledState(isDisabled) {
1943
+ this.isDisabled = isDisabled;
1944
+ this.changeDetectorRef.markForCheck();
1945
+ }
1946
+ onSelect(option) {
1947
+ if (option.isDisabled) {
1948
+ return;
1949
+ }
1950
+ this.value = option.value;
1951
+ this.selectedOption = option;
1952
+ this.onChange(this.value);
1953
+ this.onSwitch();
1954
+ this.onTouched();
1955
+ }
1956
+ onSwitch() {
1957
+ if (!this.options.length && !this.defaultOptionText) {
1958
+ return;
1959
+ }
1960
+ if (!this.isOpened) {
1961
+ this.open();
1962
+ return;
1963
+ }
1964
+ this.close();
1965
+ }
1966
+ onClose() {
1967
+ this.close();
1968
+ }
1969
+ onWindowResize() {
1970
+ this.button.nativeElement.blur();
1971
+ this.close();
1972
+ }
1973
+ initClickOutsideSubscription() {
1974
+ this.cuiClickOutsideDirective.cuiClickOutside
1975
+ .pipe(takeUntil(this.destroy$))
1976
+ .subscribe(() => {
1977
+ if (this.isOpened) {
1978
+ this.onTouched();
1979
+ }
1980
+ this.close();
1981
+ });
1982
+ }
1983
+ open() {
1984
+ this.isOpened = true;
1985
+ const { top: elementRectTop, left: elementRectLeft, bottom: elementRectBottom } = this.element.getBoundingClientRect();
1986
+ const distanceToBottom = this.document.documentElement.clientHeight
1987
+ - (elementRectBottom + this.SPACE_BETWEEN_BUTTON_AND_OPTIONS);
1988
+ const embeddedViewRef = this.viewContainerRef.createEmbeddedView(this.optionsWrapper);
1989
+ const node = embeddedViewRef.rootNodes[0];
1990
+ const nodeStyles = node.style;
1991
+ this.isOptionsListAbove = distanceToBottom < this.getOptionsListHeightContainer.nativeElement.offsetHeight;
1992
+ embeddedViewRef.detectChanges();
1993
+ nodeStyles.width = this.element.offsetWidth + 'px';
1994
+ nodeStyles.left = window.scrollX + elementRectLeft + 'px';
1995
+ if (this.isOptionsListAbove) {
1996
+ nodeStyles.top = window.scrollY + elementRectTop
1997
+ - this.getOptionsListHeightContainer.nativeElement.offsetHeight
1998
+ - this.SPACE_BETWEEN_BUTTON_AND_OPTIONS
1999
+ + 'px';
2000
+ }
2001
+ else {
2002
+ nodeStyles.top = window.scrollY + elementRectBottom + this.SPACE_BETWEEN_BUTTON_AND_OPTIONS + 'px';
2003
+ }
2004
+ this.document.querySelector(CUI_ROOT_SELECTOR).appendChild(embeddedViewRef.rootNodes[0]);
2005
+ }
2006
+ close() {
2007
+ this.isOpened = false;
2008
+ this.clearViewContainerRef();
2009
+ }
2010
+ clearViewContainerRef() {
2011
+ this.viewContainerRef.clear();
2012
+ }
2013
+ }
2014
+ CuiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2015
+ CuiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiSelectComponent, selector: "cui-select[options]", inputs: { options: "options", defaultOptionText: "defaultOptionText" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "style.--c-gap": "this.gap" } }, providers: [
2016
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2017
+ cuiProvide(NG_VALUE_ACCESSOR, CuiSelectComponent, true),
2018
+ CuiDestroyService
2019
+ ], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }, { propertyName: "getOptionsListHeightContainer", first: true, predicate: ["getOptionsListHeightContainer"], descendants: true }, { propertyName: "optionsWrapper", first: true, predicate: ["optionsWrapper"], descendants: true }], hostDirectives: [{ directive: i2.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 #optionsWrapper>\n <div\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(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)}.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-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}.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectComponent, decorators: [{
2021
+ type: Component,
2022
+ args: [{ selector: 'cui-select[options]', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2023
+ CUI_TEXT_FILED_CONTROLLER_PROVIDER,
2024
+ cuiProvide(NG_VALUE_ACCESSOR, CuiSelectComponent, true),
2025
+ CuiDestroyService
2026
+ ], 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 #optionsWrapper>\n <div\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(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)}.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-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}.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"] }]
2027
+ }], propDecorators: { options: [{
2028
+ type: Input
2029
+ }], defaultOptionText: [{
2030
+ type: Input
2031
+ }], button: [{
2032
+ type: ViewChild,
2033
+ args: ['button']
2034
+ }], getOptionsListHeightContainer: [{
2035
+ type: ViewChild,
2036
+ args: ['getOptionsListHeightContainer']
2037
+ }], optionsWrapper: [{
2038
+ type: ViewChild,
2039
+ args: ['optionsWrapper']
2040
+ }], gap: [{
2041
+ type: HostBinding,
2042
+ args: ['style.--c-gap']
2043
+ }], onWindowResize: [{
2044
+ type: HostListener,
2045
+ args: ['window:resize']
2046
2046
  }] } });
2047
2047
 
2048
- class CuiSelectModule {
2049
- }
2050
- CuiSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2051
- CuiSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectModule, declarations: [CuiSelectComponent], imports: [CommonModule,
2052
- CuiSvgModule], exports: [CuiSelectComponent,
2053
- CuiTextFieldControllerModule] });
2054
- CuiSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectModule, imports: [CommonModule,
2055
- CuiSvgModule, CuiTextFieldControllerModule] });
2056
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectModule, decorators: [{
2057
- type: NgModule,
2058
- args: [{
2059
- imports: [
2060
- CommonModule,
2061
- CuiSvgModule
2062
- ],
2063
- declarations: [CuiSelectComponent],
2064
- exports: [
2065
- CuiSelectComponent,
2066
- CuiTextFieldControllerModule
2067
- ]
2068
- }]
2048
+ class CuiSelectModule {
2049
+ }
2050
+ CuiSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2051
+ CuiSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectModule, declarations: [CuiSelectComponent], imports: [CommonModule,
2052
+ CuiSvgModule], exports: [CuiSelectComponent,
2053
+ CuiTextFieldControllerModule] });
2054
+ CuiSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectModule, imports: [CommonModule,
2055
+ CuiSvgModule, CuiTextFieldControllerModule] });
2056
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSelectModule, decorators: [{
2057
+ type: NgModule,
2058
+ args: [{
2059
+ imports: [
2060
+ CommonModule,
2061
+ CuiSvgModule
2062
+ ],
2063
+ declarations: [CuiSelectComponent],
2064
+ exports: [
2065
+ CuiSelectComponent,
2066
+ CuiTextFieldControllerModule
2067
+ ]
2068
+ }]
2069
2069
  }] });
2070
2070
 
2071
- const CUI_TAB_ACTIVATE = 'cui-tab-activate';
2072
- class CuiTabComponent {
2073
- constructor() {
2074
- this.element = inject(ElementRef).nativeElement;
2075
- }
2076
- onClick() {
2077
- this.element.dispatchEvent(new CustomEvent(CUI_TAB_ACTIVATE, { bubbles: true }));
2078
- }
2079
- }
2080
- CuiTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2081
- CuiTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiTabComponent, selector: "button[cuiTab]", host: { listeners: { "click": "onClick()" } }, ngImport: i0, template: "<ng-content />\r\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 });
2082
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabComponent, decorators: [{
2083
- type: Component,
2084
- args: [{ selector: 'button[cuiTab]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\r\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"] }]
2085
- }], propDecorators: { onClick: [{
2086
- type: HostListener,
2087
- args: ['click']
2071
+ const CUI_TAB_ACTIVATE = 'cui-tab-activate';
2072
+ class CuiTabComponent {
2073
+ constructor() {
2074
+ this.element = inject(ElementRef).nativeElement;
2075
+ }
2076
+ onClick() {
2077
+ this.element.dispatchEvent(new CustomEvent(CUI_TAB_ACTIVATE, { bubbles: true }));
2078
+ }
2079
+ }
2080
+ CuiTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2081
+ CuiTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
2082
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabComponent, decorators: [{
2083
+ type: Component,
2084
+ 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"] }]
2085
+ }], propDecorators: { onClick: [{
2086
+ type: HostListener,
2087
+ args: ['click']
2088
2088
  }] } });
2089
2089
 
2090
- class CuiTabsComponent {
2091
- constructor() {
2092
- this.element = inject(ElementRef).nativeElement;
2093
- this.activeElementClass = '_active';
2094
- this.activeItemIndex = 0;
2095
- this.activeItemIndexChange = new EventEmitter();
2096
- }
2097
- get tabs() {
2098
- return Array.from(this.element.querySelectorAll('[cuiTab]'));
2099
- }
2100
- get activeElement() {
2101
- return this.tabs[this.activeItemIndex] || null;
2102
- }
2103
- ngAfterViewChecked() {
2104
- this.changeActiveItem();
2105
- }
2106
- onActivate(event) {
2107
- event.stopPropagation();
2108
- const index = this.tabs.findIndex((tab) => tab === event.target);
2109
- if (index === this.activeItemIndex) {
2110
- return;
2111
- }
2112
- this.activeItemIndexChange.emit(index);
2113
- this.activeItemIndex = index;
2114
- }
2115
- changeActiveItem() {
2116
- this.tabs.forEach(nativeElement => {
2117
- const active = nativeElement === this.activeElement;
2118
- nativeElement.classList.toggle(this.activeElementClass, active);
2119
- });
2120
- }
2121
- }
2122
- CuiTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2123
- CuiTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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]\" />\r\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 });
2124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsComponent, decorators: [{
2125
- type: Component,
2126
- args: [{ selector: 'cui-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"[cuiTab]\" />\r\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"] }]
2127
- }], propDecorators: { activeItemIndex: [{
2128
- type: Input
2129
- }], activeItemIndexChange: [{
2130
- type: Output
2131
- }], onActivate: [{
2132
- type: HostListener,
2133
- args: [CUI_TAB_ACTIVATE, ['$event']]
2090
+ class CuiTabsComponent {
2091
+ constructor() {
2092
+ this.element = inject(ElementRef).nativeElement;
2093
+ this.activeElementClass = '_active';
2094
+ this.activeItemIndex = 0;
2095
+ this.activeItemIndexChange = new EventEmitter();
2096
+ }
2097
+ get tabs() {
2098
+ return Array.from(this.element.querySelectorAll('[cuiTab]'));
2099
+ }
2100
+ get activeElement() {
2101
+ return this.tabs[this.activeItemIndex] || null;
2102
+ }
2103
+ ngAfterViewChecked() {
2104
+ this.changeActiveItem();
2105
+ }
2106
+ onActivate(event) {
2107
+ event.stopPropagation();
2108
+ const index = this.tabs.findIndex((tab) => tab === event.target);
2109
+ if (index === this.activeItemIndex) {
2110
+ return;
2111
+ }
2112
+ this.activeItemIndexChange.emit(index);
2113
+ this.activeItemIndex = index;
2114
+ }
2115
+ changeActiveItem() {
2116
+ this.tabs.forEach(nativeElement => {
2117
+ const active = nativeElement === this.activeElement;
2118
+ nativeElement.classList.toggle(this.activeElementClass, active);
2119
+ });
2120
+ }
2121
+ }
2122
+ CuiTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2123
+ CuiTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
2124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsComponent, decorators: [{
2125
+ type: Component,
2126
+ 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"] }]
2127
+ }], propDecorators: { activeItemIndex: [{
2128
+ type: Input
2129
+ }], activeItemIndexChange: [{
2130
+ type: Output
2131
+ }], onActivate: [{
2132
+ type: HostListener,
2133
+ args: [CUI_TAB_ACTIVATE, ['$event']]
2134
2134
  }] } });
2135
2135
 
2136
- class CuiTabsModule {
2137
- }
2138
- CuiTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2139
- CuiTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsModule, declarations: [CuiTabsComponent, CuiTabComponent], exports: [CuiTabsComponent, CuiTabComponent] });
2140
- CuiTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsModule });
2141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsModule, decorators: [{
2142
- type: NgModule,
2143
- args: [{
2144
- imports: [],
2145
- declarations: [CuiTabsComponent, CuiTabComponent],
2146
- exports: [CuiTabsComponent, CuiTabComponent]
2147
- }]
2136
+ class CuiTabsModule {
2137
+ }
2138
+ CuiTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2139
+ CuiTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsModule, declarations: [CuiTabsComponent, CuiTabComponent], exports: [CuiTabsComponent, CuiTabComponent] });
2140
+ CuiTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsModule });
2141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTabsModule, decorators: [{
2142
+ type: NgModule,
2143
+ args: [{
2144
+ imports: [],
2145
+ declarations: [CuiTabsComponent, CuiTabComponent],
2146
+ exports: [CuiTabsComponent, CuiTabComponent]
2147
+ }]
2148
2148
  }] });
2149
2149
 
2150
- class CuiTextareaComponent {
2151
- constructor() {
2152
- this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
2153
- this.rows = 4;
2154
- this.noBordersAndPaddings = false;
2155
- }
2156
- get isError() {
2157
- return this.cuiTextFieldController.isError;
2158
- }
2159
- }
2160
- CuiTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2161
- CuiTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: i2.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 });
2162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaComponent, decorators: [{
2163
- type: Component,
2164
- 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"] }]
2165
- }], propDecorators: { rows: [{
2166
- type: Input
2167
- }, {
2168
- type: HostBinding,
2169
- args: ['rows']
2170
- }], noBordersAndPaddings: [{
2171
- type: Input
2172
- }, {
2173
- type: HostBinding,
2174
- args: ['class._no-borders-and-paddings']
2175
- }], isError: [{
2176
- type: HostBinding,
2177
- args: ['class._with-error']
2150
+ class CuiTextareaComponent {
2151
+ constructor() {
2152
+ this.cuiTextFieldController = inject(CUI_TEXT_FIELD_CONTROLLER);
2153
+ this.rows = 4;
2154
+ this.noBordersAndPaddings = false;
2155
+ }
2156
+ get isError() {
2157
+ return this.cuiTextFieldController.isError;
2158
+ }
2159
+ }
2160
+ CuiTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2161
+ CuiTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: i2.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 });
2162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaComponent, decorators: [{
2163
+ type: Component,
2164
+ 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"] }]
2165
+ }], propDecorators: { rows: [{
2166
+ type: Input
2167
+ }, {
2168
+ type: HostBinding,
2169
+ args: ['rows']
2170
+ }], noBordersAndPaddings: [{
2171
+ type: Input
2172
+ }, {
2173
+ type: HostBinding,
2174
+ args: ['class._no-borders-and-paddings']
2175
+ }], isError: [{
2176
+ type: HostBinding,
2177
+ args: ['class._with-error']
2178
2178
  }] } });
2179
2179
 
2180
- class CuiTextareaModule {
2181
- }
2182
- CuiTextareaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2183
- CuiTextareaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaModule, declarations: [CuiTextareaComponent], exports: [CuiTextareaComponent] });
2184
- CuiTextareaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaModule });
2185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaModule, decorators: [{
2186
- type: NgModule,
2187
- args: [{
2188
- declarations: [CuiTextareaComponent],
2189
- exports: [CuiTextareaComponent]
2190
- }]
2180
+ class CuiTextareaModule {
2181
+ }
2182
+ CuiTextareaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2183
+ CuiTextareaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaModule, declarations: [CuiTextareaComponent], exports: [CuiTextareaComponent] });
2184
+ CuiTextareaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaModule });
2185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiTextareaModule, decorators: [{
2186
+ type: NgModule,
2187
+ args: [{
2188
+ declarations: [CuiTextareaComponent],
2189
+ exports: [CuiTextareaComponent]
2190
+ }]
2191
2191
  }] });
2192
2192
 
2193
- class CuiToggleComponent {
2194
- }
2195
- CuiToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2196
- CuiToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
2197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleComponent, decorators: [{
2198
- type: Component,
2199
- 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"] }]
2193
+ class CuiToggleComponent {
2194
+ }
2195
+ CuiToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2196
+ CuiToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
2197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleComponent, decorators: [{
2198
+ type: Component,
2199
+ 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"] }]
2200
2200
  }] });
2201
2201
 
2202
- class CuiToggleModule {
2203
- }
2204
- CuiToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2205
- CuiToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleModule, declarations: [CuiToggleComponent], exports: [CuiToggleComponent] });
2206
- CuiToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleModule });
2207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleModule, decorators: [{
2208
- type: NgModule,
2209
- args: [{
2210
- declarations: [CuiToggleComponent],
2211
- exports: [CuiToggleComponent]
2212
- }]
2202
+ class CuiToggleModule {
2203
+ }
2204
+ CuiToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2205
+ CuiToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleModule, declarations: [CuiToggleComponent], exports: [CuiToggleComponent] });
2206
+ CuiToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleModule });
2207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiToggleModule, decorators: [{
2208
+ type: NgModule,
2209
+ args: [{
2210
+ declarations: [CuiToggleComponent],
2211
+ exports: [CuiToggleComponent]
2212
+ }]
2213
2213
  }] });
2214
2214
 
2215
- /**
2216
- * Generated bundle index. Do not edit.
2215
+ /**
2216
+ * Generated bundle index. Do not edit.
2217
2217
  */
2218
2218
 
2219
2219
  export { CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, 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_NOTIFICATION_DEFAULT_OPTIONS, 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, 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, CuiLabelComponent, CuiLabelModule, CuiNotificationComponent, CuiNotificationModule, CuiRadioComponent, CuiRadioModule, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSvgComponent, CuiSvgModule, CuiTabComponent, CuiTabsComponent, CuiTabsModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, cuiRemoveSpaces, cuiReplace };