circletone.mjs 130 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513
  1. import * as i0 from '@angular/core';
  2. import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output, Pipe, Directive, HostListener, ContentChildren, Injectable, inject, DestroyRef, Optional, SkipSelf, ContentChild, signal, ChangeDetectorRef, forwardRef, ViewChild } from '@angular/core';
  3. import { NgClass, AsyncPipe, NgTemplateOutlet, KeyValuePipe, DecimalPipe } from '@angular/common';
  4. import * as i1 from '@angular/platform-browser';
  5. import { RouterLink } from '@angular/router';
  6. import { TemplatePortal } from '@angular/cdk/portal';
  7. import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
  8. import { debounceTime, fromEvent, BehaviorSubject, skip, filter, Subject } from 'rxjs';
  9. import * as i1$1 from '@angular/cdk/overlay';
  10. import * as i1$2 from '@angular/forms';
  11. import { NG_VALUE_ACCESSOR, ControlContainer, FormGroupDirective } from '@angular/forms';
  12. import { distinctUntilChanged, debounceTime as debounceTime$1, map, startWith, tap } from 'rxjs/operators';
  13. class IconComponent {
  14. constructor() {
  15. this.icon = '';
  16. this.fill = 'currentColor';
  17. this.strokeWidth = 1.5;
  18. this.strokeColor = 'currentColor';
  19. this.size = 'base';
  20. this.variant = 'outline';
  21. }
  22. ngOnInit() {
  23. this.strokeColor = this.getFormattedColor(this.strokeColor);
  24. this.fill = this.getFormattedColor(this.fill);
  25. }
  26. get iconPath() {
  27. const icon = this.variant === 'solid' ? `${this.icon}-solid` : this.icon;
  28. return `/assets/images/icons.svg#${icon}`;
  29. }
  30. getFormattedColor(color) {
  31. if (color.startsWith('--')) {
  32. const rgbValue = getComputedStyle(document.documentElement).getPropertyValue(color).trim();
  33. return `rgb(${rgbValue})`;
  34. }
  35. return color;
  36. }
  37. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  38. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: IconComponent, isStandalone: true, selector: "ct-icon", inputs: { icon: "icon", fill: "fill", strokeWidth: "strokeWidth", strokeColor: "strokeColor", size: "size", variant: "variant" }, ngImport: i0, template: "<svg\n [attr.fill]=\"variant === 'solid' ? fill : 'none'\"\n [attr.stroke-width]=\"variant === 'outline' ? strokeWidth : 0\"\n [attr.stroke]=\"strokeColor\"\n class=\"flex\"\n [class.size-3]=\"size === 'xs'\"\n [class.size-4]=\"size === 'sm'\"\n [class.size-5]=\"size === 'base'\"\n [class.size-6]=\"size === 'lg'\"\n [class.size-8]=\"size === 'xl'\"\n [class.size-10]=\"size === '2xl'\"\n [class.size-20]=\"size === '3xl'\">\n <use [attr.xlink:href]=\"iconPath\"></use>\n</svg>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  39. }
  40. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: IconComponent, decorators: [{
  41. type: Component,
  42. args: [{ selector: 'ct-icon', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg\n [attr.fill]=\"variant === 'solid' ? fill : 'none'\"\n [attr.stroke-width]=\"variant === 'outline' ? strokeWidth : 0\"\n [attr.stroke]=\"strokeColor\"\n class=\"flex\"\n [class.size-3]=\"size === 'xs'\"\n [class.size-4]=\"size === 'sm'\"\n [class.size-5]=\"size === 'base'\"\n [class.size-6]=\"size === 'lg'\"\n [class.size-8]=\"size === 'xl'\"\n [class.size-10]=\"size === '2xl'\"\n [class.size-20]=\"size === '3xl'\">\n <use [attr.xlink:href]=\"iconPath\"></use>\n</svg>\n" }]
  43. }], propDecorators: { icon: [{
  44. type: Input
  45. }], fill: [{
  46. type: Input
  47. }], strokeWidth: [{
  48. type: Input
  49. }], strokeColor: [{
  50. type: Input
  51. }], size: [{
  52. type: Input
  53. }], variant: [{
  54. type: Input
  55. }] } });
  56. /**
  57. * This is the ButtonComponent, widely used among other components
  58. */
  59. class ButtonComponent {
  60. constructor() {
  61. this.iconPosition = 'left';
  62. this.role = 'button';
  63. this.disabled = false;
  64. this.fullSize = false;
  65. this.size = 'base';
  66. this.type = 'primary';
  67. this.variant = 'solid';
  68. }
  69. get cssClassmap() {
  70. return {
  71. [`text-on-${this.type} dark:text-on-${this.type}-dark`]: this.variant === 'solid' || this.variant === 'gradient' || this.variant === 'flat',
  72. [`text-${this.type} dark:text-${this.type}-dark hover:text-${this.type}-variant dark:hover:text-${this.type}-variant-dark`]: this.variant === 'blank' || this.variant === 'outline',
  73. [`bg-${this.type} dark:bg-${this.type}-dark hover:bg-${this.type}-variant hover:dark:bg-${this.type}-variant-dark`]: this.variant === 'solid',
  74. [`bg-${this.type}/25 dark:bg-${this.type}-dark/25 hover:bg-${this.type}-variant/25 hover:dark:bg-${this.type}-variant-dark/25`]: this.variant === 'flat',
  75. [`from-${this.type}-variant from-30% to-${this.type} bg-gradient-to-tl hover:bg-gradient-to-br dark:from-${this.type}-variant-dark dark:to-${this.type}-dark`]: this.variant === 'gradient',
  76. [`border border-2 border-${this.type} hover:border-${this.type}-variant dark:border-${this.type}-dark`]: this.variant === 'outline',
  77. 'px-3 py-2': (this.size === 'xs' || this.size === 'sm') && !this.hasJustIcon(),
  78. 'px-5 py-2.5': (this.size === 'base' || this.size === 'lg') && !this.hasJustIcon(),
  79. 'px-6 py-3': this.size === 'xl' && !this.hasJustIcon(),
  80. 'p-1': this.hasJustIcon() && this.variant !== 'blank',
  81. 'text-xs': this.size === 'xs',
  82. 'text-sm': this.size === 'sm' || this.size === 'base',
  83. 'text-base': this.size === 'lg' || this.size === 'xl',
  84. 'w-full grow': this.fullSize,
  85. 'opacity-50 hover:none': this.disabled,
  86. };
  87. }
  88. hasJustIcon() {
  89. return this.icon !== undefined && this.text === undefined;
  90. }
  91. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  92. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: ButtonComponent, isStandalone: true, selector: "ct-button", inputs: { text: "text", icon: "icon", iconPosition: "iconPosition", role: "role", disabled: "disabled", fullSize: "fullSize", size: "size", type: "type", variant: "variant" }, ngImport: i0, template: "<button\n [type]=\"role\"\n class=\"flex flex-row items-center justify-center gap-1.5 rounded-md font-primary font-medium\"\n [ngClass]=\"cssClassmap\"\n [disabled]=\"disabled\">\n @if (icon) {\n <ct-icon class=\"flex\" [size]=\"size\" [icon]=\"icon\" />\n }\n @if (text) {\n <span [class.order-first]=\"iconPosition === 'right'\"> {{ text }} </span>\n }\n</button>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  93. }
  94. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ButtonComponent, decorators: [{
  95. type: Component,
  96. args: [{ selector: 'ct-button', standalone: true, imports: [NgClass, IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [type]=\"role\"\n class=\"flex flex-row items-center justify-center gap-1.5 rounded-md font-primary font-medium\"\n [ngClass]=\"cssClassmap\"\n [disabled]=\"disabled\">\n @if (icon) {\n <ct-icon class=\"flex\" [size]=\"size\" [icon]=\"icon\" />\n }\n @if (text) {\n <span [class.order-first]=\"iconPosition === 'right'\"> {{ text }} </span>\n }\n</button>\n" }]
  97. }], propDecorators: { text: [{
  98. type: Input
  99. }], icon: [{
  100. type: Input
  101. }], iconPosition: [{
  102. type: Input
  103. }], role: [{
  104. type: Input
  105. }], disabled: [{
  106. type: Input
  107. }], fullSize: [{
  108. type: Input
  109. }], size: [{
  110. type: Input
  111. }], type: [{
  112. type: Input
  113. }], variant: [{
  114. type: Input
  115. }] } });
  116. /**
  117. * The alert component is responsible to show alerts for diverse elements. Including `FormErrorComponent` among others.
  118. */
  119. class AlertComponent {
  120. constructor() {
  121. this.dismissable = false;
  122. this.fullSize = true;
  123. this.text = '';
  124. this.type = 'primary';
  125. this.variant = 'solid';
  126. this.size = 'base';
  127. this.withIcon = true;
  128. this.dismiss = new EventEmitter();
  129. }
  130. get icon() {
  131. switch (this.type) {
  132. case 'primary':
  133. case 'secondary':
  134. case 'neutral':
  135. return 'information-circle';
  136. case 'error':
  137. return 'exclamation-triangle';
  138. case 'warning':
  139. return 'exclamation-circle';
  140. case 'success':
  141. return 'check-circle';
  142. default:
  143. return '';
  144. }
  145. }
  146. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  147. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: AlertComponent, isStandalone: true, selector: "ct-alert", inputs: { dismissable: "dismissable", fullSize: "fullSize", text: "text", type: "type", variant: "variant", size: "size", withIcon: "withIcon" }, outputs: { dismiss: "dismiss" }, ngImport: i0, template: "<div\n class=\"flex flex-row items-center gap-1 rounded-lg font-primary\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n role=\"alert\"\n [ngClass]=\"{\n 'text-xs': size === 'xs' || size === 'sm',\n 'text-sm': size === 'base',\n 'text-base': size === 'lg' || size === 'xl',\n 'text-primary dark:text-on-primary-dark': type === 'primary' && variant !== 'solid',\n 'text-neutral dark:text-on-neutral-dark': type === 'neutral' && variant !== 'solid',\n 'text-warning dark:text-warning-variant-dark': type === 'warning' && variant !== 'solid',\n 'text-error dark:text-error-variant-dark': type === 'error' && variant !== 'solid',\n 'text-success dark:texts-success-variant-dark': type === 'success' && variant !== 'solid',\n\n 'bg-primary dark:bg-primary-dark text-on-primary dark:text-on-primary-dark':\n type === 'primary' && variant === 'solid',\n 'bg-neutral dark:bg-neutral-dark text-on-neutral dark:text-on-neutral-dark':\n type === 'neutral' && variant === 'solid',\n 'bg-warning dark:bg-warning-dark text-on-warning dark:text-on-warning-dark':\n type === 'warning' && variant === 'solid',\n 'bg-error dark:bg-error-dark text-on-error dark:text-on-error-dark': type === 'error' && variant === 'solid',\n 'bg-success dark:bg-success-dark text-on-success dark:text-on-success-dark':\n type === 'success' && variant === 'solid',\n\n border: variant === 'outline',\n 'border-primary dark:border-primary-dark': type === 'primary' && variant === 'outline',\n 'border-warning dark:border-warning-dark': type === 'warning' && variant === 'outline',\n 'border-error dark:border-error-dark': type === 'error' && variant === 'outline',\n 'border-success dark:border-success-dark': type === 'success' && variant === 'outline',\n 'px-4 py-2': variant !== 'blank'\n }\">\n @if (withIcon) {\n <ct-icon [icon]=\"this.icon\" [size]=\"size\" />\n }\n <span class=\"grow font-semibold\">{{ text }}</span>\n @if (dismissable) {\n <ct-button\n icon=\"x-mark\"\n size=\"sm\"\n [variant]=\"this.variant === 'solid' ? 'solid' : 'blank'\"\n [type]=\"type\"\n (click)=\"dismiss.emit()\" />\n }\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }, { kind: "component", type: ButtonComponent, selector: "ct-button", inputs: ["text", "icon", "iconPosition", "role", "disabled", "fullSize", "size", "type", "variant"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  148. }
  149. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AlertComponent, decorators: [{
  150. type: Component,
  151. args: [{ selector: 'ct-alert', standalone: true, imports: [IconComponent, ButtonComponent, NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex flex-row items-center gap-1 rounded-lg font-primary\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n role=\"alert\"\n [ngClass]=\"{\n 'text-xs': size === 'xs' || size === 'sm',\n 'text-sm': size === 'base',\n 'text-base': size === 'lg' || size === 'xl',\n 'text-primary dark:text-on-primary-dark': type === 'primary' && variant !== 'solid',\n 'text-neutral dark:text-on-neutral-dark': type === 'neutral' && variant !== 'solid',\n 'text-warning dark:text-warning-variant-dark': type === 'warning' && variant !== 'solid',\n 'text-error dark:text-error-variant-dark': type === 'error' && variant !== 'solid',\n 'text-success dark:texts-success-variant-dark': type === 'success' && variant !== 'solid',\n\n 'bg-primary dark:bg-primary-dark text-on-primary dark:text-on-primary-dark':\n type === 'primary' && variant === 'solid',\n 'bg-neutral dark:bg-neutral-dark text-on-neutral dark:text-on-neutral-dark':\n type === 'neutral' && variant === 'solid',\n 'bg-warning dark:bg-warning-dark text-on-warning dark:text-on-warning-dark':\n type === 'warning' && variant === 'solid',\n 'bg-error dark:bg-error-dark text-on-error dark:text-on-error-dark': type === 'error' && variant === 'solid',\n 'bg-success dark:bg-success-dark text-on-success dark:text-on-success-dark':\n type === 'success' && variant === 'solid',\n\n border: variant === 'outline',\n 'border-primary dark:border-primary-dark': type === 'primary' && variant === 'outline',\n 'border-warning dark:border-warning-dark': type === 'warning' && variant === 'outline',\n 'border-error dark:border-error-dark': type === 'error' && variant === 'outline',\n 'border-success dark:border-success-dark': type === 'success' && variant === 'outline',\n 'px-4 py-2': variant !== 'blank'\n }\">\n @if (withIcon) {\n <ct-icon [icon]=\"this.icon\" [size]=\"size\" />\n }\n <span class=\"grow font-semibold\">{{ text }}</span>\n @if (dismissable) {\n <ct-button\n icon=\"x-mark\"\n size=\"sm\"\n [variant]=\"this.variant === 'solid' ? 'solid' : 'blank'\"\n [type]=\"type\"\n (click)=\"dismiss.emit()\" />\n }\n</div>\n" }]
  152. }], propDecorators: { dismissable: [{
  153. type: Input
  154. }], fullSize: [{
  155. type: Input
  156. }], text: [{
  157. type: Input,
  158. args: [{ required: true }]
  159. }], type: [{
  160. type: Input
  161. }], variant: [{
  162. type: Input
  163. }], size: [{
  164. type: Input
  165. }], withIcon: [{
  166. type: Input
  167. }], dismiss: [{
  168. type: Output
  169. }] } });
  170. class SafeImagePipe {
  171. constructor(sanitizer) {
  172. this.sanitizer = sanitizer;
  173. }
  174. transform(value, type = 'image/webp') {
  175. const imageBase64 = `data:${type};base64,${value}`;
  176. return this.sanitizer.bypassSecurityTrustUrl(imageBase64);
  177. }
  178. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SafeImagePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
  179. static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.5", ngImport: i0, type: SafeImagePipe, isStandalone: true, name: "safeImage" }); }
  180. }
  181. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SafeImagePipe, decorators: [{
  182. type: Pipe,
  183. args: [{
  184. name: 'safeImage',
  185. standalone: true,
  186. }]
  187. }], ctorParameters: () => [{ type: i1.DomSanitizer }] });
  188. class AvatarComponent {
  189. constructor() {
  190. this.picture = '';
  191. this.title = '';
  192. this.size = 'base';
  193. this.imageType = 'image/webp';
  194. this.titleInitials = '';
  195. }
  196. ngOnInit() {
  197. this.titleInitials = this.title
  198. .split(' ')
  199. .map(word => word[0]?.toLocaleUpperCase())
  200. .splice(0, 2)
  201. .join('');
  202. }
  203. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  204. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: AvatarComponent, isStandalone: true, selector: "ct-avatar", inputs: { picture: "picture", title: "title", size: "size", imageType: "imageType" }, ngImport: i0, template: "@if (picture) {\n @if (imageType !== 'icon') {\n <img\n [src]=\"picture | safeImage: imageType\"\n alt=\"{{ title }}\"\n [class.size-40]=\"size === '3xl'\"\n [class.size-32]=\"size === '2xl'\"\n [class.size-24]=\"size === 'xl'\"\n [class.size-20]=\"size === 'lg'\"\n [class.size-14]=\"size === 'base'\"\n [class.size-10]=\"size === 'sm'\"\n [class.size-6]=\"size === 'xs'\"\n class=\"rounded-full border-2 border-primary object-cover dark:border-primary-dark\" />\n } @else {\n <div\n class=\"flex flex-row items-center justify-center rounded-full bg-surface-variant text-on-primary dark:bg-surface-variant-dark dark:text-on-primary-dark\"\n [class.size-40]=\"size === '3xl'\"\n [class.size-32]=\"size === '2xl'\"\n [class.size-24]=\"size === 'xl'\"\n [class.size-20]=\"size === 'lg'\"\n [class.size-16]=\"size === 'base'\"\n [class.size-12]=\"size === 'sm'\"\n [class.size-10]=\"size === 'xs'\">\n <ct-icon [icon]=\"picture\" [size]=\"size\" />\n </div>\n }\n} @else {\n <div\n [class.size-40]=\"size === '3xl'\"\n [class.size-32]=\"size === '2xl'\"\n [class.size-24]=\"size === 'xl'\"\n [class.size-20]=\"size === 'lg'\"\n [class.size-16]=\"size === 'base'\"\n [class.size-12]=\"size === 'sm'\"\n [class.size-10]=\"size === 'xs'\"\n class=\"flex items-center justify-center truncate rounded-full border border-primary bg-primary-container text-on-primary-container dark:bg-primary-container-dark dark:text-on-primary-container-dark\">\n <span class=\"text-2xl font-medium\"> {{ titleInitials }}</span>\n </div>\n}\n", dependencies: [{ kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }, { kind: "pipe", type: SafeImagePipe, name: "safeImage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  205. }
  206. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AvatarComponent, decorators: [{
  207. type: Component,
  208. args: [{ selector: 'ct-avatar', standalone: true, imports: [IconComponent, SafeImagePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (picture) {\n @if (imageType !== 'icon') {\n <img\n [src]=\"picture | safeImage: imageType\"\n alt=\"{{ title }}\"\n [class.size-40]=\"size === '3xl'\"\n [class.size-32]=\"size === '2xl'\"\n [class.size-24]=\"size === 'xl'\"\n [class.size-20]=\"size === 'lg'\"\n [class.size-14]=\"size === 'base'\"\n [class.size-10]=\"size === 'sm'\"\n [class.size-6]=\"size === 'xs'\"\n class=\"rounded-full border-2 border-primary object-cover dark:border-primary-dark\" />\n } @else {\n <div\n class=\"flex flex-row items-center justify-center rounded-full bg-surface-variant text-on-primary dark:bg-surface-variant-dark dark:text-on-primary-dark\"\n [class.size-40]=\"size === '3xl'\"\n [class.size-32]=\"size === '2xl'\"\n [class.size-24]=\"size === 'xl'\"\n [class.size-20]=\"size === 'lg'\"\n [class.size-16]=\"size === 'base'\"\n [class.size-12]=\"size === 'sm'\"\n [class.size-10]=\"size === 'xs'\">\n <ct-icon [icon]=\"picture\" [size]=\"size\" />\n </div>\n }\n} @else {\n <div\n [class.size-40]=\"size === '3xl'\"\n [class.size-32]=\"size === '2xl'\"\n [class.size-24]=\"size === 'xl'\"\n [class.size-20]=\"size === 'lg'\"\n [class.size-16]=\"size === 'base'\"\n [class.size-12]=\"size === 'sm'\"\n [class.size-10]=\"size === 'xs'\"\n class=\"flex items-center justify-center truncate rounded-full border border-primary bg-primary-container text-on-primary-container dark:bg-primary-container-dark dark:text-on-primary-container-dark\">\n <span class=\"text-2xl font-medium\"> {{ titleInitials }}</span>\n </div>\n}\n" }]
  209. }], propDecorators: { picture: [{
  210. type: Input
  211. }], title: [{
  212. type: Input
  213. }], size: [{
  214. type: Input
  215. }], imageType: [{
  216. type: Input
  217. }] } });
  218. class IconButtonComponent {
  219. constructor() {
  220. this.icon = '';
  221. this.type = 'primary';
  222. this.variant = 'solid';
  223. this.size = 'base';
  224. this.role = 'button';
  225. this.disabled = false;
  226. }
  227. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: IconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  228. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.5", type: IconButtonComponent, isStandalone: true, selector: "ct-icon-button", inputs: { icon: "icon", type: ["type", "type", (value) => value], variant: ["variant", "variant", (value) => value], size: "size", role: "role", disabled: "disabled" }, ngImport: i0, template: "<button\n class=\"flex w-fit rounded-full bg-primary p-2 text-on-primary dark:text-on-primary-dark\"\n [ngClass]=\"{\n 'bg-primary hover:bg-primary-variant dark:bg-primary-variant-dark hover:dark:bg-surface-dark': variant === 'solid',\n 'hover:text-primary-variant hover:dark:text-primary-variant-dark': variant === 'flat'\n }\"\n [type]=\"role\">\n <ct-icon [class.opacity-50]=\"disabled\" [icon]=\"icon\" [size]=\"size\" />\n</button>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  229. }
  230. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: IconButtonComponent, decorators: [{
  231. type: Component,
  232. args: [{ selector: 'ct-icon-button', standalone: true, imports: [NgClass, IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n class=\"flex w-fit rounded-full bg-primary p-2 text-on-primary dark:text-on-primary-dark\"\n [ngClass]=\"{\n 'bg-primary hover:bg-primary-variant dark:bg-primary-variant-dark hover:dark:bg-surface-dark': variant === 'solid',\n 'hover:text-primary-variant hover:dark:text-primary-variant-dark': variant === 'flat'\n }\"\n [type]=\"role\">\n <ct-icon [class.opacity-50]=\"disabled\" [icon]=\"icon\" [size]=\"size\" />\n</button>\n" }]
  233. }], propDecorators: { icon: [{
  234. type: Input,
  235. args: [{ required: true }]
  236. }], type: [{
  237. type: Input,
  238. args: [{ transform: (value) => value }]
  239. }], variant: [{
  240. type: Input,
  241. args: [{ transform: (value) => value }]
  242. }], size: [{
  243. type: Input
  244. }], role: [{
  245. type: Input
  246. }], disabled: [{
  247. type: Input
  248. }] } });
  249. class HeaderComponent {
  250. constructor() {
  251. this.title = '';
  252. }
  253. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  254. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: HeaderComponent, isStandalone: true, selector: "ct-header", inputs: { title: "title" }, ngImport: i0, template: "<div\n class=\"flex h-14 w-full items-center justify-between bg-gradient-to-b from-surface to-primary px-4 py-2 dark:from-surface-variant-dark dark:to-primary-container-dark\">\n <div class=\"flex grow font-logo\">{{ title }}</div>\n <ng-content />\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  255. }
  256. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: HeaderComponent, decorators: [{
  257. type: Component,
  258. args: [{ selector: 'ct-header', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex h-14 w-full items-center justify-between bg-gradient-to-b from-surface to-primary px-4 py-2 dark:from-surface-variant-dark dark:to-primary-container-dark\">\n <div class=\"flex grow font-logo\">{{ title }}</div>\n <ng-content />\n</div>\n" }]
  259. }], propDecorators: { title: [{
  260. type: Input
  261. }] } });
  262. class OverlayDirective {
  263. constructor(overlay, elementRef, viewContainerRef, destroyRef) {
  264. this.overlay = overlay;
  265. this.elementRef = elementRef;
  266. this.viewContainerRef = viewContainerRef;
  267. this.destroyRef = destroyRef;
  268. this.verticalPositions = {
  269. bottomStart: {
  270. originX: 'start',
  271. originY: 'bottom',
  272. overlayX: 'start',
  273. overlayY: 'top',
  274. panelClass: 'vertical-overlay',
  275. },
  276. topStart: {
  277. originX: 'start',
  278. originY: 'top',
  279. overlayX: 'start',
  280. overlayY: 'bottom',
  281. panelClass: 'vertical-overlay',
  282. },
  283. bottomEnd: {
  284. originX: 'end',
  285. originY: 'bottom',
  286. overlayX: 'end',
  287. overlayY: 'top',
  288. panelClass: 'vertical-overlay',
  289. },
  290. topEnd: {
  291. originX: 'end',
  292. originY: 'top',
  293. overlayX: 'end',
  294. overlayY: 'bottom',
  295. panelClass: 'vertical-overlay',
  296. },
  297. };
  298. this.horizontalPositions = {
  299. bottomStart: {
  300. originX: 'end',
  301. originY: 'bottom',
  302. overlayX: 'start',
  303. overlayY: 'bottom',
  304. offsetY: 7,
  305. },
  306. topStart: {
  307. originX: 'start',
  308. originY: 'bottom',
  309. overlayX: 'end',
  310. overlayY: 'bottom',
  311. },
  312. };
  313. this.overlayRef = null;
  314. this.position = 'horizontal';
  315. this.closeOnClick = false;
  316. this.opened = new EventEmitter();
  317. this.closed = new EventEmitter();
  318. }
  319. show() {
  320. this.openDropdown();
  321. this.opened.emit();
  322. }
  323. openDropdown() {
  324. if (!this.overlayRef) {
  325. this.overlayRef = this.overlay.create({
  326. positionStrategy: this.getOverlayPosition(),
  327. });
  328. this.overlayRef
  329. .outsidePointerEvents()
  330. .pipe(takeUntilDestroyed(this.destroyRef), debounceTime(100))
  331. .subscribe(() => {
  332. this.closeDropdown();
  333. this.closed.emit();
  334. });
  335. fromEvent(this.overlayRef.hostElement, 'click')
  336. .pipe(takeUntilDestroyed(this.destroyRef))
  337. .subscribe(() => {
  338. if (this.closeOnClick)
  339. this.closeDropdown();
  340. });
  341. }
  342. if (this.contentTemplate && !this.overlayRef.hasAttached()) {
  343. const portal = new TemplatePortal(this.contentTemplate, this.viewContainerRef);
  344. this.overlayRef.attach(portal);
  345. }
  346. }
  347. closeDropdown() {
  348. if (this.overlayRef?.hasAttached()) {
  349. this.overlayRef.detach();
  350. }
  351. }
  352. getOverlayPosition() {
  353. const positions = this.position === 'horizontal' ? this.horizontalPositions : this.verticalPositions;
  354. return this.overlay
  355. .position()
  356. .flexibleConnectedTo(this.elementRef)
  357. .withPositions(Object.keys(positions).map(positionKey => positions[positionKey]));
  358. }
  359. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: OverlayDirective, deps: [{ token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Directive }); }
  360. static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: OverlayDirective, isStandalone: true, selector: "[ctOverlay]", inputs: { contentTemplate: ["ctOverlay", "contentTemplate"], position: ["ctOverlayPosition", "position"], closeOnClick: ["ctOverlayCloseOnClick", "closeOnClick"] }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "click": "show()" } }, ngImport: i0 }); }
  361. }
  362. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: OverlayDirective, decorators: [{
  363. type: Directive,
  364. args: [{
  365. selector: '[ctOverlay]',
  366. standalone: true,
  367. }]
  368. }], ctorParameters: () => [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.DestroyRef }], propDecorators: { contentTemplate: [{
  369. type: Input,
  370. args: ['ctOverlay']
  371. }], position: [{
  372. type: Input,
  373. args: ['ctOverlayPosition']
  374. }], closeOnClick: [{
  375. type: Input,
  376. args: ['ctOverlayCloseOnClick']
  377. }], opened: [{
  378. type: Output
  379. }], closed: [{
  380. type: Output
  381. }], show: [{
  382. type: HostListener,
  383. args: ['click']
  384. }] } });
  385. class MenuComponent {
  386. constructor() {
  387. this.direction = 'vertical';
  388. this.iconDirection = 'horizontal';
  389. this.type = 'primary';
  390. this.variant = 'solid';
  391. this.gap = 2;
  392. this.fullSize = true;
  393. this.iconAlone = false;
  394. this.menusAppearVertical = false;
  395. }
  396. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  397. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: MenuComponent, isStandalone: true, selector: "ct-menu", inputs: { direction: "direction", iconDirection: "iconDirection", type: "type", variant: "variant", gap: "gap", fullSize: "fullSize", iconAlone: "iconAlone", menusAppearVertical: "menusAppearVertical" }, ngImport: i0, template: "<div\n class=\"flex flex-col gap-{{ gap }} z-10 rounded-md p-2 font-primary\"\n [ngClass]=\"{\n 'shadow-lg': variant === 'solid',\n 'bg-surface dark:bg-surface-dark': variant === 'solid'\n }\">\n <div\n class=\"flex justify-around\"\n [class.flex-col]=\"direction === 'vertical'\"\n [class.flex-row]=\"direction === 'horizontal'\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  398. }
  399. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MenuComponent, decorators: [{
  400. type: Component,
  401. args: [{ selector: 'ct-menu', standalone: true, imports: [NgClass, MenuItemComponent, OverlayDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex flex-col gap-{{ gap }} z-10 rounded-md p-2 font-primary\"\n [ngClass]=\"{\n 'shadow-lg': variant === 'solid',\n 'bg-surface dark:bg-surface-dark': variant === 'solid'\n }\">\n <div\n class=\"flex justify-around\"\n [class.flex-col]=\"direction === 'vertical'\"\n [class.flex-row]=\"direction === 'horizontal'\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
  402. }], propDecorators: { direction: [{
  403. type: Input
  404. }], iconDirection: [{
  405. type: Input
  406. }], type: [{
  407. type: Input
  408. }], variant: [{
  409. type: Input
  410. }], gap: [{
  411. type: Input
  412. }], fullSize: [{
  413. type: Input
  414. }], iconAlone: [{
  415. type: Input
  416. }], menusAppearVertical: [{
  417. type: Input
  418. }] } });
  419. class MenuItemComponent {
  420. constructor() {
  421. this.text = '';
  422. this.link = '';
  423. this.type = 'internal';
  424. this.size = 'base';
  425. this.icon = '';
  426. this.iconSize = 'base';
  427. this.iconAlone = false;
  428. this.iconDirection = 'horizontal';
  429. this.hasSubmenu = false;
  430. this.submenuPosition = 'horizontal';
  431. this.isActive = false;
  432. this.isOpen = new BehaviorSubject(false);
  433. }
  434. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  435. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: MenuItemComponent, isStandalone: true, selector: "ct-menu-item", inputs: { text: "text", link: "link", type: "type", size: "size", icon: "icon", iconSize: "iconSize", iconAlone: "iconAlone", iconDirection: "iconDirection", hasSubmenu: "hasSubmenu", submenuPosition: "submenuPosition", isActive: "isActive" }, queries: [{ propertyName: "menus", predicate: MenuComponent }], ngImport: i0, template: "@if (menus.length > 0) {\n <a\n [ctOverlay]=\"dropDown\"\n [ctOverlayPosition]=\"submenuPosition\"\n (closed)=\"isOpen.next(false)\"\n (opened)=\"isOpen.next(true)\"\n [ngClass]=\"{\n 'bg-surface-variant dark:bg-surface-variant-dark': isOpen | async\n }\"\n class=\"block cursor-pointer rounded-md px-4 py-2 font-medium text-on-surface hover:bg-primary-variant dark:text-on-surface-dark hover:dark:bg-primary-dark\">\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" [size]=\"iconSize\" />\n }\n @if (text && !iconAlone) {\n <span\n [class.text-sm]=\"size === 'xs' || size === 'sm'\"\n [class.text-base]=\"size === 'base' || size === 'lg'\"\n [class.text-xl]=\"size === 'xl'\"\n >{{ text }}</span\n >\n }\n @if (!iconAlone) {\n @if (isOpen | async) {\n <ct-icon [icon]=\"submenuPosition === 'vertical' ? 'chevron-up' : 'chevron-left'\" variant=\"blank\" />\n } @else {\n <ct-icon [icon]=\"submenuPosition === 'vertical' ? 'chevron-down' : 'chevron-right'\" variant=\"blank\" />\n }\n }\n </span>\n </a>\n <ng-template #dropDown><ng-content></ng-content></ng-template>\n} @else {\n @if (link) {\n <a\n class=\"block cursor-pointer rounded-md px-4 py-2 font-medium text-on-surface hover:bg-surface-variant dark:text-on-surface-dark dark:hover:bg-surface-variant-dark\"\n [routerLink]=\"link\"\n [ngClass]=\"{\n 'bg-surface-variant dark:bg-surface-variant-dark': isActive\n }\">\n <ng-content select=\"[hint]\" />\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" variant=\"solid\" [size]=\"iconSize\" />\n }\n @if (text && !iconAlone) {\n <span\n [class.text-sm]=\"size === 'xs' || size === 'sm'\"\n [class.text-base]=\"size === 'base' || size === 'lg'\"\n [class.text-xl]=\"size === 'xl'\"\n >{{ text }}</span\n >\n }\n </span>\n </a>\n } @else {\n <span\n class=\"block cursor-pointer rounded-md px-4 py-2 font-medium text-on-surface hover:bg-surface-variant dark:text-on-surface-dark dark:hover:bg-surface-variant-dark\"\n [ngClass]=\"{\n 'bg-surface-variant dark:bg-surface-variant-dark': isActive\n }\">\n <ng-content select=\"[hint]\" />\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" variant=\"solid\" [size]=\"iconSize\" />\n }\n @if (text && !iconAlone) {\n <span\n [class.text-sm]=\"size === 'xs' || size === 'sm'\"\n [class.text-base]=\"size === 'base' || size === 'lg'\"\n [class.text-xl]=\"size === 'xl'\"\n >{{ text }}</span\n >\n }\n </span>\n </span>\n }\n}\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }, { kind: "directive", type: OverlayDirective, selector: "[ctOverlay]", inputs: ["ctOverlay", "ctOverlayPosition", "ctOverlayCloseOnClick"], outputs: ["opened", "closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  436. }
  437. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MenuItemComponent, decorators: [{
  438. type: Component,
  439. args: [{ selector: 'ct-menu-item', standalone: true, imports: [RouterLink, NgClass, AsyncPipe, IconComponent, ButtonComponent, OverlayDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (menus.length > 0) {\n <a\n [ctOverlay]=\"dropDown\"\n [ctOverlayPosition]=\"submenuPosition\"\n (closed)=\"isOpen.next(false)\"\n (opened)=\"isOpen.next(true)\"\n [ngClass]=\"{\n 'bg-surface-variant dark:bg-surface-variant-dark': isOpen | async\n }\"\n class=\"block cursor-pointer rounded-md px-4 py-2 font-medium text-on-surface hover:bg-primary-variant dark:text-on-surface-dark hover:dark:bg-primary-dark\">\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" [size]=\"iconSize\" />\n }\n @if (text && !iconAlone) {\n <span\n [class.text-sm]=\"size === 'xs' || size === 'sm'\"\n [class.text-base]=\"size === 'base' || size === 'lg'\"\n [class.text-xl]=\"size === 'xl'\"\n >{{ text }}</span\n >\n }\n @if (!iconAlone) {\n @if (isOpen | async) {\n <ct-icon [icon]=\"submenuPosition === 'vertical' ? 'chevron-up' : 'chevron-left'\" variant=\"blank\" />\n } @else {\n <ct-icon [icon]=\"submenuPosition === 'vertical' ? 'chevron-down' : 'chevron-right'\" variant=\"blank\" />\n }\n }\n </span>\n </a>\n <ng-template #dropDown><ng-content></ng-content></ng-template>\n} @else {\n @if (link) {\n <a\n class=\"block cursor-pointer rounded-md px-4 py-2 font-medium text-on-surface hover:bg-surface-variant dark:text-on-surface-dark dark:hover:bg-surface-variant-dark\"\n [routerLink]=\"link\"\n [ngClass]=\"{\n 'bg-surface-variant dark:bg-surface-variant-dark': isActive\n }\">\n <ng-content select=\"[hint]\" />\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" variant=\"solid\" [size]=\"iconSize\" />\n }\n @if (text && !iconAlone) {\n <span\n [class.text-sm]=\"size === 'xs' || size === 'sm'\"\n [class.text-base]=\"size === 'base' || size === 'lg'\"\n [class.text-xl]=\"size === 'xl'\"\n >{{ text }}</span\n >\n }\n </span>\n </a>\n } @else {\n <span\n class=\"block cursor-pointer rounded-md px-4 py-2 font-medium text-on-surface hover:bg-surface-variant dark:text-on-surface-dark dark:hover:bg-surface-variant-dark\"\n [ngClass]=\"{\n 'bg-surface-variant dark:bg-surface-variant-dark': isActive\n }\">\n <ng-content select=\"[hint]\" />\n <span\n class=\"flex items-center gap-3\"\n [class.flex-row]=\"iconDirection === 'horizontal'\"\n [class.flex-col]=\"iconDirection === 'vertical'\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" variant=\"solid\" [size]=\"iconSize\" />\n }\n @if (text && !iconAlone) {\n <span\n [class.text-sm]=\"size === 'xs' || size === 'sm'\"\n [class.text-base]=\"size === 'base' || size === 'lg'\"\n [class.text-xl]=\"size === 'xl'\"\n >{{ text }}</span\n >\n }\n </span>\n </span>\n }\n}\n" }]
  440. }], propDecorators: { text: [{
  441. type: Input
  442. }], link: [{
  443. type: Input
  444. }], type: [{
  445. type: Input,
  446. args: [{ required: true }]
  447. }], size: [{
  448. type: Input
  449. }], icon: [{
  450. type: Input
  451. }], iconSize: [{
  452. type: Input
  453. }], iconAlone: [{
  454. type: Input
  455. }], iconDirection: [{
  456. type: Input
  457. }], hasSubmenu: [{
  458. type: Input
  459. }], submenuPosition: [{
  460. type: Input
  461. }], isActive: [{
  462. type: Input
  463. }], menus: [{
  464. type: ContentChildren,
  465. args: [MenuComponent]
  466. }] } });
  467. class AccordionRegistryService {
  468. constructor() {
  469. this.accordions = new Map();
  470. }
  471. register(id, element) {
  472. this.accordions.set(id, element);
  473. }
  474. get(id) {
  475. return this.accordions.get(id);
  476. }
  477. unregister(id) {
  478. this.accordions.delete(id);
  479. }
  480. getItem(accordionId, itemId) {
  481. const accordionObject = this.accordions.get(accordionId);
  482. return accordionObject.accordionItems.find(item => item.id === itemId);
  483. }
  484. openItem(accordionId, itemId) {
  485. this.getItem(accordionId, itemId)?.isOpen.next(true);
  486. }
  487. closeItem(accordionId, itemId) {
  488. this.getItem(accordionId, itemId)?.isOpen.next(false);
  489. }
  490. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
  491. static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionRegistryService, providedIn: 'any' }); }
  492. }
  493. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionRegistryService, decorators: [{
  494. type: Injectable,
  495. args: [{ providedIn: 'any' }]
  496. }] });
  497. class AccordionComponent {
  498. constructor(parent) {
  499. this.parent = parent;
  500. this.destroyRef = inject(DestroyRef);
  501. this.accordionRegistryService = inject(AccordionRegistryService);
  502. this.label = '';
  503. this.policy = 'collapse';
  504. this.gap = 0;
  505. }
  506. ngAfterViewInit() {
  507. this.accordionItems.forEach(accordionItem => {
  508. accordionItem.isOpen
  509. .pipe(takeUntilDestroyed(this.destroyRef), skip(1), filter(isOpen => isOpen), debounceTime(10))
  510. .subscribe(() => {
  511. if (this.parent) {
  512. this.parent?.isOpen.next(true);
  513. }
  514. if (this.policy === 'collapse') {
  515. this.accordionItems.forEach(otherAccordionItem => {
  516. if (accordionItem.id !== otherAccordionItem.id && otherAccordionItem.isOpen.getValue()) {
  517. otherAccordionItem.isOpen.next(false);
  518. }
  519. });
  520. }
  521. });
  522. });
  523. this.accordionRegistryService.register(this.id, this);
  524. }
  525. ngOnDestroy() {
  526. this.accordionRegistryService.unregister(this.id);
  527. }
  528. closePanes() {
  529. this.accordionItems.forEach(accordionItem => accordionItem.isOpen.next(false));
  530. }
  531. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionComponent, deps: [{ token: AccordionItemComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
  532. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: AccordionComponent, isStandalone: true, selector: "ct-accordion", inputs: { label: "label", id: "id", policy: "policy", gap: "gap" }, queries: [{ propertyName: "accordionItems", predicate: AccordionItemComponent }], ngImport: i0, template: "<div class=\"flex flex-col gap-{{ gap }}\">\n <ng-content></ng-content>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  533. }
  534. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionComponent, decorators: [{
  535. type: Component,
  536. args: [{ selector: 'ct-accordion', standalone: true, imports: [AsyncPipe, IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-{{ gap }}\">\n <ng-content></ng-content>\n</div>\n" }]
  537. }], ctorParameters: () => [{ type: AccordionItemComponent, decorators: [{
  538. type: Optional
  539. }, {
  540. type: SkipSelf
  541. }] }], propDecorators: { label: [{
  542. type: Input
  543. }], id: [{
  544. type: Input,
  545. args: [{ required: true }]
  546. }], policy: [{
  547. type: Input
  548. }], gap: [{
  549. type: Input
  550. }], accordionItems: [{
  551. type: ContentChildren,
  552. args: [AccordionItemComponent]
  553. }] } });
  554. class AccordionItemComponent {
  555. constructor() {
  556. this.destroyRef = inject(DestroyRef);
  557. this.id = '';
  558. this.label = '';
  559. this.isOpen = new BehaviorSubject(false);
  560. }
  561. ngAfterViewInit() {
  562. this.isOpen
  563. .pipe(takeUntilDestroyed(this.destroyRef), skip(1), filter(isOpen => !isOpen))
  564. .subscribe(() => {
  565. this.accordions.forEach(accordion => {
  566. accordion.closePanes();
  567. });
  568. });
  569. }
  570. togglePane() {
  571. this.isOpen.next(!this.isOpen.getValue());
  572. }
  573. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  574. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: AccordionItemComponent, isStandalone: true, selector: "ct-accordion-item", inputs: { id: "id", label: "label" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true }, { propertyName: "accordions", predicate: AccordionComponent }], ngImport: i0, template: "<div class=\"flex flex-col\">\n <div tabindex=\"0\" (click)=\"togglePane()\" class=\"flex cursor-pointer flex-row rounded-md\">\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { isOpen: (isOpen | async) }\">\n <ng-content select=\"[header]\" />\n </ng-container>\n </div>\n <!-- providing a high value for max-height -->\n <div\n [style.max-height]=\"(isOpen | async) ? '1024px' : '0px'\"\n class=\"overflow-hidden transition-[max-height] duration-500 ease-in-out\">\n @if (isOpen | async) {\n <ng-content />\n }\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  575. }
  576. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionItemComponent, decorators: [{
  577. type: Component,
  578. args: [{ selector: 'ct-accordion-item', standalone: true, imports: [IconComponent, AsyncPipe, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col\">\n <div tabindex=\"0\" (click)=\"togglePane()\" class=\"flex cursor-pointer flex-row rounded-md\">\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { isOpen: (isOpen | async) }\">\n <ng-content select=\"[header]\" />\n </ng-container>\n </div>\n <!-- providing a high value for max-height -->\n <div\n [style.max-height]=\"(isOpen | async) ? '1024px' : '0px'\"\n class=\"overflow-hidden transition-[max-height] duration-500 ease-in-out\">\n @if (isOpen | async) {\n <ng-content />\n }\n </div>\n</div>\n" }]
  579. }], propDecorators: { id: [{
  580. type: Input,
  581. args: [{ required: true }]
  582. }], label: [{
  583. type: Input
  584. }], headerTemplate: [{
  585. type: ContentChild,
  586. args: ['header']
  587. }], accordions: [{
  588. type: ContentChildren,
  589. args: [AccordionComponent]
  590. }] } });
  591. class TabButtonComponent {
  592. constructor() {
  593. this.key = '';
  594. this.title = '';
  595. this.subTitle = '';
  596. this.variant = 'solid';
  597. this.clicked = new EventEmitter();
  598. this.isActive = signal(false);
  599. }
  600. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  601. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: TabButtonComponent, isStandalone: true, selector: "ct-tab-button", inputs: { key: "key", title: "title", subTitle: "subTitle", variant: "variant" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<div\n tabindex=\"0\"\n class=\"flex w-full cursor-pointer flex-col p-1 text-center\"\n [ngClass]=\"{\n 'rounded-md hover:bg-surface-variant dark:hover:bg-surface-variant-dark': variant === 'solid',\n 'bg-surface dark:bg-surface-dark': isActive() && variant === 'solid',\n 'border-b-4 rounded-t-md': variant === 'flat',\n 'border-surface-variant dark:border-surface-variant-dark': isActive() && variant === 'flat',\n 'border-transparent hover:border-surface dark:hover:border-surface-dark': !isActive() && variant === 'flat'\n }\"\n (click)=\"clicked.emit(key)\">\n <span class=\"font-bold\">{{ title }}</span>\n @if (subTitle) {\n <p class=\"text-sm\">{{ subTitle }}</p>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  602. }
  603. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabButtonComponent, decorators: [{
  604. type: Component,
  605. args: [{ selector: 'ct-tab-button', standalone: true, imports: [NgClass, AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n tabindex=\"0\"\n class=\"flex w-full cursor-pointer flex-col p-1 text-center\"\n [ngClass]=\"{\n 'rounded-md hover:bg-surface-variant dark:hover:bg-surface-variant-dark': variant === 'solid',\n 'bg-surface dark:bg-surface-dark': isActive() && variant === 'solid',\n 'border-b-4 rounded-t-md': variant === 'flat',\n 'border-surface-variant dark:border-surface-variant-dark': isActive() && variant === 'flat',\n 'border-transparent hover:border-surface dark:hover:border-surface-dark': !isActive() && variant === 'flat'\n }\"\n (click)=\"clicked.emit(key)\">\n <span class=\"font-bold\">{{ title }}</span>\n @if (subTitle) {\n <p class=\"text-sm\">{{ subTitle }}</p>\n }\n</div>\n" }]
  606. }], propDecorators: { key: [{
  607. type: Input,
  608. args: [{ required: true }]
  609. }], title: [{
  610. type: Input
  611. }], subTitle: [{
  612. type: Input
  613. }], variant: [{
  614. type: Input
  615. }], clicked: [{
  616. type: Output
  617. }] } });
  618. class ListItemComponent {
  619. constructor() {
  620. this.avatar = '';
  621. this.avatarSize = 'base';
  622. this.avatarType = 'image/webp';
  623. this.header = '';
  624. this.subHeader = '';
  625. this.subTitle = '';
  626. }
  627. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  628. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: ListItemComponent, isStandalone: true, selector: "ct-list-item", inputs: { avatar: "avatar", avatarSize: "avatarSize", avatarType: "avatarType", header: "header", subHeader: "subHeader", subTitle: "subTitle" }, ngImport: i0, template: "<li\n class=\"flex cursor-pointer flex-row items-center gap-4 px-4 py-2 hover:bg-surface-variant hover:dark:bg-surface-variant-dark\">\n <ct-avatar class=\"flex-none\" [picture]=\"avatar\" [title]=\"header\" [size]=\"avatarSize\" [imageType]=\"avatarType\" />\n <div class=\"flex grow flex-col overflow-hidden\">\n @if (header) {\n <span class=\"truncate text-lg font-medium text-on-primary dark:text-on-primary-dark\" [innerHTML]=\"header\"></span>\n }\n @if (subHeader) {\n <span class=\"truncate text-sm text-on-surface dark:text-on-surface-dark\" [innerHTML]=\"subHeader\"></span>\n }\n </div>\n <ng-content />\n</li>\n", dependencies: [{ kind: "component", type: AvatarComponent, selector: "ct-avatar", inputs: ["picture", "title", "size", "imageType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  629. }
  630. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ListItemComponent, decorators: [{
  631. type: Component,
  632. args: [{ selector: 'ct-list-item', standalone: true, imports: [AvatarComponent, IconComponent, MenuComponent, MenuItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<li\n class=\"flex cursor-pointer flex-row items-center gap-4 px-4 py-2 hover:bg-surface-variant hover:dark:bg-surface-variant-dark\">\n <ct-avatar class=\"flex-none\" [picture]=\"avatar\" [title]=\"header\" [size]=\"avatarSize\" [imageType]=\"avatarType\" />\n <div class=\"flex grow flex-col overflow-hidden\">\n @if (header) {\n <span class=\"truncate text-lg font-medium text-on-primary dark:text-on-primary-dark\" [innerHTML]=\"header\"></span>\n }\n @if (subHeader) {\n <span class=\"truncate text-sm text-on-surface dark:text-on-surface-dark\" [innerHTML]=\"subHeader\"></span>\n }\n </div>\n <ng-content />\n</li>\n" }]
  633. }], propDecorators: { avatar: [{
  634. type: Input
  635. }], avatarSize: [{
  636. type: Input
  637. }], avatarType: [{
  638. type: Input
  639. }], header: [{
  640. type: Input
  641. }], subHeader: [{
  642. type: Input
  643. }], subTitle: [{
  644. type: Input
  645. }] } });
  646. class ListComponent {
  647. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  648. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: ListComponent, isStandalone: true, selector: "ct-list", ngImport: i0, template: "<ul class=\"flex grow flex-col divide-y divide-primary-400 font-primary dark:divide-primary-700\">\n <ng-content />\n</ul>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  649. }
  650. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ListComponent, decorators: [{
  651. type: Component,
  652. args: [{ selector: 'ct-list', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"flex grow flex-col divide-y divide-primary-400 font-primary dark:divide-primary-700\">\n <ng-content />\n</ul>\n" }]
  653. }] });
  654. class TabPanelDirective {
  655. constructor(elementRef, destroyRef, renderer) {
  656. this.elementRef = elementRef;
  657. this.destroyRef = destroyRef;
  658. this.renderer = renderer;
  659. this.ctTabPanel = '';
  660. this.hide = new EventEmitter();
  661. this.hide.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(hide => {
  662. this.renderer.addClass(this.elementRef.nativeElement, hide ? 'hidden' : 'flex');
  663. this.renderer.removeClass(this.elementRef.nativeElement, hide ? 'flex' : 'hidden');
  664. });
  665. }
  666. ngOnInit() {
  667. this.hide.next(true);
  668. }
  669. show() {
  670. this.renderer.addClass(this.elementRef.nativeElement, 'flex');
  671. this.renderer.removeClass(this.elementRef.nativeElement, 'hidden');
  672. }
  673. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabPanelDirective, deps: [{ token: i0.ElementRef }, { token: i0.DestroyRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
  674. static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: TabPanelDirective, isStandalone: true, selector: "[ctTabPanel]", inputs: { ctTabPanel: "ctTabPanel", hide: "hide" }, ngImport: i0 }); }
  675. }
  676. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabPanelDirective, decorators: [{
  677. type: Directive,
  678. args: [{
  679. selector: '[ctTabPanel]',
  680. standalone: true,
  681. }]
  682. }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.DestroyRef }, { type: i0.Renderer2 }], propDecorators: { ctTabPanel: [{
  683. type: Input
  684. }], hide: [{
  685. type: Input
  686. }] } });
  687. class TabGroupComponent {
  688. constructor() {
  689. this.destroyRef = inject(DestroyRef);
  690. this.border = true;
  691. this.activeTab = '';
  692. }
  693. ngOnChanges(changes) {
  694. if (changes['activeTab'].previousValue !== this.activeTab) {
  695. this.setActiveTab(this.activeTab);
  696. }
  697. }
  698. ngAfterContentInit() {
  699. this.setActiveTab(this.activeTab);
  700. this.buttons.forEach(button => button.clicked.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(key => this.setActiveTab(key)));
  701. }
  702. setActiveTab(key) {
  703. if (this.panels && this.buttons) {
  704. this.panels.forEach(panel => {
  705. if (panel.ctTabPanel === key) {
  706. panel.show();
  707. this.getTabButtonTrigger(panel.ctTabPanel).isActive.set(true);
  708. }
  709. else {
  710. this.getTabButtonTrigger(panel.ctTabPanel).isActive.set(false);
  711. panel.hide.next(true);
  712. }
  713. });
  714. }
  715. }
  716. getTabButtonTrigger(key) {
  717. return this.buttons.find(panel => panel.key === key);
  718. }
  719. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  720. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: TabGroupComponent, isStandalone: true, selector: "ct-tab-group", inputs: { border: "border", activeTab: "activeTab" }, queries: [{ propertyName: "buttons", predicate: TabButtonComponent }, { propertyName: "panels", predicate: TabPanelDirective }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"flex flex-row py-2 text-on-surface dark:text-on-surface-variant-dark\"\n [ngClass]=\"{\n 'my-4 gap-2 border-y border-surface-variant dark:border-surface-variant-dark': border\n }\">\n <ng-content select=\"[header]\" />\n</div>\n<ng-content select=\"[body]\" />\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  721. }
  722. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabGroupComponent, decorators: [{
  723. type: Component,
  724. args: [{ selector: 'ct-tab-group', standalone: true, imports: [NgClass, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex flex-row py-2 text-on-surface dark:text-on-surface-variant-dark\"\n [ngClass]=\"{\n 'my-4 gap-2 border-y border-surface-variant dark:border-surface-variant-dark': border\n }\">\n <ng-content select=\"[header]\" />\n</div>\n<ng-content select=\"[body]\" />\n" }]
  725. }], propDecorators: { border: [{
  726. type: Input
  727. }], activeTab: [{
  728. type: Input
  729. }], buttons: [{
  730. type: ContentChildren,
  731. args: [TabButtonComponent]
  732. }], panels: [{
  733. type: ContentChildren,
  734. args: [TabPanelDirective]
  735. }] } });
  736. class CardComponent {
  737. constructor() {
  738. this.header = '';
  739. this.subHeader = '';
  740. this.title = '';
  741. this.subTitle = '';
  742. this.avatar = '';
  743. this.image = '';
  744. this.disposition = 'vertical';
  745. this.imageThumbnail = '';
  746. this.withActions = false;
  747. this.acceptButton = new EventEmitter();
  748. this.cancelButton = new EventEmitter();
  749. }
  750. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  751. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: CardComponent, isStandalone: true, selector: "ct-card", inputs: { header: "header", subHeader: "subHeader", title: "title", subTitle: "subTitle", avatar: "avatar", image: "image", disposition: "disposition", imageThumbnail: "imageThumbnail", withActions: "withActions" }, outputs: { acceptButton: "acceptButton", cancelButton: "cancelButton" }, ngImport: i0, template: "@if (disposition === 'vertical') {\n <div\n class=\"flex w-full flex-col rounded-xl bg-surface font-primary text-on-surface dark:bg-surface-dark dark:text-on-surface-dark\">\n <div class=\"flex flex-row items-center gap-4 px-4 py-2\">\n <ct-avatar [picture]=\"avatar\" [title]=\"title\" />\n <div class=\"w-fit flex-1\">\n <div class=\"flex flex-col overflow-hidden\">\n @if (header) {\n <span class=\"overflow-hidden text-ellipsis text-lg font-semibold\" [innerHTML]=\"header\"></span>\n }\n @if (subHeader) {\n <span class=\"overflow-hidden text-ellipsis text-sm\" [innerHTML]=\"subHeader\"></span>\n }\n </div>\n </div>\n <div class=\"relative flex-none rounded-r-xl\">\n @if (imageThumbnail) {\n <img class=\"flex max-w-24 rounded-tr-xl object-cover\" [src]=\"imageThumbnail\" [alt]=\"title\" />\n } @else {\n <ng-content select=\"[header-extra]\" />\n }\n </div>\n </div>\n @if (image) {\n <img class=\"size-full object-cover\" [src]=\"image\" [alt]=\"title\" />\n }\n <ng-content select=\"[image-vertical]\" />\n @if (title || subTitle) {\n <div class=\"flex w-full flex-col px-4 py-2\">\n <div class=\"text-xl font-bold\" [innerHTML]=\"title\"></div>\n <div class=\"mb-2 text-base font-semibold\" [innerHTML]=\"subTitle\"></div>\n <div class=\"flex w-fit grow-0\"><ng-content select=\"[body]\" /></div>\n </div>\n }\n @if (withActions) {\n <div class=\"flex flex-row justify-end gap-2 px-4 py-2\">\n <ct-button text=\"test\" variant=\"flat\" (click)=\"acceptButton.emit()\" />\n <ct-button text=\"test\" variant=\"flat\" type=\"neutral\" (click)=\"cancelButton.emit()\" />\n </div>\n }\n </div>\n} @else {\n <div\n class=\"flex w-full flex-row items-stretch rounded-xl bg-surface font-primary text-on-surface dark:bg-surface-dark dark:text-on-surface-dark\">\n <div class=\"h-full w-3/4 flex-none\">\n @if (image) {\n <img class=\"size-full rounded-l-xl object-cover\" [src]=\"image\" [alt]=\"title\" />\n }\n <ng-content select=\"[image-horizontal]\" />\n </div>\n <div class=\"flex w-1/4 flex-col justify-between\">\n <div class=\"flex shrink-0 flex-row items-center gap-4 px-4 py-2\">\n <div class=\"flex-none\">\n <ct-avatar [picture]=\"avatar\" [title]=\"title\" />\n </div>\n <div class=\"flex w-fit flex-1 flex-col overflow-hidden\">\n @if (header) {\n <span class=\"overflow-hidden text-lg font-semibold\" [innerHTML]=\"header\"></span>\n }\n @if (subHeader) {\n <span class=\"overflow-hidden text-ellipsis text-sm\" [innerHTML]=\"subHeader\"></span>\n }\n </div>\n </div>\n <div class=\"flex-auto overflow-y-auto\">\n <ng-content select=\"[body-horizontal]\" />\n </div>\n <article class=\"flex-none flex-col gap-2\">\n <p class=\"text-wrap px-4 text-xl font-bold\" [innerHTML]=\"title\"></p>\n <p class=\"mb-2 text-wrap px-4 text-base font-semibold\" [innerHTML]=\"subTitle\"></p>\n <ng-content select=\"[footer-horizontal]\" />\n </article>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: AvatarComponent, selector: "ct-avatar", inputs: ["picture", "title", "size", "imageType"] }, { kind: "component", type: ButtonComponent, selector: "ct-button", inputs: ["text", "icon", "iconPosition", "role", "disabled", "fullSize", "size", "type", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  752. }
  753. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: CardComponent, decorators: [{
  754. type: Component,
  755. args: [{ selector: 'ct-card', standalone: true, imports: [AvatarComponent, ButtonComponent, SafeImagePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (disposition === 'vertical') {\n <div\n class=\"flex w-full flex-col rounded-xl bg-surface font-primary text-on-surface dark:bg-surface-dark dark:text-on-surface-dark\">\n <div class=\"flex flex-row items-center gap-4 px-4 py-2\">\n <ct-avatar [picture]=\"avatar\" [title]=\"title\" />\n <div class=\"w-fit flex-1\">\n <div class=\"flex flex-col overflow-hidden\">\n @if (header) {\n <span class=\"overflow-hidden text-ellipsis text-lg font-semibold\" [innerHTML]=\"header\"></span>\n }\n @if (subHeader) {\n <span class=\"overflow-hidden text-ellipsis text-sm\" [innerHTML]=\"subHeader\"></span>\n }\n </div>\n </div>\n <div class=\"relative flex-none rounded-r-xl\">\n @if (imageThumbnail) {\n <img class=\"flex max-w-24 rounded-tr-xl object-cover\" [src]=\"imageThumbnail\" [alt]=\"title\" />\n } @else {\n <ng-content select=\"[header-extra]\" />\n }\n </div>\n </div>\n @if (image) {\n <img class=\"size-full object-cover\" [src]=\"image\" [alt]=\"title\" />\n }\n <ng-content select=\"[image-vertical]\" />\n @if (title || subTitle) {\n <div class=\"flex w-full flex-col px-4 py-2\">\n <div class=\"text-xl font-bold\" [innerHTML]=\"title\"></div>\n <div class=\"mb-2 text-base font-semibold\" [innerHTML]=\"subTitle\"></div>\n <div class=\"flex w-fit grow-0\"><ng-content select=\"[body]\" /></div>\n </div>\n }\n @if (withActions) {\n <div class=\"flex flex-row justify-end gap-2 px-4 py-2\">\n <ct-button text=\"test\" variant=\"flat\" (click)=\"acceptButton.emit()\" />\n <ct-button text=\"test\" variant=\"flat\" type=\"neutral\" (click)=\"cancelButton.emit()\" />\n </div>\n }\n </div>\n} @else {\n <div\n class=\"flex w-full flex-row items-stretch rounded-xl bg-surface font-primary text-on-surface dark:bg-surface-dark dark:text-on-surface-dark\">\n <div class=\"h-full w-3/4 flex-none\">\n @if (image) {\n <img class=\"size-full rounded-l-xl object-cover\" [src]=\"image\" [alt]=\"title\" />\n }\n <ng-content select=\"[image-horizontal]\" />\n </div>\n <div class=\"flex w-1/4 flex-col justify-between\">\n <div class=\"flex shrink-0 flex-row items-center gap-4 px-4 py-2\">\n <div class=\"flex-none\">\n <ct-avatar [picture]=\"avatar\" [title]=\"title\" />\n </div>\n <div class=\"flex w-fit flex-1 flex-col overflow-hidden\">\n @if (header) {\n <span class=\"overflow-hidden text-lg font-semibold\" [innerHTML]=\"header\"></span>\n }\n @if (subHeader) {\n <span class=\"overflow-hidden text-ellipsis text-sm\" [innerHTML]=\"subHeader\"></span>\n }\n </div>\n </div>\n <div class=\"flex-auto overflow-y-auto\">\n <ng-content select=\"[body-horizontal]\" />\n </div>\n <article class=\"flex-none flex-col gap-2\">\n <p class=\"text-wrap px-4 text-xl font-bold\" [innerHTML]=\"title\"></p>\n <p class=\"mb-2 text-wrap px-4 text-base font-semibold\" [innerHTML]=\"subTitle\"></p>\n <ng-content select=\"[footer-horizontal]\" />\n </article>\n </div>\n </div>\n}\n" }]
  756. }], propDecorators: { header: [{
  757. type: Input
  758. }], subHeader: [{
  759. type: Input
  760. }], title: [{
  761. type: Input
  762. }], subTitle: [{
  763. type: Input
  764. }], avatar: [{
  765. type: Input
  766. }], image: [{
  767. type: Input
  768. }], disposition: [{
  769. type: Input
  770. }], imageThumbnail: [{
  771. type: Input
  772. }], withActions: [{
  773. type: Input
  774. }], acceptButton: [{
  775. type: Output
  776. }], cancelButton: [{
  777. type: Output
  778. }] } });
  779. class FormGenericComponent {
  780. constructor(formGroupDirective) {
  781. this.formGroupDirective = formGroupDirective;
  782. this.onChange = () => { };
  783. this.onTouched = () => { };
  784. this.changeDetectorRef = inject(ChangeDetectorRef);
  785. }
  786. hasErrors(formControl) {
  787. return (formControl && /*!formControl.pristine &&*/ formControl.touched && !!formControl.errors);
  788. }
  789. get formControl() {
  790. return this.formGroupDirective && this.formGroupDirective.form.get(this.formControlName);
  791. }
  792. registerOnChange(fn) {
  793. this.onChange = fn;
  794. }
  795. registerOnTouched(fn) {
  796. this.onTouched = fn;
  797. }
  798. triggerChange(value) {
  799. if (value && this.formControl)
  800. this.formControl.markAsDirty();
  801. this.onChange(value);
  802. }
  803. triggerTouched() {
  804. this.onTouched();
  805. }
  806. triggerMarkCheck() {
  807. this.changeDetectorRef.markForCheck();
  808. }
  809. triggerChangeDetection() {
  810. this.changeDetectorRef.detectChanges();
  811. }
  812. }
  813. class FormErrorComponent {
  814. constructor() {
  815. this.size = 'base';
  816. this.hasErrors = false;
  817. this.fullSize = false;
  818. this.helper = '';
  819. this.errorMessages = {};
  820. }
  821. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: FormErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  822. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: FormErrorComponent, isStandalone: true, selector: "ct-form-alert", inputs: { errors: "errors", size: "size", hasErrors: "hasErrors", fullSize: "fullSize", helper: "helper", errorMessages: "errorMessages" }, ngImport: i0, template: "<div\n class=\"flex min-h-4 flex-col justify-between gap-1 font-primary text-xs transition-opacity duration-500 ease-in-out sm:flex-row sm:items-center\"\n [class.w-full]=\"fullSize\"\n [class.w-fit]=\"!fullSize\"\n [class.opacity-0]=\"!hasErrors\"\n [class.opacity-100]=\"hasErrors\">\n @if (hasErrors) {\n <div class=\"flex flex-row items-center gap-1 text-error dark:text-error-variant-dark\">\n <ct-icon icon=\"exclamation-triangle\" size=\"sm\" />\n @for (error of errors | keyvalue; track error; let isLast = $last) {\n <span class=\"after:mx-1 after:inline-block after:content-[','] last:after:content-none\">{{\n errorMessages[error.key] ? errorMessages[error.key] : error.key\n }}</span>\n }\n </div>\n @if (helper) {\n <span>{{ helper }}</span>\n }\n }\n</div>\n", dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  823. }
  824. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: FormErrorComponent, decorators: [{
  825. type: Component,
  826. args: [{ selector: 'ct-form-alert', standalone: true, imports: [AlertComponent, KeyValuePipe, IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex min-h-4 flex-col justify-between gap-1 font-primary text-xs transition-opacity duration-500 ease-in-out sm:flex-row sm:items-center\"\n [class.w-full]=\"fullSize\"\n [class.w-fit]=\"!fullSize\"\n [class.opacity-0]=\"!hasErrors\"\n [class.opacity-100]=\"hasErrors\">\n @if (hasErrors) {\n <div class=\"flex flex-row items-center gap-1 text-error dark:text-error-variant-dark\">\n <ct-icon icon=\"exclamation-triangle\" size=\"sm\" />\n @for (error of errors | keyvalue; track error; let isLast = $last) {\n <span class=\"after:mx-1 after:inline-block after:content-[','] last:after:content-none\">{{\n errorMessages[error.key] ? errorMessages[error.key] : error.key\n }}</span>\n }\n </div>\n @if (helper) {\n <span>{{ helper }}</span>\n }\n }\n</div>\n" }]
  827. }], propDecorators: { errors: [{
  828. type: Input,
  829. args: [{ required: true }]
  830. }], size: [{
  831. type: Input
  832. }], hasErrors: [{
  833. type: Input
  834. }], fullSize: [{
  835. type: Input
  836. }], helper: [{
  837. type: Input
  838. }], errorMessages: [{
  839. type: Input
  840. }] } });
  841. class LabelComponent {
  842. constructor() {
  843. this.text = '';
  844. this.type = 'primary';
  845. this.formControlName = '';
  846. this.hasError = false;
  847. this.showError = false;
  848. }
  849. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  850. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: LabelComponent, isStandalone: true, selector: "ct-form-label", inputs: { text: "text", type: "type", formControlName: "formControlName", hasError: "hasError", showError: "showError" }, ngImport: i0, template: "<label\n class=\"flex font-primary text-sm font-medium\"\n [ngClass]=\"{\n 'text-on-primary dark:text-on-primary-dark': !hasError,\n 'text-error dark:text-error-variant-dark': type === 'error' || (hasError && showError),\n 'text-warning dark:text-warning-variant-dark': type === 'warning'\n }\"\n [for]=\"formControlName\"\n >{{ text }}</label\n>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  851. }
  852. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: LabelComponent, decorators: [{
  853. type: Component,
  854. args: [{ selector: 'ct-form-label', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label\n class=\"flex font-primary text-sm font-medium\"\n [ngClass]=\"{\n 'text-on-primary dark:text-on-primary-dark': !hasError,\n 'text-error dark:text-error-variant-dark': type === 'error' || (hasError && showError),\n 'text-warning dark:text-warning-variant-dark': type === 'warning'\n }\"\n [for]=\"formControlName\"\n >{{ text }}</label\n>\n" }]
  855. }], propDecorators: { text: [{
  856. type: Input,
  857. args: [{ required: true }]
  858. }], type: [{
  859. type: Input
  860. }], formControlName: [{
  861. type: Input
  862. }], hasError: [{
  863. type: Input
  864. }], showError: [{
  865. type: Input
  866. }] } });
  867. class OptionComponent {
  868. constructor() {
  869. this.label = '';
  870. this.icon = '';
  871. }
  872. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: OptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  873. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: OptionComponent, isStandalone: true, selector: "ct-option", inputs: { label: "label", icon: "icon" }, ngImport: i0, template: "<div\n class=\"flex cursor-pointer flex-row rounded-md px-4 py-2 text-sm hover:bg-surface-variant dark:hover:bg-surface-variant-dark\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" />\n }\n {{ label }}\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  874. }
  875. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: OptionComponent, decorators: [{
  876. type: Component,
  877. args: [{ selector: 'ct-option', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex cursor-pointer flex-row rounded-md px-4 py-2 text-sm hover:bg-surface-variant dark:hover:bg-surface-variant-dark\">\n @if (icon) {\n <ct-icon [icon]=\"icon\" />\n }\n {{ label }}\n</div>\n" }]
  878. }], propDecorators: { label: [{
  879. type: Input,
  880. args: [{ required: true }]
  881. }], icon: [{
  882. type: Input
  883. }] } });
  884. /**
  885. * Creates a value accessor provider for a form component.
  886. * @param component - The component that implements the NG_VALUE_ACCESSOR interface.
  887. * @returns An ExistingProvider object for the value accessor.
  888. */
  889. const provideValueAccessor = (component) => ({
  890. provide: NG_VALUE_ACCESSOR,
  891. useExisting: forwardRef(() => component),
  892. multi: true,
  893. });
  894. /**
  895. * Creates a control container provider using FormGroupDirective.
  896. * @returns An ExistingProvider object for the control container.
  897. */
  898. const provideControlContainer = () => ({
  899. provide: ControlContainer,
  900. useExisting: FormGroupDirective,
  901. });
  902. class InputComponent extends FormGenericComponent {
  903. onFocusOut() {
  904. this.triggerTouched();
  905. }
  906. constructor(formGroupDirective) {
  907. super(formGroupDirective);
  908. this.formGroupDirective = formGroupDirective;
  909. this.key = '';
  910. this.type = 'text';
  911. this.value = '';
  912. this.label = '';
  913. this.icon = '';
  914. this.helper = '';
  915. this.placeholder = '';
  916. this.symbol = '';
  917. this.canDelete = false;
  918. this.fullSize = true;
  919. this.showError = false;
  920. this.iconPosition = 'left';
  921. this.disposition = 'vertical';
  922. this.typed = new EventEmitter();
  923. this.showDelete$ = new BehaviorSubject(false);
  924. }
  925. input(event) {
  926. const value = event.target.value;
  927. if (this.canDelete) {
  928. this.showDelete$.next(!!value);
  929. }
  930. this.setValue(value);
  931. }
  932. clearValue() {
  933. this.showDelete$.next(false);
  934. this.triggerTouched();
  935. this.setValue(null);
  936. }
  937. setValue(value, propagate = true) {
  938. this.value = value;
  939. if (propagate) {
  940. this.triggerChange(value);
  941. this.typed.emit(value);
  942. }
  943. }
  944. writeValue(value) {
  945. if (value && this.canDelete)
  946. this.showDelete$.next(true);
  947. this.triggerMarkCheck();
  948. this.setValue(value, false);
  949. }
  950. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: InputComponent, deps: [{ token: i1$2.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
  951. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: InputComponent, isStandalone: true, selector: "ct-input", inputs: { formControlName: "formControlName", key: "key", type: "type", value: "value", label: "label", icon: "icon", helper: "helper", placeholder: "placeholder", symbol: "symbol", canDelete: "canDelete", fullSize: "fullSize", showError: "showError", min: "min", max: "max", iconPosition: "iconPosition", disposition: "disposition" }, outputs: { typed: "typed" }, host: { listeners: { "focusout": "onFocusOut()" } }, providers: [provideValueAccessor(forwardRef(() => InputComponent))], usesInheritance: true, ngImport: i0, template: "<div\n class=\"flex\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n [ngClass]=\"{\n 'items-center gap-4': disposition === 'horizontal',\n 'flex-col gap-0.5 items-start': disposition === 'vertical'\n }\">\n @if (label) {\n <ct-form-label [text]=\"label\" [hasError]=\"hasErrors(formControl)\" [showError]=\"showError\" />\n }\n <div\n class=\"relative inline-block rounded-md text-on-surface dark:text-on-surface-dark\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\">\n <input\n tabindex=\"0\"\n [type]=\"type\"\n [min]=\"min\"\n [max]=\"max\"\n class=\"h-9 rounded-md border bg-primary-50 font-primary text-sm outline-primary hover:border-neutral-600 dark:bg-primary-950 dark:outline-primary-dark focus:dark:border-primary-dark\"\n [class.px-4]=\"!icon || !symbol\"\n [ngClass]=\"{\n 'px-4': !icon,\n 'pr-4 pl-10': icon && iconPosition === 'left',\n 'pl-4 pr-10': (icon && iconPosition === 'right') || symbol || canDelete\n }\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n [class.border-neutral-300]=\"!hasErrors(formControl) || !showError\"\n [class.border-error]=\"hasErrors(formControl) && showError\"\n [class.border-success]=\"formControl && formControl.valid && showError\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n (input)=\"input($event)\" />\n @if (icon) {\n <ct-icon\n class=\"absolute top-2\"\n [class.left-3]=\"iconPosition === 'left'\"\n [class.right-3]=\"iconPosition === 'right'\"\n [icon]=\"icon\" />\n }\n @if (symbol) {\n <span class=\"absolute right-3 top-2.5 text-xs text-neutral-600 dark:text-neutral-300\">{{ symbol }}</span>\n }\n @if (showDelete$ | async) {\n <ct-icon class=\"absolute right-3 top-2.5 cursor-pointer\" icon=\"x-mark\" size=\"sm\" (click)=\"clearValue()\" />\n }\n </div>\n @if (formControl) {\n <ct-form-alert\n [fullSize]=\"fullSize\"\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LabelComponent, selector: "ct-form-label", inputs: ["text", "type", "formControlName", "hasError", "showError"] }, { kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }, { kind: "component", type: FormErrorComponent, selector: "ct-form-alert", inputs: ["errors", "size", "hasErrors", "fullSize", "helper", "errorMessages"] }], viewProviders: [provideControlContainer()], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  952. }
  953. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: InputComponent, decorators: [{
  954. type: Component,
  955. args: [{ selector: 'ct-input', standalone: true, imports: [NgClass, AsyncPipe, LabelComponent, IconComponent, FormErrorComponent], providers: [provideValueAccessor(forwardRef(() => InputComponent))], viewProviders: [provideControlContainer()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n [ngClass]=\"{\n 'items-center gap-4': disposition === 'horizontal',\n 'flex-col gap-0.5 items-start': disposition === 'vertical'\n }\">\n @if (label) {\n <ct-form-label [text]=\"label\" [hasError]=\"hasErrors(formControl)\" [showError]=\"showError\" />\n }\n <div\n class=\"relative inline-block rounded-md text-on-surface dark:text-on-surface-dark\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\">\n <input\n tabindex=\"0\"\n [type]=\"type\"\n [min]=\"min\"\n [max]=\"max\"\n class=\"h-9 rounded-md border bg-primary-50 font-primary text-sm outline-primary hover:border-neutral-600 dark:bg-primary-950 dark:outline-primary-dark focus:dark:border-primary-dark\"\n [class.px-4]=\"!icon || !symbol\"\n [ngClass]=\"{\n 'px-4': !icon,\n 'pr-4 pl-10': icon && iconPosition === 'left',\n 'pl-4 pr-10': (icon && iconPosition === 'right') || symbol || canDelete\n }\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n [class.border-neutral-300]=\"!hasErrors(formControl) || !showError\"\n [class.border-error]=\"hasErrors(formControl) && showError\"\n [class.border-success]=\"formControl && formControl.valid && showError\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n (input)=\"input($event)\" />\n @if (icon) {\n <ct-icon\n class=\"absolute top-2\"\n [class.left-3]=\"iconPosition === 'left'\"\n [class.right-3]=\"iconPosition === 'right'\"\n [icon]=\"icon\" />\n }\n @if (symbol) {\n <span class=\"absolute right-3 top-2.5 text-xs text-neutral-600 dark:text-neutral-300\">{{ symbol }}</span>\n }\n @if (showDelete$ | async) {\n <ct-icon class=\"absolute right-3 top-2.5 cursor-pointer\" icon=\"x-mark\" size=\"sm\" (click)=\"clearValue()\" />\n }\n </div>\n @if (formControl) {\n <ct-form-alert\n [fullSize]=\"fullSize\"\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n" }]
  956. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective, decorators: [{
  957. type: Optional
  958. }] }], propDecorators: { formControlName: [{
  959. type: Input
  960. }], key: [{
  961. type: Input
  962. }], type: [{
  963. type: Input
  964. }], value: [{
  965. type: Input
  966. }], label: [{
  967. type: Input
  968. }], icon: [{
  969. type: Input
  970. }], helper: [{
  971. type: Input
  972. }], placeholder: [{
  973. type: Input
  974. }], symbol: [{
  975. type: Input
  976. }], canDelete: [{
  977. type: Input
  978. }], fullSize: [{
  979. type: Input
  980. }], showError: [{
  981. type: Input
  982. }], min: [{
  983. type: Input
  984. }], max: [{
  985. type: Input
  986. }], iconPosition: [{
  987. type: Input
  988. }], disposition: [{
  989. type: Input
  990. }], typed: [{
  991. type: Output
  992. }], onFocusOut: [{
  993. type: HostListener,
  994. args: ['focusout']
  995. }] } });
  996. class AutocompleteComponent extends FormGenericComponent {
  997. constructor(formGroupDirective) {
  998. super(formGroupDirective);
  999. this.destroyRef = inject(DestroyRef);
  1000. this.key = '';
  1001. this.options = [];
  1002. this.label = '';
  1003. this.icon = '';
  1004. this.helper = '';
  1005. this.placeholder = '';
  1006. this.value = '';
  1007. this.inputValue = '';
  1008. this.iconPosition = 'left';
  1009. this.disposition = 'vertical';
  1010. this.fullSize = true;
  1011. this.multiple = false;
  1012. this.showError = false;
  1013. this.typed = new EventEmitter();
  1014. this.selected = new EventEmitter();
  1015. this.focusOut$ = new Subject();
  1016. this.inputValue$ = new BehaviorSubject('');
  1017. this.focusOut$.pipe(takeUntilDestroyed(this.destroyRef), debounceTime(150)).subscribe(() => {
  1018. this.options = [];
  1019. this.triggerTouched();
  1020. this.triggerMarkCheck();
  1021. });
  1022. }
  1023. input(value) {
  1024. if (!value)
  1025. this.options = [];
  1026. if (this.value && !this.multiple) {
  1027. this.setValue(null);
  1028. this.inputValue$.next('');
  1029. return;
  1030. }
  1031. if (this.multiple) {
  1032. this.inputValue$.next(value);
  1033. }
  1034. this.typed.emit(value);
  1035. }
  1036. setValue(value, propagate = true) {
  1037. this.value = value;
  1038. if (propagate) {
  1039. this.triggerChange(value);
  1040. this.selected.emit(value);
  1041. }
  1042. if (value) {
  1043. const selectedOption = this.options.find(option => option.key === value);
  1044. if (!this.multiple)
  1045. this.inputValue$.next(selectedOption ? selectedOption.label : this.placeholder);
  1046. else {
  1047. const currentWords = this.inputValue$.getValue().split(' ');
  1048. // replacing the last word with the current 'label' value
  1049. currentWords[currentWords.length - 1] = selectedOption ? selectedOption.label : this.placeholder;
  1050. this.inputValue$.next(currentWords.join(' '));
  1051. }
  1052. }
  1053. }
  1054. writeValue(value) {
  1055. this.triggerMarkCheck();
  1056. this.setValue(value, false);
  1057. }
  1058. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AutocompleteComponent, deps: [{ token: i1$2.FormGroupDirective }], target: i0.ɵɵFactoryTarget.Component }); }
  1059. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: AutocompleteComponent, isStandalone: true, selector: "ct-autocomplete", inputs: { formControlName: "formControlName", key: "key", options: "options", label: "label", icon: "icon", helper: "helper", placeholder: "placeholder", value: "value", inputValue: "inputValue", iconPosition: "iconPosition", disposition: "disposition", fullSize: "fullSize", multiple: "multiple", showError: "showError" }, outputs: { typed: "typed", selected: "selected" }, providers: [provideValueAccessor(forwardRef(() => AutocompleteComponent))], usesInheritance: true, ngImport: i0, template: "<div class=\"flex gap-1 font-primary\" [class.flex-col]=\"disposition === 'vertical'\">\n @if (label) {\n <ct-form-label\n [text]=\"label\"\n [hasError]=\"hasErrors(formControl)\"\n [showError]=\"showError\"\n [formControlName]=\"formControlName\" />\n }\n <div class=\"flex flex-col\" [class.w-full]=\"fullSize\" [class.w-fit]=\"!fullSize\">\n <ct-input\n key=\"autocomplete\"\n [canDelete]=\"true\"\n [helper]=\"helper\"\n [value]=\"inputValue$ | async\"\n [placeholder]=\"placeholder\"\n (typed)=\"input($event)\"\n (focusout)=\"focusOut$.next($event)\" />\n @if (options && options.length > 0) {\n <div class=\"relative flex flex-col\">\n <div\n [class.w-full]=\"fullSize\"\n [class.w-fit]=\"!fullSize\"\n class=\"absolute top-0.5 z-10 flex max-h-72 flex-col overflow-y-auto rounded-md border border-neutral-400 bg-surface text-on-surface shadow-lg dark:bg-surface-dark dark:text-on-surface-dark\">\n @for (option of options; track option) {\n <ct-option (click)=\"setValue(option.key)\" [label]=\"option.label\" [icon]=\"option.icon!\" />\n }\n </div>\n </div>\n }\n </div>\n @if (formControl) {\n <ct-form-alert\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n", dependencies: [{ kind: "component", type: FormErrorComponent, selector: "ct-form-alert", inputs: ["errors", "size", "hasErrors", "fullSize", "helper", "errorMessages"] }, { kind: "component", type: LabelComponent, selector: "ct-form-label", inputs: ["text", "type", "formControlName", "hasError", "showError"] }, { kind: "component", type: OptionComponent, selector: "ct-option", inputs: ["label", "icon"] }, { kind: "component", type: InputComponent, selector: "ct-input", inputs: ["formControlName", "key", "type", "value", "label", "icon", "helper", "placeholder", "symbol", "canDelete", "fullSize", "showError", "min", "max", "iconPosition", "disposition"], outputs: ["typed"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], viewProviders: [provideControlContainer()], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  1060. }
  1061. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AutocompleteComponent, decorators: [{
  1062. type: Component,
  1063. args: [{ selector: 'ct-autocomplete', standalone: true, imports: [IconComponent, FormErrorComponent, LabelComponent, OptionComponent, InputComponent, NgClass, AsyncPipe], providers: [provideValueAccessor(forwardRef(() => AutocompleteComponent))], viewProviders: [provideControlContainer()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex gap-1 font-primary\" [class.flex-col]=\"disposition === 'vertical'\">\n @if (label) {\n <ct-form-label\n [text]=\"label\"\n [hasError]=\"hasErrors(formControl)\"\n [showError]=\"showError\"\n [formControlName]=\"formControlName\" />\n }\n <div class=\"flex flex-col\" [class.w-full]=\"fullSize\" [class.w-fit]=\"!fullSize\">\n <ct-input\n key=\"autocomplete\"\n [canDelete]=\"true\"\n [helper]=\"helper\"\n [value]=\"inputValue$ | async\"\n [placeholder]=\"placeholder\"\n (typed)=\"input($event)\"\n (focusout)=\"focusOut$.next($event)\" />\n @if (options && options.length > 0) {\n <div class=\"relative flex flex-col\">\n <div\n [class.w-full]=\"fullSize\"\n [class.w-fit]=\"!fullSize\"\n class=\"absolute top-0.5 z-10 flex max-h-72 flex-col overflow-y-auto rounded-md border border-neutral-400 bg-surface text-on-surface shadow-lg dark:bg-surface-dark dark:text-on-surface-dark\">\n @for (option of options; track option) {\n <ct-option (click)=\"setValue(option.key)\" [label]=\"option.label\" [icon]=\"option.icon!\" />\n }\n </div>\n </div>\n }\n </div>\n @if (formControl) {\n <ct-form-alert\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n" }]
  1064. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective }], propDecorators: { formControlName: [{
  1065. type: Input
  1066. }], key: [{
  1067. type: Input,
  1068. args: [{ required: true }]
  1069. }], options: [{
  1070. type: Input,
  1071. args: [{ required: true }]
  1072. }], label: [{
  1073. type: Input
  1074. }], icon: [{
  1075. type: Input
  1076. }], helper: [{
  1077. type: Input
  1078. }], placeholder: [{
  1079. type: Input
  1080. }], value: [{
  1081. type: Input
  1082. }], inputValue: [{
  1083. type: Input
  1084. }], iconPosition: [{
  1085. type: Input
  1086. }], disposition: [{
  1087. type: Input
  1088. }], fullSize: [{
  1089. type: Input
  1090. }], multiple: [{
  1091. type: Input
  1092. }], showError: [{
  1093. type: Input
  1094. }], typed: [{
  1095. type: Output
  1096. }], selected: [{
  1097. type: Output
  1098. }] } });
  1099. class SelectComponent extends FormGenericComponent {
  1100. constructor(formGroupDirective, destroyRef) {
  1101. super(formGroupDirective);
  1102. this.formGroupDirective = formGroupDirective;
  1103. this.destroyRef = destroyRef;
  1104. this.focusOut$ = new Subject();
  1105. this.isOpen = false;
  1106. this.option = '';
  1107. this.key = '';
  1108. this.options = [];
  1109. this.label = '';
  1110. this.helper = '';
  1111. this.placeholder = '';
  1112. this.value = '';
  1113. this.disposition = 'vertical';
  1114. this.fullSize = true;
  1115. this.showError = false;
  1116. this.selected = new EventEmitter();
  1117. }
  1118. ngOnInit() {
  1119. this.selectOption(this.value, false);
  1120. this.focusOut$.pipe(takeUntilDestroyed(this.destroyRef), debounceTime(200)).subscribe(() => {
  1121. this.triggerMarkCheck();
  1122. this.close();
  1123. });
  1124. }
  1125. ngOnChanges(changes) {
  1126. if (changes['options'])
  1127. this.selectOption(this.value, false);
  1128. }
  1129. toggle() {
  1130. this.isOpen = !this.isOpen;
  1131. if (!this.isOpen) {
  1132. this.triggerTouched();
  1133. }
  1134. }
  1135. close() {
  1136. this.isOpen = false;
  1137. this.triggerTouched();
  1138. }
  1139. selectOption(key, propagate = true) {
  1140. const selectedOption = this.options.find(option => option.key === key);
  1141. this.option = key === null ? this.placeholder : selectedOption?.label;
  1142. if (propagate) {
  1143. this.selected.emit(key);
  1144. this.triggerChange(selectedOption?.key ?? null);
  1145. this.close();
  1146. }
  1147. }
  1148. writeValue(value) {
  1149. this.triggerMarkCheck();
  1150. this.selectOption(value, false);
  1151. }
  1152. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SelectComponent, deps: [{ token: i1$2.FormGroupDirective, optional: true }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component }); }
  1153. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: SelectComponent, isStandalone: true, selector: "ct-select", inputs: { formControlName: "formControlName", key: "key", options: "options", label: "label", helper: "helper", placeholder: "placeholder", value: "value", disposition: "disposition", fullSize: "fullSize", showError: "showError" }, outputs: { selected: "selected" }, providers: [provideValueAccessor(forwardRef(() => SelectComponent))], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["triggerElement"], descendants: true }, { propertyName: "panel", first: true, predicate: ["optionsPanel"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"flex gap-1 font-primary\"\n [class.items-start]=\"disposition === 'vertical'\"\n [class.flex-col]=\"disposition === 'vertical'\">\n @if (label) {\n <ct-form-label\n [class.grow]=\"disposition === 'horizontal'\"\n [text]=\"label\"\n [hasError]=\"hasErrors(formControl)\"\n [showError]=\"showError\" />\n }\n <div class=\"flex flex-col\" [class.w-full]=\"fullSize\" [class.w-fit]=\"!fullSize\">\n <div\n tabindex=\"0\"\n class=\"flex cursor-pointer flex-row items-center justify-between rounded-md border bg-surface px-4 py-2 text-sm text-on-surface dark:bg-surface-dark dark:text-on-surface-dark\"\n [class.border-error]=\"hasErrors(formControl) && showError\"\n [class.border-neutral-300]=\"!hasErrors(formControl) || !showError\"\n [class.text-on-surface]=\"option !== placeholder\"\n (focusout)=\"focusOut$.next($event)\"\n (click)=\"toggle()\">\n <span [class.text-neutral-500]=\"option === placeholder\">{{ option }}</span>\n <ct-icon class=\"flex\" [size]=\"'sm'\" [icon]=\"isOpen ? 'chevron-up' : 'chevron-down'\" />\n </div>\n <!-- [ctOverlay]=\"dropDown\"\n [ctOverlayCloseOnClick]=\"true\"\n ctOverlayPosition=\"vertical\"\n <ng-template #dropDown>\n <div\n [class.w-full]=\"fullSize\"\n [class.w-fit]=\"!fullSize\"\n class=\"flex max-h-72 flex-col overflow-y-auto rounded-md border border-neutral-400 bg-surface text-on-surface shadow-lg dark:bg-surface-dark dark:text-on-surface-dark\">\n @if (placeholder) {\n <ct-option (click)=\"selectOption(null)\" [label]=\"placeholder\" />\n }\n @for (option of options; track option) {\n <ct-option (click)=\"selectOption(option.key)\" [label]=\"option.label\" [icon]=\"option.icon!\" />\n }\n </div>\n </ng-template> -->\n @if (isOpen) {\n <div class=\"relative flex flex-col\">\n <div\n [class.w-full]=\"fullSize\"\n [class.w-fit]=\"!fullSize\"\n class=\"absolute top-0.5 z-10 flex max-h-72 flex-col overflow-y-auto rounded-md border border-neutral-400 bg-surface text-on-surface shadow-lg dark:bg-surface-dark dark:text-on-surface-dark\">\n @if (placeholder) {\n <ct-option (click)=\"selectOption(null)\" [label]=\"placeholder\" />\n }\n @for (option of options; track option) {\n <ct-option (click)=\"selectOption(option.key)\" [label]=\"option.label\" [icon]=\"option.icon!\" />\n }\n </div>\n </div>\n }\n </div>\n @if (formControl) {\n <ct-form-alert\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n", styles: ["vertical-overlay{width:100%}\n"], dependencies: [{ kind: "component", type: OptionComponent, selector: "ct-option", inputs: ["label", "icon"] }, { kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }, { kind: "component", type: LabelComponent, selector: "ct-form-label", inputs: ["text", "type", "formControlName", "hasError", "showError"] }, { kind: "component", type: FormErrorComponent, selector: "ct-form-alert", inputs: ["errors", "size", "hasErrors", "fullSize", "helper", "errorMessages"] }], viewProviders: [provideControlContainer()], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  1154. }
  1155. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SelectComponent, decorators: [{
  1156. type: Component,
  1157. args: [{ selector: 'ct-select', standalone: true, imports: [
  1158. OptionComponent,
  1159. ButtonComponent,
  1160. IconComponent,
  1161. LabelComponent,
  1162. AlertComponent,
  1163. FormErrorComponent,
  1164. OverlayDirective,
  1165. ], providers: [provideValueAccessor(forwardRef(() => SelectComponent))], viewProviders: [provideControlContainer()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex gap-1 font-primary\"\n [class.items-start]=\"disposition === 'vertical'\"\n [class.flex-col]=\"disposition === 'vertical'\">\n @if (label) {\n <ct-form-label\n [class.grow]=\"disposition === 'horizontal'\"\n [text]=\"label\"\n [hasError]=\"hasErrors(formControl)\"\n [showError]=\"showError\" />\n }\n <div class=\"flex flex-col\" [class.w-full]=\"fullSize\" [class.w-fit]=\"!fullSize\">\n <div\n tabindex=\"0\"\n class=\"flex cursor-pointer flex-row items-center justify-between rounded-md border bg-surface px-4 py-2 text-sm text-on-surface dark:bg-surface-dark dark:text-on-surface-dark\"\n [class.border-error]=\"hasErrors(formControl) && showError\"\n [class.border-neutral-300]=\"!hasErrors(formControl) || !showError\"\n [class.text-on-surface]=\"option !== placeholder\"\n (focusout)=\"focusOut$.next($event)\"\n (click)=\"toggle()\">\n <span [class.text-neutral-500]=\"option === placeholder\">{{ option }}</span>\n <ct-icon class=\"flex\" [size]=\"'sm'\" [icon]=\"isOpen ? 'chevron-up' : 'chevron-down'\" />\n </div>\n <!-- [ctOverlay]=\"dropDown\"\n [ctOverlayCloseOnClick]=\"true\"\n ctOverlayPosition=\"vertical\"\n <ng-template #dropDown>\n <div\n [class.w-full]=\"fullSize\"\n [class.w-fit]=\"!fullSize\"\n class=\"flex max-h-72 flex-col overflow-y-auto rounded-md border border-neutral-400 bg-surface text-on-surface shadow-lg dark:bg-surface-dark dark:text-on-surface-dark\">\n @if (placeholder) {\n <ct-option (click)=\"selectOption(null)\" [label]=\"placeholder\" />\n }\n @for (option of options; track option) {\n <ct-option (click)=\"selectOption(option.key)\" [label]=\"option.label\" [icon]=\"option.icon!\" />\n }\n </div>\n </ng-template> -->\n @if (isOpen) {\n <div class=\"relative flex flex-col\">\n <div\n [class.w-full]=\"fullSize\"\n [class.w-fit]=\"!fullSize\"\n class=\"absolute top-0.5 z-10 flex max-h-72 flex-col overflow-y-auto rounded-md border border-neutral-400 bg-surface text-on-surface shadow-lg dark:bg-surface-dark dark:text-on-surface-dark\">\n @if (placeholder) {\n <ct-option (click)=\"selectOption(null)\" [label]=\"placeholder\" />\n }\n @for (option of options; track option) {\n <ct-option (click)=\"selectOption(option.key)\" [label]=\"option.label\" [icon]=\"option.icon!\" />\n }\n </div>\n </div>\n }\n </div>\n @if (formControl) {\n <ct-form-alert\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n", styles: ["vertical-overlay{width:100%}\n"] }]
  1166. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective, decorators: [{
  1167. type: Optional
  1168. }] }, { type: i0.DestroyRef }], propDecorators: { formControlName: [{
  1169. type: Input
  1170. }], key: [{
  1171. type: Input
  1172. }], options: [{
  1173. type: Input,
  1174. args: [{ required: true }]
  1175. }], label: [{
  1176. type: Input
  1177. }], helper: [{
  1178. type: Input
  1179. }], placeholder: [{
  1180. type: Input
  1181. }], value: [{
  1182. type: Input
  1183. }], disposition: [{
  1184. type: Input
  1185. }], fullSize: [{
  1186. type: Input
  1187. }], showError: [{
  1188. type: Input
  1189. }], selected: [{
  1190. type: Output
  1191. }], trigger: [{
  1192. type: ViewChild,
  1193. args: ['triggerElement']
  1194. }], panel: [{
  1195. type: ViewChild,
  1196. args: ['optionsPanel']
  1197. }] } });
  1198. function integerValidator() {
  1199. return (control) => {
  1200. if (control.value !== null && !Number.isInteger(Number(control.value))) {
  1201. return { notInteger: true };
  1202. }
  1203. return null;
  1204. };
  1205. }
  1206. class InputNumberComponent extends InputComponent {
  1207. constructor(formGroupDirective) {
  1208. super(formGroupDirective);
  1209. this.formGroupDirective = formGroupDirective;
  1210. this.decimalPipe = inject(DecimalPipe);
  1211. this.validate = 'integer';
  1212. }
  1213. onFocusOut() {
  1214. this.formatNumber();
  1215. this.triggerTouched();
  1216. }
  1217. onFocusIn() {
  1218. this.reverseFormatNumber();
  1219. }
  1220. ngOnInit() {
  1221. if (this.formControl && this.validate === 'integer')
  1222. this.formControl.addValidators(integerValidator());
  1223. }
  1224. ngAfterViewInit() {
  1225. this.formatNumber();
  1226. this.triggerChangeDetection();
  1227. }
  1228. formatNumber() {
  1229. try {
  1230. this.value = this.decimalPipe.transform(this.value, '1.0-2') || '';
  1231. }
  1232. catch (_error) {
  1233. return;
  1234. }
  1235. }
  1236. reverseFormatNumber() {
  1237. this.value = !isNaN(parseFloat(this.value.replace(/[^0-9.-]/g, '')))
  1238. ? parseFloat(this.value.replace(/[^0-9.-]/g, ''))
  1239. : '';
  1240. }
  1241. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: InputNumberComponent, deps: [{ token: i1$2.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
  1242. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: InputNumberComponent, isStandalone: true, selector: "ct-input-number", inputs: { validate: "validate" }, host: { listeners: { "focusout": "onFocusOut()", "focusin": "onFocusIn()" } }, providers: [provideValueAccessor(forwardRef(() => InputNumberComponent)), DecimalPipe], usesInheritance: true, ngImport: i0, template: "<div\n class=\"flex\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n [ngClass]=\"{\n 'items-center gap-4': disposition === 'horizontal',\n 'flex-col gap-0.5 items-start': disposition === 'vertical'\n }\">\n @if (label) {\n <ct-form-label [text]=\"label\" [hasError]=\"hasErrors(formControl)\" [showError]=\"showError\" />\n }\n <div\n class=\"relative inline-block rounded-md text-on-surface dark:text-on-surface-dark\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\">\n <input\n tabindex=\"0\"\n [type]=\"type\"\n [min]=\"min\"\n [max]=\"max\"\n class=\"h-9 rounded-md border bg-primary-50 font-primary text-sm outline-primary hover:border-neutral-600 dark:bg-primary-950 dark:outline-primary-dark focus:dark:border-primary-dark\"\n [class.px-4]=\"!icon || !symbol\"\n [ngClass]=\"{\n 'px-4': !icon,\n 'pr-4 pl-10': icon && iconPosition === 'left',\n 'pl-4 pr-10': (icon && iconPosition === 'right') || symbol || canDelete\n }\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n [class.border-neutral-300]=\"!hasErrors(formControl) || !showError\"\n [class.border-error]=\"hasErrors(formControl) && showError\"\n [class.border-success]=\"formControl && formControl.valid && showError\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n (input)=\"input($event)\" />\n @if (icon) {\n <ct-icon\n class=\"absolute top-2\"\n [class.left-3]=\"iconPosition === 'left'\"\n [class.right-3]=\"iconPosition === 'right'\"\n [icon]=\"icon\" />\n }\n @if (symbol) {\n <span class=\"absolute right-3 top-2.5 text-xs text-neutral-600 dark:text-neutral-300\">{{ symbol }}</span>\n }\n @if (showDelete$ | async) {\n <ct-icon class=\"absolute right-3 top-2.5 cursor-pointer\" icon=\"x-mark\" size=\"sm\" (click)=\"clearValue()\" />\n }\n </div>\n @if (formControl) {\n <ct-form-alert\n [fullSize]=\"fullSize\"\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LabelComponent, selector: "ct-form-label", inputs: ["text", "type", "formControlName", "hasError", "showError"] }, { kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "fill", "strokeWidth", "strokeColor", "size", "variant"] }, { kind: "component", type: FormErrorComponent, selector: "ct-form-alert", inputs: ["errors", "size", "hasErrors", "fullSize", "helper", "errorMessages"] }], viewProviders: [provideControlContainer()], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  1243. }
  1244. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: InputNumberComponent, decorators: [{
  1245. type: Component,
  1246. args: [{ selector: 'ct-input-number', standalone: true, imports: [NgClass, AsyncPipe, LabelComponent, IconComponent, FormErrorComponent], providers: [provideValueAccessor(forwardRef(() => InputNumberComponent)), DecimalPipe], viewProviders: [provideControlContainer()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n [ngClass]=\"{\n 'items-center gap-4': disposition === 'horizontal',\n 'flex-col gap-0.5 items-start': disposition === 'vertical'\n }\">\n @if (label) {\n <ct-form-label [text]=\"label\" [hasError]=\"hasErrors(formControl)\" [showError]=\"showError\" />\n }\n <div\n class=\"relative inline-block rounded-md text-on-surface dark:text-on-surface-dark\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\">\n <input\n tabindex=\"0\"\n [type]=\"type\"\n [min]=\"min\"\n [max]=\"max\"\n class=\"h-9 rounded-md border bg-primary-50 font-primary text-sm outline-primary hover:border-neutral-600 dark:bg-primary-950 dark:outline-primary-dark focus:dark:border-primary-dark\"\n [class.px-4]=\"!icon || !symbol\"\n [ngClass]=\"{\n 'px-4': !icon,\n 'pr-4 pl-10': icon && iconPosition === 'left',\n 'pl-4 pr-10': (icon && iconPosition === 'right') || symbol || canDelete\n }\"\n [class.w-fit]=\"!fullSize\"\n [class.w-full]=\"fullSize\"\n [class.border-neutral-300]=\"!hasErrors(formControl) || !showError\"\n [class.border-error]=\"hasErrors(formControl) && showError\"\n [class.border-success]=\"formControl && formControl.valid && showError\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n (input)=\"input($event)\" />\n @if (icon) {\n <ct-icon\n class=\"absolute top-2\"\n [class.left-3]=\"iconPosition === 'left'\"\n [class.right-3]=\"iconPosition === 'right'\"\n [icon]=\"icon\" />\n }\n @if (symbol) {\n <span class=\"absolute right-3 top-2.5 text-xs text-neutral-600 dark:text-neutral-300\">{{ symbol }}</span>\n }\n @if (showDelete$ | async) {\n <ct-icon class=\"absolute right-3 top-2.5 cursor-pointer\" icon=\"x-mark\" size=\"sm\" (click)=\"clearValue()\" />\n }\n </div>\n @if (formControl) {\n <ct-form-alert\n [fullSize]=\"fullSize\"\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n" }]
  1247. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective, decorators: [{
  1248. type: Optional
  1249. }] }], propDecorators: { validate: [{
  1250. type: Input
  1251. }], onFocusOut: [{
  1252. type: HostListener,
  1253. args: ['focusout']
  1254. }], onFocusIn: [{
  1255. type: HostListener,
  1256. args: ['focusin']
  1257. }] } });
  1258. class ToggleComponent extends FormGenericComponent {
  1259. constructor(formGroupDirective, destroyRef) {
  1260. super(formGroupDirective);
  1261. this.formGroupDirective = formGroupDirective;
  1262. this.destroyRef = destroyRef;
  1263. this.formControlName = '';
  1264. this.checked = false;
  1265. this.label = '';
  1266. this.key = '';
  1267. this.value = '';
  1268. this.showError = false;
  1269. this.disposition = 'horizontal';
  1270. this.wasChecked = new EventEmitter();
  1271. }
  1272. toggle() {
  1273. this.checked = !this.checked;
  1274. this.triggerChange(this.checked);
  1275. this.wasChecked.emit(this.checked);
  1276. }
  1277. writeValue(value) {
  1278. this.triggerMarkCheck();
  1279. this.checked = value === this.value;
  1280. }
  1281. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ToggleComponent, deps: [{ token: i1$2.FormGroupDirective, optional: true }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component }); }
  1282. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: ToggleComponent, isStandalone: true, selector: "ct-toggle", inputs: { formControlName: "formControlName", checked: "checked", label: "label", key: "key", value: "value", showError: "showError", disposition: "disposition" }, outputs: { wasChecked: "wasChecked" }, providers: [provideValueAccessor(forwardRef(() => ToggleComponent))], usesInheritance: true, ngImport: i0, template: "<div\n class=\"flex flex-row gap-4\"\n [class.items-center]=\"disposition === 'horizontal'\"\n [class.flex-col]=\"disposition === 'vertical'\">\n <ct-form-label class=\"w-full\" [text]=\"label\" [hasError]=\"hasErrors(formControl) && showError\" />\n <label class=\"inline-flex cursor-pointer\">\n <input type=\"checkbox\" [value]=\"value\" [checked]=\"checked\" class=\"peer sr-only\" (change)=\"toggle()\" />\n <div\n tabindex=\"0\"\n class=\"peer relative h-6 w-11 rounded-full bg-surface-variant after:absolute after:start-[2px] after:top-[2px] after:size-5 after:rounded-full after:border after:border-transparent after:bg-neutral-50 after:transition-all after:content-[''] peer-checked:bg-primary peer-checked:after:translate-x-full peer-checked:after:border-white peer-focus:outline-none rtl:peer-checked:after:-translate-x-full dark:bg-surface-variant-dark dark:after:bg-neutral-400 dark:peer-checked:bg-primary-dark\"></div>\n </label>\n</div>\n", dependencies: [{ kind: "component", type: LabelComponent, selector: "ct-form-label", inputs: ["text", "type", "formControlName", "hasError", "showError"] }], viewProviders: [provideControlContainer()], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  1283. }
  1284. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ToggleComponent, decorators: [{
  1285. type: Component,
  1286. args: [{ selector: 'ct-toggle', standalone: true, imports: [LabelComponent], providers: [provideValueAccessor(forwardRef(() => ToggleComponent))], viewProviders: [provideControlContainer()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex flex-row gap-4\"\n [class.items-center]=\"disposition === 'horizontal'\"\n [class.flex-col]=\"disposition === 'vertical'\">\n <ct-form-label class=\"w-full\" [text]=\"label\" [hasError]=\"hasErrors(formControl) && showError\" />\n <label class=\"inline-flex cursor-pointer\">\n <input type=\"checkbox\" [value]=\"value\" [checked]=\"checked\" class=\"peer sr-only\" (change)=\"toggle()\" />\n <div\n tabindex=\"0\"\n class=\"peer relative h-6 w-11 rounded-full bg-surface-variant after:absolute after:start-[2px] after:top-[2px] after:size-5 after:rounded-full after:border after:border-transparent after:bg-neutral-50 after:transition-all after:content-[''] peer-checked:bg-primary peer-checked:after:translate-x-full peer-checked:after:border-white peer-focus:outline-none rtl:peer-checked:after:-translate-x-full dark:bg-surface-variant-dark dark:after:bg-neutral-400 dark:peer-checked:bg-primary-dark\"></div>\n </label>\n</div>\n" }]
  1287. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective, decorators: [{
  1288. type: Optional
  1289. }] }, { type: i0.DestroyRef }], propDecorators: { formControlName: [{
  1290. type: Input
  1291. }], checked: [{
  1292. type: Input
  1293. }], label: [{
  1294. type: Input
  1295. }], key: [{
  1296. type: Input
  1297. }], value: [{
  1298. type: Input
  1299. }], showError: [{
  1300. type: Input
  1301. }], disposition: [{
  1302. type: Input
  1303. }], wasChecked: [{
  1304. type: Output
  1305. }] } });
  1306. class RadioButtonComponent extends FormGenericComponent {
  1307. constructor(destroyRef, formGroupDirective) {
  1308. super(formGroupDirective);
  1309. this.destroyRef = destroyRef;
  1310. this.formGroupDirective = formGroupDirective;
  1311. this.key = '';
  1312. this.label = '';
  1313. this.checked = false;
  1314. this.formControlName = '';
  1315. this.valueChange = new EventEmitter();
  1316. }
  1317. writeValue(value) {
  1318. this.checked = value;
  1319. this.triggerMarkCheck();
  1320. }
  1321. onValueChange() {
  1322. // this.checked = true;
  1323. this.setValue(this.value);
  1324. this.valueChange.emit(this.value);
  1325. }
  1326. setValue(value) {
  1327. this.triggerChange(value);
  1328. }
  1329. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: RadioButtonComponent, deps: [{ token: i0.DestroyRef }, { token: i1$2.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
  1330. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: RadioButtonComponent, isStandalone: true, selector: "ct-radio-button", inputs: { key: "key", label: "label", value: "value", checked: "checked", formControlName: "formControlName" }, outputs: { valueChange: "valueChange" }, providers: [provideValueAccessor(forwardRef(() => RadioButtonComponent))], usesInheritance: true, ngImport: i0, template: "<input\n [id]=\"value\"\n class=\"hidden\"\n type=\"radio\"\n [name]=\"key\"\n [value]=\"value\"\n [checked]=\"checked\"\n (change)=\"onValueChange()\" />\n<label class=\"w-full grow cursor-pointer\" [for]=\"value\">\n <ct-button [text]=\"label\" [type]=\"checked ? 'secondary' : 'primary'\" [fullSize]=\"true\" (click)=\"onValueChange()\" />\n</label>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "ct-button", inputs: ["text", "icon", "iconPosition", "role", "disabled", "fullSize", "size", "type", "variant"] }], viewProviders: [provideControlContainer()], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  1331. }
  1332. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: RadioButtonComponent, decorators: [{
  1333. type: Component,
  1334. args: [{ selector: 'ct-radio-button', standalone: true, imports: [ButtonComponent], providers: [provideValueAccessor(forwardRef(() => RadioButtonComponent))], viewProviders: [provideControlContainer()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<input\n [id]=\"value\"\n class=\"hidden\"\n type=\"radio\"\n [name]=\"key\"\n [value]=\"value\"\n [checked]=\"checked\"\n (change)=\"onValueChange()\" />\n<label class=\"w-full grow cursor-pointer\" [for]=\"value\">\n <ct-button [text]=\"label\" [type]=\"checked ? 'secondary' : 'primary'\" [fullSize]=\"true\" (click)=\"onValueChange()\" />\n</label>\n" }]
  1335. }], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i1$2.FormGroupDirective, decorators: [{
  1336. type: Optional
  1337. }] }], propDecorators: { key: [{
  1338. type: Input
  1339. }], label: [{
  1340. type: Input
  1341. }], value: [{
  1342. type: Input
  1343. }], checked: [{
  1344. type: Input
  1345. }], formControlName: [{
  1346. type: Input
  1347. }], valueChange: [{
  1348. type: Output
  1349. }] } });
  1350. class RadioGroupComponent extends FormGenericComponent {
  1351. constructor(destroyRef, formGroupDirective) {
  1352. super(formGroupDirective);
  1353. this.destroyRef = destroyRef;
  1354. this.formGroupDirective = formGroupDirective;
  1355. this.formControlName = '';
  1356. this.key = '';
  1357. this.label = '';
  1358. this.value = '';
  1359. this.helper = '';
  1360. this.showError = false;
  1361. this.selected = new EventEmitter();
  1362. }
  1363. ngAfterContentInit() {
  1364. if (this.value)
  1365. this.writeValue(this.value);
  1366. this.radios.forEach(radio => radio.valueChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(value => this.setValue(value)));
  1367. }
  1368. writeValue(value) {
  1369. this.value = value;
  1370. if (this.radios)
  1371. this.updateRadios(value);
  1372. }
  1373. setValue(value) {
  1374. this.value = value;
  1375. this.updateRadios(value);
  1376. this.triggerChange(value);
  1377. this.selected.emit(value);
  1378. }
  1379. updateRadios(value) {
  1380. this.radios.forEach(radio => {
  1381. radio.writeValue(radio.value === value);
  1382. });
  1383. }
  1384. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: RadioGroupComponent, deps: [{ token: i0.DestroyRef }, { token: i1$2.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
  1385. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: RadioGroupComponent, isStandalone: true, selector: "ct-radio-group", inputs: { formControlName: "formControlName", key: "key", label: "label", value: "value", helper: "helper", showError: "showError" }, outputs: { selected: "selected" }, providers: [provideValueAccessor(forwardRef(() => RadioGroupComponent))], queries: [{ propertyName: "radios", predicate: RadioButtonComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"flex w-full flex-col gap-4\">\n @if (label) {\n <ct-form-label [text]=\"label\" [hasError]=\"hasErrors(formControl)\" [showError]=\"showError\" />\n }\n <div class=\"flex w-full flex-col justify-between gap-4 md:flex-row\">\n <ng-content select=\"ct-radio-button\" />\n </div>\n @if (formControl) {\n <ct-form-alert\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n", dependencies: [{ kind: "component", type: LabelComponent, selector: "ct-form-label", inputs: ["text", "type", "formControlName", "hasError", "showError"] }, { kind: "component", type: FormErrorComponent, selector: "ct-form-alert", inputs: ["errors", "size", "hasErrors", "fullSize", "helper", "errorMessages"] }], viewProviders: [provideControlContainer()], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  1386. }
  1387. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: RadioGroupComponent, decorators: [{
  1388. type: Component,
  1389. args: [{ selector: 'ct-radio-group', standalone: true, imports: [LabelComponent, FormErrorComponent], providers: [provideValueAccessor(forwardRef(() => RadioGroupComponent))], viewProviders: [provideControlContainer()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex w-full flex-col gap-4\">\n @if (label) {\n <ct-form-label [text]=\"label\" [hasError]=\"hasErrors(formControl)\" [showError]=\"showError\" />\n }\n <div class=\"flex w-full flex-col justify-between gap-4 md:flex-row\">\n <ng-content select=\"ct-radio-button\" />\n </div>\n @if (formControl) {\n <ct-form-alert\n [hasErrors]=\"hasErrors(formControl)\"\n [helper]=\"helper\"\n [errors]=\"formControl.errors ?? {}\"\n size=\"xs\" />\n }\n</div>\n" }]
  1390. }], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i1$2.FormGroupDirective, decorators: [{
  1391. type: Optional
  1392. }] }], propDecorators: { formControlName: [{
  1393. type: Input
  1394. }], key: [{
  1395. type: Input
  1396. }], label: [{
  1397. type: Input
  1398. }], value: [{
  1399. type: Input
  1400. }], helper: [{
  1401. type: Input
  1402. }], showError: [{
  1403. type: Input
  1404. }], selected: [{
  1405. type: Output
  1406. }], radios: [{
  1407. type: ContentChildren,
  1408. args: [RadioButtonComponent]
  1409. }] } });
  1410. class FormBase {
  1411. constructor(options = {}) {
  1412. this.value = options.value;
  1413. this.key = options.key || undefined;
  1414. this.label = options.label || '';
  1415. this.placeholder = options.placeholder || '';
  1416. this.required = !!options.required;
  1417. this.controlType = options.controlType || '';
  1418. this.options = options.options || [];
  1419. this.icon = options.icon || '';
  1420. }
  1421. }
  1422. class SelectFormBase extends FormBase {
  1423. constructor() {
  1424. super(...arguments);
  1425. this.controlType = 'select';
  1426. }
  1427. }
  1428. class InputFormBase extends FormBase {
  1429. constructor() {
  1430. super(...arguments);
  1431. this.controlType = 'input';
  1432. }
  1433. }
  1434. class ScreenSizeService {
  1435. constructor() {
  1436. this.destroyRef = inject(DestroyRef);
  1437. this.screenSizeSubject = new BehaviorSubject(this.getScreenSize());
  1438. this.screenSize$ = this.screenSizeSubject.asObservable();
  1439. fromEvent(window, 'resize')
  1440. .pipe(distinctUntilChanged(), debounceTime$1(200), map(() => this.getScreenSize()), startWith(this.getScreenSize()), tap(() => console.log('test updated')), takeUntilDestroyed(this.destroyRef))
  1441. .subscribe(this.screenSizeSubject);
  1442. }
  1443. getScreenSize() {
  1444. const width = window.innerWidth;
  1445. if (width < 640)
  1446. return 'xs';
  1447. if (width >= 640 && width < 768)
  1448. return 'sm';
  1449. if (width >= 768 && width < 1024)
  1450. return 'md';
  1451. if (width >= 1024 && width < 1280)
  1452. return 'lg';
  1453. if (width >= 1280 && width < 1536)
  1454. return 'xl';
  1455. return '2xl';
  1456. }
  1457. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ScreenSizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
  1458. static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ScreenSizeService, providedIn: 'root' }); }
  1459. }
  1460. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ScreenSizeService, decorators: [{
  1461. type: Injectable,
  1462. args: [{
  1463. providedIn: 'root',
  1464. }]
  1465. }], ctorParameters: () => [] });
  1466. /*
  1467. * Public API Surface of circletone
  1468. */
  1469. // Atoms
  1470. /**
  1471. * Generated bundle index. Do not edit.
  1472. */
  1473. export { AccordionComponent, AccordionItemComponent, AccordionRegistryService, AlertComponent, AutocompleteComponent, AvatarComponent, ButtonComponent, CardComponent, FormBase, HeaderComponent, IconButtonComponent, IconComponent, InputComponent, InputFormBase, InputNumberComponent, ListComponent, ListItemComponent, MenuComponent, MenuItemComponent, OverlayDirective, RadioButtonComponent, RadioGroupComponent, SafeImagePipe, ScreenSizeService, SelectComponent, SelectFormBase, TabButtonComponent, TabGroupComponent, TabPanelDirective, ToggleComponent, integerValidator };
  1474. //# sourceMappingURL=circletone.mjs.map