@cuby-ui/core 0.0.85 → 0.0.87

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