@cuby-ui/core 0.0.180 → 0.0.190

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