circletone.mjs 130 KB

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