circletone.mjs 130 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514
  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 =
  198. this.title
  199. .split(' ')
  200. .map(word => word[0]?.toLocaleUpperCase())
  201. .splice(0, 2)
  202. .join('') ?? '';
  203. }
  204. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  205. 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 }); }
  206. }
  207. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AvatarComponent, decorators: [{
  208. type: Component,
  209. 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" }]
  210. }], propDecorators: { picture: [{
  211. type: Input
  212. }], title: [{
  213. type: Input
  214. }], size: [{
  215. type: Input
  216. }], imageType: [{
  217. type: Input
  218. }] } });
  219. class IconButtonComponent {
  220. constructor() {
  221. this.icon = '';
  222. this.type = 'primary';
  223. this.variant = 'solid';
  224. this.size = 'base';
  225. this.role = 'button';
  226. this.disabled = false;
  227. }
  228. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: IconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  229. 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 }); }
  230. }
  231. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: IconButtonComponent, decorators: [{
  232. type: Component,
  233. 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" }]
  234. }], propDecorators: { icon: [{
  235. type: Input,
  236. args: [{ required: true }]
  237. }], type: [{
  238. type: Input,
  239. args: [{ transform: (value) => value }]
  240. }], variant: [{
  241. type: Input,
  242. args: [{ transform: (value) => value }]
  243. }], size: [{
  244. type: Input
  245. }], role: [{
  246. type: Input
  247. }], disabled: [{
  248. type: Input
  249. }] } });
  250. class HeaderComponent {
  251. constructor() {
  252. this.title = '';
  253. }
  254. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  255. 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 }); }
  256. }
  257. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: HeaderComponent, decorators: [{
  258. type: Component,
  259. 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" }]
  260. }], propDecorators: { title: [{
  261. type: Input
  262. }] } });
  263. class OverlayDirective {
  264. constructor(overlay, elementRef, viewContainerRef, destroyRef) {
  265. this.overlay = overlay;
  266. this.elementRef = elementRef;
  267. this.viewContainerRef = viewContainerRef;
  268. this.destroyRef = destroyRef;
  269. this.verticalPositions = {
  270. bottomStart: {
  271. originX: 'start',
  272. originY: 'bottom',
  273. overlayX: 'start',
  274. overlayY: 'top',
  275. panelClass: 'vertical-overlay',
  276. },
  277. topStart: {
  278. originX: 'start',
  279. originY: 'top',
  280. overlayX: 'start',
  281. overlayY: 'bottom',
  282. panelClass: 'vertical-overlay',
  283. },
  284. bottomEnd: {
  285. originX: 'end',
  286. originY: 'bottom',
  287. overlayX: 'end',
  288. overlayY: 'top',
  289. panelClass: 'vertical-overlay',
  290. },
  291. topEnd: {
  292. originX: 'end',
  293. originY: 'top',
  294. overlayX: 'end',
  295. overlayY: 'bottom',
  296. panelClass: 'vertical-overlay',
  297. },
  298. };
  299. this.horizontalPositions = {
  300. bottomStart: {
  301. originX: 'end',
  302. originY: 'bottom',
  303. overlayX: 'start',
  304. overlayY: 'bottom',
  305. offsetY: 7,
  306. },
  307. topStart: {
  308. originX: 'start',
  309. originY: 'bottom',
  310. overlayX: 'end',
  311. overlayY: 'bottom',
  312. },
  313. };
  314. this.overlayRef = null;
  315. this.position = 'horizontal';
  316. this.closeOnClick = false;
  317. this.opened = new EventEmitter();
  318. this.closed = new EventEmitter();
  319. }
  320. show() {
  321. this.openDropdown();
  322. this.opened.emit();
  323. }
  324. openDropdown() {
  325. if (!this.overlayRef) {
  326. this.overlayRef = this.overlay.create({
  327. positionStrategy: this.getOverlayPosition(),
  328. });
  329. this.overlayRef
  330. .outsidePointerEvents()
  331. .pipe(takeUntilDestroyed(this.destroyRef), debounceTime(100))
  332. .subscribe(() => {
  333. this.closeDropdown();
  334. this.closed.emit();
  335. });
  336. fromEvent(this.overlayRef.hostElement, 'click')
  337. .pipe(takeUntilDestroyed(this.destroyRef))
  338. .subscribe(() => {
  339. if (this.closeOnClick)
  340. this.closeDropdown();
  341. });
  342. }
  343. if (this.contentTemplate && !this.overlayRef.hasAttached()) {
  344. const portal = new TemplatePortal(this.contentTemplate, this.viewContainerRef);
  345. this.overlayRef.attach(portal);
  346. }
  347. }
  348. closeDropdown() {
  349. if (this.overlayRef?.hasAttached()) {
  350. this.overlayRef.detach();
  351. }
  352. }
  353. getOverlayPosition() {
  354. const positions = this.position === 'horizontal' ? this.horizontalPositions : this.verticalPositions;
  355. return this.overlay
  356. .position()
  357. .flexibleConnectedTo(this.elementRef)
  358. .withPositions(Object.keys(positions).map(positionKey => positions[positionKey]));
  359. }
  360. 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 }); }
  361. 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 }); }
  362. }
  363. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: OverlayDirective, decorators: [{
  364. type: Directive,
  365. args: [{
  366. selector: '[ctOverlay]',
  367. standalone: true,
  368. }]
  369. }], ctorParameters: () => [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.DestroyRef }], propDecorators: { contentTemplate: [{
  370. type: Input,
  371. args: ['ctOverlay']
  372. }], position: [{
  373. type: Input,
  374. args: ['ctOverlayPosition']
  375. }], closeOnClick: [{
  376. type: Input,
  377. args: ['ctOverlayCloseOnClick']
  378. }], opened: [{
  379. type: Output
  380. }], closed: [{
  381. type: Output
  382. }], show: [{
  383. type: HostListener,
  384. args: ['click']
  385. }] } });
  386. class MenuComponent {
  387. constructor() {
  388. this.direction = 'vertical';
  389. this.iconDirection = 'horizontal';
  390. this.type = 'primary';
  391. this.variant = 'solid';
  392. this.gap = 2;
  393. this.fullSize = true;
  394. this.iconAlone = false;
  395. this.menusAppearVertical = false;
  396. }
  397. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  398. 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 }); }
  399. }
  400. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MenuComponent, decorators: [{
  401. type: Component,
  402. 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" }]
  403. }], propDecorators: { direction: [{
  404. type: Input
  405. }], iconDirection: [{
  406. type: Input
  407. }], type: [{
  408. type: Input
  409. }], variant: [{
  410. type: Input
  411. }], gap: [{
  412. type: Input
  413. }], fullSize: [{
  414. type: Input
  415. }], iconAlone: [{
  416. type: Input
  417. }], menusAppearVertical: [{
  418. type: Input
  419. }] } });
  420. class MenuItemComponent {
  421. constructor() {
  422. this.text = '';
  423. this.link = '';
  424. this.type = 'internal';
  425. this.size = 'base';
  426. this.icon = '';
  427. this.iconSize = 'base';
  428. this.iconAlone = false;
  429. this.iconDirection = 'horizontal';
  430. this.hasSubmenu = false;
  431. this.submenuPosition = 'horizontal';
  432. this.isActive = false;
  433. this.isOpen = new BehaviorSubject(false);
  434. }
  435. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  436. 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 }); }
  437. }
  438. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MenuItemComponent, decorators: [{
  439. type: Component,
  440. 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" }]
  441. }], propDecorators: { text: [{
  442. type: Input
  443. }], link: [{
  444. type: Input
  445. }], type: [{
  446. type: Input,
  447. args: [{ required: true }]
  448. }], size: [{
  449. type: Input
  450. }], icon: [{
  451. type: Input
  452. }], iconSize: [{
  453. type: Input
  454. }], iconAlone: [{
  455. type: Input
  456. }], iconDirection: [{
  457. type: Input
  458. }], hasSubmenu: [{
  459. type: Input
  460. }], submenuPosition: [{
  461. type: Input
  462. }], isActive: [{
  463. type: Input
  464. }], menus: [{
  465. type: ContentChildren,
  466. args: [MenuComponent]
  467. }] } });
  468. class AccordionRegistryService {
  469. constructor() {
  470. this.accordions = new Map();
  471. }
  472. register(id, element) {
  473. this.accordions.set(id, element);
  474. }
  475. get(id) {
  476. return this.accordions.get(id);
  477. }
  478. unregister(id) {
  479. this.accordions.delete(id);
  480. }
  481. getItem(accordionId, itemId) {
  482. const accordionObject = this.accordions.get(accordionId);
  483. return accordionObject.accordionItems.find(item => item.id === itemId);
  484. }
  485. openItem(accordionId, itemId) {
  486. this.getItem(accordionId, itemId)?.isOpen.next(true);
  487. }
  488. closeItem(accordionId, itemId) {
  489. this.getItem(accordionId, itemId)?.isOpen.next(false);
  490. }
  491. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
  492. static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionRegistryService, providedIn: 'any' }); }
  493. }
  494. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionRegistryService, decorators: [{
  495. type: Injectable,
  496. args: [{ providedIn: 'any' }]
  497. }] });
  498. class AccordionComponent {
  499. constructor(parent) {
  500. this.parent = parent;
  501. this.destroyRef = inject(DestroyRef);
  502. this.accordionRegistryService = inject(AccordionRegistryService);
  503. this.label = '';
  504. this.policy = 'collapse';
  505. this.gap = 0;
  506. }
  507. ngAfterViewInit() {
  508. this.accordionItems.forEach(accordionItem => {
  509. accordionItem.isOpen
  510. .pipe(takeUntilDestroyed(this.destroyRef), skip(1), filter(isOpen => isOpen), debounceTime(10))
  511. .subscribe(() => {
  512. if (this.parent) {
  513. this.parent?.isOpen.next(true);
  514. }
  515. if (this.policy === 'collapse') {
  516. this.accordionItems.forEach(otherAccordionItem => {
  517. if (accordionItem.id !== otherAccordionItem.id && otherAccordionItem.isOpen.getValue()) {
  518. otherAccordionItem.isOpen.next(false);
  519. }
  520. });
  521. }
  522. });
  523. });
  524. this.accordionRegistryService.register(this.id, this);
  525. }
  526. ngOnDestroy() {
  527. this.accordionRegistryService.unregister(this.id);
  528. }
  529. closePanes() {
  530. this.accordionItems.forEach(accordionItem => accordionItem.isOpen.next(false));
  531. }
  532. 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 }); }
  533. 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 }); }
  534. }
  535. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionComponent, decorators: [{
  536. type: Component,
  537. 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" }]
  538. }], ctorParameters: () => [{ type: AccordionItemComponent, decorators: [{
  539. type: Optional
  540. }, {
  541. type: SkipSelf
  542. }] }], propDecorators: { label: [{
  543. type: Input
  544. }], id: [{
  545. type: Input,
  546. args: [{ required: true }]
  547. }], policy: [{
  548. type: Input
  549. }], gap: [{
  550. type: Input
  551. }], accordionItems: [{
  552. type: ContentChildren,
  553. args: [AccordionItemComponent]
  554. }] } });
  555. class AccordionItemComponent {
  556. constructor() {
  557. this.destroyRef = inject(DestroyRef);
  558. this.id = '';
  559. this.label = '';
  560. this.isOpen = new BehaviorSubject(false);
  561. }
  562. ngAfterViewInit() {
  563. this.isOpen
  564. .pipe(takeUntilDestroyed(this.destroyRef), skip(1), filter(isOpen => !isOpen))
  565. .subscribe(() => {
  566. this.accordions.forEach(accordion => {
  567. accordion.closePanes();
  568. });
  569. });
  570. }
  571. togglePane() {
  572. this.isOpen.next(!this.isOpen.getValue());
  573. }
  574. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  575. 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 }); }
  576. }
  577. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AccordionItemComponent, decorators: [{
  578. type: Component,
  579. 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" }]
  580. }], propDecorators: { id: [{
  581. type: Input,
  582. args: [{ required: true }]
  583. }], label: [{
  584. type: Input
  585. }], headerTemplate: [{
  586. type: ContentChild,
  587. args: ['header']
  588. }], accordions: [{
  589. type: ContentChildren,
  590. args: [AccordionComponent]
  591. }] } });
  592. class TabButtonComponent {
  593. constructor() {
  594. this.key = '';
  595. this.title = '';
  596. this.subTitle = '';
  597. this.variant = 'solid';
  598. this.clicked = new EventEmitter();
  599. this.isActive = signal(false);
  600. }
  601. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  602. 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 }); }
  603. }
  604. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabButtonComponent, decorators: [{
  605. type: Component,
  606. 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" }]
  607. }], propDecorators: { key: [{
  608. type: Input,
  609. args: [{ required: true }]
  610. }], title: [{
  611. type: Input
  612. }], subTitle: [{
  613. type: Input
  614. }], variant: [{
  615. type: Input
  616. }], clicked: [{
  617. type: Output
  618. }] } });
  619. class ListItemComponent {
  620. constructor() {
  621. this.avatar = '';
  622. this.avatarSize = 'base';
  623. this.avatarType = 'image/webp';
  624. this.header = '';
  625. this.subHeader = '';
  626. this.subTitle = '';
  627. }
  628. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  629. 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 }); }
  630. }
  631. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ListItemComponent, decorators: [{
  632. type: Component,
  633. 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" }]
  634. }], propDecorators: { avatar: [{
  635. type: Input
  636. }], avatarSize: [{
  637. type: Input
  638. }], avatarType: [{
  639. type: Input
  640. }], header: [{
  641. type: Input
  642. }], subHeader: [{
  643. type: Input
  644. }], subTitle: [{
  645. type: Input
  646. }] } });
  647. class ListComponent {
  648. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  649. 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 }); }
  650. }
  651. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ListComponent, decorators: [{
  652. type: Component,
  653. 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" }]
  654. }] });
  655. class TabPanelDirective {
  656. constructor(elementRef, destroyRef, renderer) {
  657. this.elementRef = elementRef;
  658. this.destroyRef = destroyRef;
  659. this.renderer = renderer;
  660. this.ctTabPanel = '';
  661. this.hide = new EventEmitter();
  662. this.hide.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(hide => {
  663. this.renderer.addClass(this.elementRef.nativeElement, hide ? 'hidden' : 'flex');
  664. this.renderer.removeClass(this.elementRef.nativeElement, hide ? 'flex' : 'hidden');
  665. });
  666. }
  667. ngOnInit() {
  668. this.hide.next(true);
  669. }
  670. show() {
  671. this.renderer.addClass(this.elementRef.nativeElement, 'flex');
  672. this.renderer.removeClass(this.elementRef.nativeElement, 'hidden');
  673. }
  674. 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 }); }
  675. 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 }); }
  676. }
  677. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabPanelDirective, decorators: [{
  678. type: Directive,
  679. args: [{
  680. selector: '[ctTabPanel]',
  681. standalone: true,
  682. }]
  683. }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.DestroyRef }, { type: i0.Renderer2 }], propDecorators: { ctTabPanel: [{
  684. type: Input
  685. }], hide: [{
  686. type: Input
  687. }] } });
  688. class TabGroupComponent {
  689. constructor() {
  690. this.destroyRef = inject(DestroyRef);
  691. this.border = true;
  692. this.activeTab = '';
  693. }
  694. ngOnChanges(changes) {
  695. if (changes['activeTab'].previousValue !== this.activeTab) {
  696. this.setActiveTab(this.activeTab);
  697. }
  698. }
  699. ngAfterContentInit() {
  700. this.setActiveTab(this.activeTab);
  701. this.buttons.forEach(button => button.clicked.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(key => this.setActiveTab(key)));
  702. }
  703. setActiveTab(key) {
  704. if (this.panels && this.buttons) {
  705. this.panels.forEach(panel => {
  706. if (panel.ctTabPanel === key) {
  707. panel.show();
  708. this.getTabButtonTrigger(panel.ctTabPanel).isActive.set(true);
  709. }
  710. else {
  711. this.getTabButtonTrigger(panel.ctTabPanel).isActive.set(false);
  712. panel.hide.next(true);
  713. }
  714. });
  715. }
  716. }
  717. getTabButtonTrigger(key) {
  718. return this.buttons.find(panel => panel.key === key);
  719. }
  720. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  721. 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 }); }
  722. }
  723. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TabGroupComponent, decorators: [{
  724. type: Component,
  725. 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" }]
  726. }], propDecorators: { border: [{
  727. type: Input
  728. }], activeTab: [{
  729. type: Input
  730. }], buttons: [{
  731. type: ContentChildren,
  732. args: [TabButtonComponent]
  733. }], panels: [{
  734. type: ContentChildren,
  735. args: [TabPanelDirective]
  736. }] } });
  737. class CardComponent {
  738. constructor() {
  739. this.header = '';
  740. this.subHeader = '';
  741. this.title = '';
  742. this.subTitle = '';
  743. this.avatar = '';
  744. this.image = '';
  745. this.disposition = 'vertical';
  746. this.imageThumbnail = '';
  747. this.withActions = false;
  748. this.acceptButton = new EventEmitter();
  749. this.cancelButton = new EventEmitter();
  750. }
  751. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  752. 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 }); }
  753. }
  754. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: CardComponent, decorators: [{
  755. type: Component,
  756. 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" }]
  757. }], propDecorators: { header: [{
  758. type: Input
  759. }], subHeader: [{
  760. type: Input
  761. }], title: [{
  762. type: Input
  763. }], subTitle: [{
  764. type: Input
  765. }], avatar: [{
  766. type: Input
  767. }], image: [{
  768. type: Input
  769. }], disposition: [{
  770. type: Input
  771. }], imageThumbnail: [{
  772. type: Input
  773. }], withActions: [{
  774. type: Input
  775. }], acceptButton: [{
  776. type: Output
  777. }], cancelButton: [{
  778. type: Output
  779. }] } });
  780. class FormGenericComponent {
  781. constructor(formGroupDirective) {
  782. this.formGroupDirective = formGroupDirective;
  783. this.onChange = () => { };
  784. this.onTouched = () => { };
  785. this.changeDetectorRef = inject(ChangeDetectorRef);
  786. }
  787. hasErrors(formControl) {
  788. return (formControl && /*!formControl.pristine &&*/ formControl.touched && !!formControl.errors);
  789. }
  790. get formControl() {
  791. return this.formGroupDirective && this.formGroupDirective.form.get(this.formControlName);
  792. }
  793. registerOnChange(fn) {
  794. this.onChange = fn;
  795. }
  796. registerOnTouched(fn) {
  797. this.onTouched = fn;
  798. }
  799. triggerChange(value) {
  800. if (value && this.formControl)
  801. this.formControl.markAsDirty();
  802. this.onChange(value);
  803. }
  804. triggerTouched() {
  805. this.onTouched();
  806. }
  807. triggerMarkCheck() {
  808. this.changeDetectorRef.markForCheck();
  809. }
  810. triggerChangeDetection() {
  811. this.changeDetectorRef.detectChanges();
  812. }
  813. }
  814. class FormErrorComponent {
  815. constructor() {
  816. this.size = 'base';
  817. this.hasErrors = false;
  818. this.fullSize = false;
  819. this.helper = '';
  820. this.errorMessages = {};
  821. }
  822. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: FormErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  823. 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 }); }
  824. }
  825. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: FormErrorComponent, decorators: [{
  826. type: Component,
  827. 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" }]
  828. }], propDecorators: { errors: [{
  829. type: Input,
  830. args: [{ required: true }]
  831. }], size: [{
  832. type: Input
  833. }], hasErrors: [{
  834. type: Input
  835. }], fullSize: [{
  836. type: Input
  837. }], helper: [{
  838. type: Input
  839. }], errorMessages: [{
  840. type: Input
  841. }] } });
  842. class LabelComponent {
  843. constructor() {
  844. this.text = '';
  845. this.type = 'primary';
  846. this.formControlName = '';
  847. this.hasError = false;
  848. this.showError = false;
  849. }
  850. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  851. 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 }); }
  852. }
  853. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: LabelComponent, decorators: [{
  854. type: Component,
  855. 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" }]
  856. }], propDecorators: { text: [{
  857. type: Input,
  858. args: [{ required: true }]
  859. }], type: [{
  860. type: Input
  861. }], formControlName: [{
  862. type: Input
  863. }], hasError: [{
  864. type: Input
  865. }], showError: [{
  866. type: Input
  867. }] } });
  868. class OptionComponent {
  869. constructor() {
  870. this.label = '';
  871. this.icon = '';
  872. }
  873. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: OptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  874. 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 }); }
  875. }
  876. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: OptionComponent, decorators: [{
  877. type: Component,
  878. 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" }]
  879. }], propDecorators: { label: [{
  880. type: Input,
  881. args: [{ required: true }]
  882. }], icon: [{
  883. type: Input
  884. }] } });
  885. /**
  886. * Creates a value accessor provider for a form component.
  887. * @param component - The component that implements the NG_VALUE_ACCESSOR interface.
  888. * @returns An ExistingProvider object for the value accessor.
  889. */
  890. const provideValueAccessor = (component) => ({
  891. provide: NG_VALUE_ACCESSOR,
  892. useExisting: forwardRef(() => component),
  893. multi: true,
  894. });
  895. /**
  896. * Creates a control container provider using FormGroupDirective.
  897. * @returns An ExistingProvider object for the control container.
  898. */
  899. const provideControlContainer = () => ({
  900. provide: ControlContainer,
  901. useExisting: FormGroupDirective,
  902. });
  903. class InputComponent extends FormGenericComponent {
  904. onFocusOut() {
  905. this.triggerTouched();
  906. }
  907. constructor(formGroupDirective) {
  908. super(formGroupDirective);
  909. this.formGroupDirective = formGroupDirective;
  910. this.key = '';
  911. this.type = 'text';
  912. this.value = '';
  913. this.label = '';
  914. this.icon = '';
  915. this.helper = '';
  916. this.placeholder = '';
  917. this.symbol = '';
  918. this.canDelete = false;
  919. this.fullSize = true;
  920. this.showError = false;
  921. this.iconPosition = 'left';
  922. this.disposition = 'vertical';
  923. this.typed = new EventEmitter();
  924. this.showDelete$ = new BehaviorSubject(false);
  925. }
  926. input(event) {
  927. const value = event.target.value;
  928. if (this.canDelete) {
  929. this.showDelete$.next(!!value);
  930. }
  931. this.setValue(value);
  932. }
  933. clearValue() {
  934. this.showDelete$.next(false);
  935. this.triggerTouched();
  936. this.setValue(null);
  937. }
  938. setValue(value, propagate = true) {
  939. this.value = value;
  940. if (propagate) {
  941. this.triggerChange(value);
  942. this.typed.emit(value);
  943. }
  944. }
  945. writeValue(value) {
  946. if (value && this.canDelete)
  947. this.showDelete$.next(true);
  948. this.triggerMarkCheck();
  949. this.setValue(value, false);
  950. }
  951. 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 }); }
  952. 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 }); }
  953. }
  954. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: InputComponent, decorators: [{
  955. type: Component,
  956. 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" }]
  957. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective, decorators: [{
  958. type: Optional
  959. }] }], propDecorators: { formControlName: [{
  960. type: Input
  961. }], key: [{
  962. type: Input
  963. }], type: [{
  964. type: Input
  965. }], value: [{
  966. type: Input
  967. }], label: [{
  968. type: Input
  969. }], icon: [{
  970. type: Input
  971. }], helper: [{
  972. type: Input
  973. }], placeholder: [{
  974. type: Input
  975. }], symbol: [{
  976. type: Input
  977. }], canDelete: [{
  978. type: Input
  979. }], fullSize: [{
  980. type: Input
  981. }], showError: [{
  982. type: Input
  983. }], min: [{
  984. type: Input
  985. }], max: [{
  986. type: Input
  987. }], iconPosition: [{
  988. type: Input
  989. }], disposition: [{
  990. type: Input
  991. }], typed: [{
  992. type: Output
  993. }], onFocusOut: [{
  994. type: HostListener,
  995. args: ['focusout']
  996. }] } });
  997. class AutocompleteComponent extends FormGenericComponent {
  998. constructor(formGroupDirective) {
  999. super(formGroupDirective);
  1000. this.destroyRef = inject(DestroyRef);
  1001. this.key = '';
  1002. this.options = [];
  1003. this.label = '';
  1004. this.icon = '';
  1005. this.helper = '';
  1006. this.placeholder = '';
  1007. this.value = '';
  1008. this.inputValue = '';
  1009. this.iconPosition = 'left';
  1010. this.disposition = 'vertical';
  1011. this.fullSize = true;
  1012. this.multiple = false;
  1013. this.showError = false;
  1014. this.typed = new EventEmitter();
  1015. this.selected = new EventEmitter();
  1016. this.focusOut$ = new Subject();
  1017. this.inputValue$ = new BehaviorSubject('');
  1018. this.focusOut$.pipe(takeUntilDestroyed(this.destroyRef), debounceTime(150)).subscribe(() => {
  1019. this.options = [];
  1020. this.triggerTouched();
  1021. this.triggerMarkCheck();
  1022. });
  1023. }
  1024. input(value) {
  1025. if (!value)
  1026. this.options = [];
  1027. if (this.value && !this.multiple) {
  1028. this.setValue(null);
  1029. this.inputValue$.next('');
  1030. return;
  1031. }
  1032. if (this.multiple) {
  1033. this.inputValue$.next(value);
  1034. }
  1035. this.typed.emit(value);
  1036. }
  1037. setValue(value, propagate = true) {
  1038. this.value = value;
  1039. if (propagate) {
  1040. this.triggerChange(value);
  1041. this.selected.emit(value);
  1042. }
  1043. if (value) {
  1044. const selectedOption = this.options.find(option => option.key === value);
  1045. if (!this.multiple)
  1046. this.inputValue$.next(selectedOption ? selectedOption.label : this.placeholder);
  1047. else {
  1048. const currentWords = this.inputValue$.getValue().split(' ');
  1049. // replacing the last word with the current 'label' value
  1050. currentWords[currentWords.length - 1] = selectedOption ? selectedOption.label : this.placeholder;
  1051. this.inputValue$.next(currentWords.join(' '));
  1052. }
  1053. }
  1054. }
  1055. writeValue(value) {
  1056. this.triggerMarkCheck();
  1057. this.setValue(value, false);
  1058. }
  1059. 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 }); }
  1060. 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 }); }
  1061. }
  1062. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: AutocompleteComponent, decorators: [{
  1063. type: Component,
  1064. 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" }]
  1065. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective }], propDecorators: { formControlName: [{
  1066. type: Input
  1067. }], key: [{
  1068. type: Input,
  1069. args: [{ required: true }]
  1070. }], options: [{
  1071. type: Input,
  1072. args: [{ required: true }]
  1073. }], label: [{
  1074. type: Input
  1075. }], icon: [{
  1076. type: Input
  1077. }], helper: [{
  1078. type: Input
  1079. }], placeholder: [{
  1080. type: Input
  1081. }], value: [{
  1082. type: Input
  1083. }], inputValue: [{
  1084. type: Input
  1085. }], iconPosition: [{
  1086. type: Input
  1087. }], disposition: [{
  1088. type: Input
  1089. }], fullSize: [{
  1090. type: Input
  1091. }], multiple: [{
  1092. type: Input
  1093. }], showError: [{
  1094. type: Input
  1095. }], typed: [{
  1096. type: Output
  1097. }], selected: [{
  1098. type: Output
  1099. }] } });
  1100. class SelectComponent extends FormGenericComponent {
  1101. constructor(formGroupDirective, destroyRef) {
  1102. super(formGroupDirective);
  1103. this.formGroupDirective = formGroupDirective;
  1104. this.destroyRef = destroyRef;
  1105. this.focusOut$ = new Subject();
  1106. this.isOpen = false;
  1107. this.option = '';
  1108. this.key = '';
  1109. this.options = [];
  1110. this.label = '';
  1111. this.helper = '';
  1112. this.placeholder = '';
  1113. this.value = '';
  1114. this.disposition = 'vertical';
  1115. this.fullSize = true;
  1116. this.showError = false;
  1117. this.selected = new EventEmitter();
  1118. }
  1119. ngOnInit() {
  1120. this.selectOption(this.value, false);
  1121. this.focusOut$.pipe(takeUntilDestroyed(this.destroyRef), debounceTime(200)).subscribe(() => {
  1122. this.triggerMarkCheck();
  1123. this.close();
  1124. });
  1125. }
  1126. ngOnChanges(changes) {
  1127. if (changes['options'])
  1128. this.selectOption(this.value, false);
  1129. }
  1130. toggle() {
  1131. this.isOpen = !this.isOpen;
  1132. if (!this.isOpen) {
  1133. this.triggerTouched();
  1134. }
  1135. }
  1136. close() {
  1137. this.isOpen = false;
  1138. this.triggerTouched();
  1139. }
  1140. selectOption(key, propagate = true) {
  1141. const selectedOption = this.options.find(option => option.key === key);
  1142. this.option = key === null ? this.placeholder : selectedOption?.label;
  1143. if (propagate) {
  1144. this.selected.emit(key);
  1145. this.triggerChange(selectedOption?.key ?? null);
  1146. this.close();
  1147. }
  1148. }
  1149. writeValue(value) {
  1150. this.triggerMarkCheck();
  1151. this.selectOption(value, false);
  1152. }
  1153. 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 }); }
  1154. 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 }); }
  1155. }
  1156. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SelectComponent, decorators: [{
  1157. type: Component,
  1158. args: [{ selector: 'ct-select', standalone: true, imports: [
  1159. OptionComponent,
  1160. ButtonComponent,
  1161. IconComponent,
  1162. LabelComponent,
  1163. AlertComponent,
  1164. FormErrorComponent,
  1165. OverlayDirective,
  1166. ], 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"] }]
  1167. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective, decorators: [{
  1168. type: Optional
  1169. }] }, { type: i0.DestroyRef }], propDecorators: { formControlName: [{
  1170. type: Input
  1171. }], key: [{
  1172. type: Input
  1173. }], options: [{
  1174. type: Input,
  1175. args: [{ required: true }]
  1176. }], label: [{
  1177. type: Input
  1178. }], helper: [{
  1179. type: Input
  1180. }], placeholder: [{
  1181. type: Input
  1182. }], value: [{
  1183. type: Input
  1184. }], disposition: [{
  1185. type: Input
  1186. }], fullSize: [{
  1187. type: Input
  1188. }], showError: [{
  1189. type: Input
  1190. }], selected: [{
  1191. type: Output
  1192. }], trigger: [{
  1193. type: ViewChild,
  1194. args: ['triggerElement']
  1195. }], panel: [{
  1196. type: ViewChild,
  1197. args: ['optionsPanel']
  1198. }] } });
  1199. function integerValidator() {
  1200. return (control) => {
  1201. if (control.value !== null && !Number.isInteger(Number(control.value))) {
  1202. return { notInteger: true };
  1203. }
  1204. return null;
  1205. };
  1206. }
  1207. class InputNumberComponent extends InputComponent {
  1208. constructor(formGroupDirective) {
  1209. super(formGroupDirective);
  1210. this.formGroupDirective = formGroupDirective;
  1211. this.decimalPipe = inject(DecimalPipe);
  1212. this.validate = 'integer';
  1213. }
  1214. onFocusOut() {
  1215. this.formatNumber();
  1216. this.triggerTouched();
  1217. }
  1218. onFocusIn() {
  1219. this.reverseFormatNumber();
  1220. }
  1221. ngOnInit() {
  1222. if (this.formControl && this.validate === 'integer')
  1223. this.formControl.addValidators(integerValidator());
  1224. }
  1225. ngAfterViewInit() {
  1226. this.formatNumber();
  1227. this.triggerChangeDetection();
  1228. }
  1229. formatNumber() {
  1230. try {
  1231. this.value = this.decimalPipe.transform(this.value, '1.0-2') || '';
  1232. }
  1233. catch (_error) {
  1234. return;
  1235. }
  1236. }
  1237. reverseFormatNumber() {
  1238. this.value = !isNaN(parseFloat(this.value.replace(/[^0-9.-]/g, '')))
  1239. ? parseFloat(this.value.replace(/[^0-9.-]/g, ''))
  1240. : '';
  1241. }
  1242. 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 }); }
  1243. 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 }); }
  1244. }
  1245. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: InputNumberComponent, decorators: [{
  1246. type: Component,
  1247. 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" }]
  1248. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective, decorators: [{
  1249. type: Optional
  1250. }] }], propDecorators: { validate: [{
  1251. type: Input
  1252. }], onFocusOut: [{
  1253. type: HostListener,
  1254. args: ['focusout']
  1255. }], onFocusIn: [{
  1256. type: HostListener,
  1257. args: ['focusin']
  1258. }] } });
  1259. class ToggleComponent extends FormGenericComponent {
  1260. constructor(formGroupDirective, destroyRef) {
  1261. super(formGroupDirective);
  1262. this.formGroupDirective = formGroupDirective;
  1263. this.destroyRef = destroyRef;
  1264. this.formControlName = '';
  1265. this.checked = false;
  1266. this.label = '';
  1267. this.key = '';
  1268. this.value = '';
  1269. this.showError = false;
  1270. this.disposition = 'horizontal';
  1271. this.wasChecked = new EventEmitter();
  1272. }
  1273. toggle() {
  1274. this.checked = !this.checked;
  1275. this.triggerChange(this.checked);
  1276. this.wasChecked.emit(this.checked);
  1277. }
  1278. writeValue(value) {
  1279. this.triggerMarkCheck();
  1280. this.checked = value === this.value;
  1281. }
  1282. 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 }); }
  1283. 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 }); }
  1284. }
  1285. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ToggleComponent, decorators: [{
  1286. type: Component,
  1287. 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" }]
  1288. }], ctorParameters: () => [{ type: i1$2.FormGroupDirective, decorators: [{
  1289. type: Optional
  1290. }] }, { type: i0.DestroyRef }], propDecorators: { formControlName: [{
  1291. type: Input
  1292. }], checked: [{
  1293. type: Input
  1294. }], label: [{
  1295. type: Input
  1296. }], key: [{
  1297. type: Input
  1298. }], value: [{
  1299. type: Input
  1300. }], showError: [{
  1301. type: Input
  1302. }], disposition: [{
  1303. type: Input
  1304. }], wasChecked: [{
  1305. type: Output
  1306. }] } });
  1307. class RadioButtonComponent extends FormGenericComponent {
  1308. constructor(destroyRef, formGroupDirective) {
  1309. super(formGroupDirective);
  1310. this.destroyRef = destroyRef;
  1311. this.formGroupDirective = formGroupDirective;
  1312. this.key = '';
  1313. this.label = '';
  1314. this.checked = false;
  1315. this.formControlName = '';
  1316. this.valueChange = new EventEmitter();
  1317. }
  1318. writeValue(value) {
  1319. this.checked = value;
  1320. this.triggerMarkCheck();
  1321. }
  1322. onValueChange() {
  1323. // this.checked = true;
  1324. this.setValue(this.value);
  1325. this.valueChange.emit(this.value);
  1326. }
  1327. setValue(value) {
  1328. this.triggerChange(value);
  1329. }
  1330. 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 }); }
  1331. 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 }); }
  1332. }
  1333. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: RadioButtonComponent, decorators: [{
  1334. type: Component,
  1335. 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" }]
  1336. }], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i1$2.FormGroupDirective, decorators: [{
  1337. type: Optional
  1338. }] }], propDecorators: { key: [{
  1339. type: Input
  1340. }], label: [{
  1341. type: Input
  1342. }], value: [{
  1343. type: Input
  1344. }], checked: [{
  1345. type: Input
  1346. }], formControlName: [{
  1347. type: Input
  1348. }], valueChange: [{
  1349. type: Output
  1350. }] } });
  1351. class RadioGroupComponent extends FormGenericComponent {
  1352. constructor(destroyRef, formGroupDirective) {
  1353. super(formGroupDirective);
  1354. this.destroyRef = destroyRef;
  1355. this.formGroupDirective = formGroupDirective;
  1356. this.formControlName = '';
  1357. this.key = '';
  1358. this.label = '';
  1359. this.value = '';
  1360. this.helper = '';
  1361. this.showError = false;
  1362. this.selected = new EventEmitter();
  1363. }
  1364. ngAfterContentInit() {
  1365. if (this.value)
  1366. this.writeValue(this.value);
  1367. this.radios.forEach(radio => radio.valueChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(value => this.setValue(value)));
  1368. }
  1369. writeValue(value) {
  1370. this.value = value;
  1371. if (this.radios)
  1372. this.updateRadios(value);
  1373. }
  1374. setValue(value) {
  1375. this.value = value;
  1376. this.updateRadios(value);
  1377. this.triggerChange(value);
  1378. this.selected.emit(value);
  1379. }
  1380. updateRadios(value) {
  1381. this.radios.forEach(radio => {
  1382. radio.writeValue(radio.value === value);
  1383. });
  1384. }
  1385. 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 }); }
  1386. 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 }); }
  1387. }
  1388. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: RadioGroupComponent, decorators: [{
  1389. type: Component,
  1390. 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" }]
  1391. }], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i1$2.FormGroupDirective, decorators: [{
  1392. type: Optional
  1393. }] }], propDecorators: { formControlName: [{
  1394. type: Input
  1395. }], key: [{
  1396. type: Input
  1397. }], label: [{
  1398. type: Input
  1399. }], value: [{
  1400. type: Input
  1401. }], helper: [{
  1402. type: Input
  1403. }], showError: [{
  1404. type: Input
  1405. }], selected: [{
  1406. type: Output
  1407. }], radios: [{
  1408. type: ContentChildren,
  1409. args: [RadioButtonComponent]
  1410. }] } });
  1411. class FormBase {
  1412. constructor(options = {}) {
  1413. this.value = options.value;
  1414. this.key = options.key || undefined;
  1415. this.label = options.label || '';
  1416. this.placeholder = options.placeholder || '';
  1417. this.required = !!options.required;
  1418. this.controlType = options.controlType || '';
  1419. this.options = options.options || [];
  1420. this.icon = options.icon || '';
  1421. }
  1422. }
  1423. class SelectFormBase extends FormBase {
  1424. constructor() {
  1425. super(...arguments);
  1426. this.controlType = 'select';
  1427. }
  1428. }
  1429. class InputFormBase extends FormBase {
  1430. constructor() {
  1431. super(...arguments);
  1432. this.controlType = 'input';
  1433. }
  1434. }
  1435. class ScreenSizeService {
  1436. constructor() {
  1437. this.destroyRef = inject(DestroyRef);
  1438. this.screenSizeSubject = new BehaviorSubject(this.getScreenSize());
  1439. this.screenSize$ = this.screenSizeSubject.asObservable();
  1440. fromEvent(window, 'resize')
  1441. .pipe(distinctUntilChanged(), debounceTime$1(200), map(() => this.getScreenSize()), startWith(this.getScreenSize()), tap(() => console.log('test updated')), takeUntilDestroyed(this.destroyRef))
  1442. .subscribe(this.screenSizeSubject);
  1443. }
  1444. getScreenSize() {
  1445. const width = window.innerWidth;
  1446. if (width < 640)
  1447. return 'xs';
  1448. if (width >= 640 && width < 768)
  1449. return 'sm';
  1450. if (width >= 768 && width < 1024)
  1451. return 'md';
  1452. if (width >= 1024 && width < 1280)
  1453. return 'lg';
  1454. if (width >= 1280 && width < 1536)
  1455. return 'xl';
  1456. return '2xl';
  1457. }
  1458. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ScreenSizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
  1459. static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ScreenSizeService, providedIn: 'root' }); }
  1460. }
  1461. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: ScreenSizeService, decorators: [{
  1462. type: Injectable,
  1463. args: [{
  1464. providedIn: 'root',
  1465. }]
  1466. }], ctorParameters: () => [] });
  1467. /*
  1468. * Public API Surface of circletone
  1469. */
  1470. // Atoms
  1471. /**
  1472. * Generated bundle index. Do not edit.
  1473. */
  1474. 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 };
  1475. //# sourceMappingURL=circletone.mjs.map