@cuby-ui/core 0.0.121 → 0.0.123

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