ngwr 4.2.2 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/checkbox/checkbox.component.d.ts +17 -17
  2. package/esm2022/alert/alert.component.mjs +3 -3
  3. package/esm2022/alert/alert.module.mjs +4 -4
  4. package/esm2022/avatar/avatar.component.mjs +3 -3
  5. package/esm2022/avatar/avatar.module.mjs +4 -4
  6. package/esm2022/button/button-group.component.mjs +3 -3
  7. package/esm2022/button/button.component.mjs +3 -3
  8. package/esm2022/button/button.module.mjs +4 -4
  9. package/esm2022/cdk/base.directive.mjs +3 -3
  10. package/esm2022/checkbox/checkbox.component.mjs +29 -30
  11. package/esm2022/checkbox/checkbox.module.mjs +4 -4
  12. package/esm2022/dialog/dialog-base.directive.mjs +3 -3
  13. package/esm2022/dialog/dialog-close.directive.mjs +3 -3
  14. package/esm2022/dialog/dialog-content.directive.mjs +3 -3
  15. package/esm2022/dialog/dialog-footer.directive.mjs +3 -3
  16. package/esm2022/dialog/dialog-title.directive.mjs +3 -3
  17. package/esm2022/dialog/dialog.component.mjs +3 -3
  18. package/esm2022/dialog/dialog.module.mjs +4 -4
  19. package/esm2022/dialog/dialog.service.mjs +3 -3
  20. package/esm2022/divider/divider.component.mjs +3 -3
  21. package/esm2022/divider/divider.module.mjs +4 -4
  22. package/esm2022/form/form-error.component.mjs +3 -3
  23. package/esm2022/form/form-item.component.mjs +3 -3
  24. package/esm2022/form/form.module.mjs +4 -4
  25. package/esm2022/icon/icon.component.mjs +3 -3
  26. package/esm2022/icon/icon.module.mjs +4 -4
  27. package/esm2022/icon/icon.service.mjs +6 -6
  28. package/esm2022/input/input.component.mjs +3 -3
  29. package/esm2022/input/input.module.mjs +4 -4
  30. package/esm2022/pipes/new-array.pipe.mjs +3 -3
  31. package/esm2022/pipes/pipes.module.mjs +4 -4
  32. package/esm2022/progress/progress.component.mjs +3 -3
  33. package/esm2022/progress/progress.module.mjs +4 -4
  34. package/esm2022/qr/qr.component.mjs +3 -3
  35. package/esm2022/qr/qr.module.mjs +4 -4
  36. package/esm2022/skeleton/skeleton.component.mjs +3 -3
  37. package/esm2022/skeleton/skeleton.module.mjs +4 -4
  38. package/esm2022/spinner/spinner.component.mjs +3 -3
  39. package/esm2022/spinner/spinner.module.mjs +4 -4
  40. package/esm2022/tag/tag.component.mjs +3 -3
  41. package/esm2022/tag/tag.module.mjs +4 -4
  42. package/esm2022/textarea/index.mjs +8 -0
  43. package/esm2022/textarea/ngwr-textarea.mjs +5 -0
  44. package/esm2022/textarea/public-api.mjs +9 -0
  45. package/esm2022/textarea/textarea.component.mjs +145 -0
  46. package/esm2022/textarea/textarea.module.mjs +22 -0
  47. package/fesm2022/ngwr-alert.mjs +7 -7
  48. package/fesm2022/ngwr-alert.mjs.map +1 -1
  49. package/fesm2022/ngwr-avatar.mjs +7 -7
  50. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  51. package/fesm2022/ngwr-button.mjs +10 -10
  52. package/fesm2022/ngwr-button.mjs.map +1 -1
  53. package/fesm2022/ngwr-cdk-rxjs.mjs.map +1 -1
  54. package/fesm2022/ngwr-cdk-utils.mjs.map +1 -1
  55. package/fesm2022/ngwr-cdk.mjs +3 -3
  56. package/fesm2022/ngwr-cdk.mjs.map +1 -1
  57. package/fesm2022/ngwr-checkbox.mjs +32 -33
  58. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  59. package/fesm2022/ngwr-dialog.mjs +25 -25
  60. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  61. package/fesm2022/ngwr-divider.mjs +7 -7
  62. package/fesm2022/ngwr-divider.mjs.map +1 -1
  63. package/fesm2022/ngwr-form.mjs +10 -10
  64. package/fesm2022/ngwr-form.mjs.map +1 -1
  65. package/fesm2022/ngwr-icon.mjs +13 -13
  66. package/fesm2022/ngwr-icon.mjs.map +1 -1
  67. package/fesm2022/ngwr-input.mjs +7 -7
  68. package/fesm2022/ngwr-input.mjs.map +1 -1
  69. package/fesm2022/ngwr-pipes.mjs +7 -7
  70. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  71. package/fesm2022/ngwr-progress.mjs +7 -7
  72. package/fesm2022/ngwr-progress.mjs.map +1 -1
  73. package/fesm2022/ngwr-qr.mjs +7 -7
  74. package/fesm2022/ngwr-qr.mjs.map +1 -1
  75. package/fesm2022/ngwr-skeleton.mjs +7 -7
  76. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  77. package/fesm2022/ngwr-spinner.mjs +7 -7
  78. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  79. package/fesm2022/ngwr-tag.mjs +7 -7
  80. package/fesm2022/ngwr-tag.mjs.map +1 -1
  81. package/fesm2022/ngwr-textarea.mjs +185 -0
  82. package/fesm2022/ngwr-textarea.mjs.map +1 -0
  83. package/package.json +16 -7
  84. package/styles.scss +1 -0
  85. package/textarea/index.d.ts +7 -0
  86. package/textarea/public-api.d.ts +8 -0
  87. package/textarea/styles/_index.scss +77 -0
  88. package/textarea/styles/vars.scss +17 -0
  89. package/textarea/textarea.component.d.ts +44 -0
  90. package/textarea/textarea.module.d.ts +7 -0
@@ -39,10 +39,10 @@ class WrAlertComponent {
39
39
  onClose() {
40
40
  this.isClosed.set(true);
41
41
  }
42
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.4", type: WrAlertComponent, isStandalone: true, selector: "wr-alert", inputs: { title: "title", message: "message", type: "type", closeable: ["closeable", "closeable", booleanAttribute] }, host: { properties: { "class": "this.elClasses" } }, providers: [provideWrIcons([close])], ngImport: i0, template: "@if (!isClosed()) {\n <div class=\"wr-alert__wrapper\">\n <div class=\"wr-alert__body\">\n <p class=\"wr-alert__title\">{{ title }}</p>\n @if (message) {\n <p class=\"wr-alert__message\">{{ message }}</p>\n }\n </div>\n\n @if (closeable) {\n <div class=\"wr-alert-close\">\n <wr-icon name=\"close\" (click)=\"onClose()\"></wr-icon>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: WrIconModule }, { kind: "component", type: i1.WrIconComponent, selector: "wr-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: WrAlertComponent, isStandalone: true, selector: "wr-alert", inputs: { title: "title", message: "message", type: "type", closeable: ["closeable", "closeable", booleanAttribute] }, host: { properties: { "class": "this.elClasses" } }, providers: [provideWrIcons([close])], ngImport: i0, template: "@if (!isClosed()) {\n <div class=\"wr-alert__wrapper\">\n <div class=\"wr-alert__body\">\n <p class=\"wr-alert__title\">{{ title }}</p>\n @if (message) {\n <p class=\"wr-alert__message\">{{ message }}</p>\n }\n </div>\n\n @if (closeable) {\n <div class=\"wr-alert-close\">\n <wr-icon name=\"close\" (click)=\"onClose()\"></wr-icon>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: WrIconModule }, { kind: "component", type: i1.WrIconComponent, selector: "wr-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
44
44
  }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAlertComponent, decorators: [{
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAlertComponent, decorators: [{
46
46
  type: Component,
47
47
  args: [{ standalone: true, selector: 'wr-alert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [WrIconModule], providers: [provideWrIcons([close])], template: "@if (!isClosed()) {\n <div class=\"wr-alert__wrapper\">\n <div class=\"wr-alert__body\">\n <p class=\"wr-alert__title\">{{ title }}</p>\n @if (message) {\n <p class=\"wr-alert__message\">{{ message }}</p>\n }\n </div>\n\n @if (closeable) {\n <div class=\"wr-alert-close\">\n <wr-icon name=\"close\" (click)=\"onClose()\"></wr-icon>\n </div>\n }\n </div>\n}\n" }]
48
48
  }], propDecorators: { title: [{
@@ -67,11 +67,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
67
67
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
68
68
  */
69
69
  class WrAlertModule {
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
71
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.4", ngImport: i0, type: WrAlertModule, imports: [WrAlertComponent], exports: [WrAlertComponent] }); }
72
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAlertModule, imports: [WrAlertComponent] }); }
70
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
71
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: WrAlertModule, imports: [WrAlertComponent], exports: [WrAlertComponent] }); }
72
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAlertModule, imports: [WrAlertComponent] }); }
73
73
  }
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAlertModule, decorators: [{
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAlertModule, decorators: [{
75
75
  type: NgModule,
76
76
  args: [{
77
77
  imports: [WrAlertComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-alert.mjs","sources":["../../../projects/lib/alert/alert-type.ts","../../../projects/lib/alert/alert.component.ts","../../../projects/lib/alert/alert.component.html","../../../projects/lib/alert/alert.module.ts","../../../projects/lib/alert/public-api.ts","../../../projects/lib/alert/ngwr-alert.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport type WrAlertType = 'info' | 'success' | 'warning' | 'danger';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny } from 'ngwr/cdk/types';\nimport { provideWrIcons, close, WrIconModule } from 'ngwr/icon';\n\nimport { WrAlertType } from './alert-type';\n\n/**\n * NGWR alert component.\n * Closeable component for feedback.\n *\n * {@tutorial} [How to use wr-alert]{@link http://ngwr.dev/docs/components/alert}\n */\n@Component({\n standalone: true,\n selector: 'wr-alert',\n templateUrl: './alert.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WrIconModule],\n providers: [provideWrIcons([close])],\n})\nexport class WrAlertComponent {\n @Input({ required: true }) title!: string;\n @Input() message?: string;\n @Input() type: WrAlertType = 'info';\n @Input({ transform: booleanAttribute }) closeable = false;\n\n protected readonly isClosed = signal(false);\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-alert': true,\n 'wr-alert--success': this.type === 'success',\n 'wr-alert--warning': this.type === 'warning',\n 'wr-alert--danger': this.type === 'danger',\n };\n }\n\n onClose(): void {\n this.isClosed.set(true);\n }\n}\n","@if (!isClosed()) {\n <div class=\"wr-alert__wrapper\">\n <div class=\"wr-alert__body\">\n <p class=\"wr-alert__title\">{{ title }}</p>\n @if (message) {\n <p class=\"wr-alert__message\">{{ message }}</p>\n }\n </div>\n\n @if (closeable) {\n <div class=\"wr-alert-close\">\n <wr-icon name=\"close\" (click)=\"onClose()\"></wr-icon>\n </div>\n }\n </div>\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { WrAlertComponent } from './alert.component';\n\n@NgModule({\n imports: [WrAlertComponent],\n exports: [WrAlertComponent],\n})\nexport class WrAlertModule {}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './alert-type';\nexport * from './alert.component';\nexport * from './alert.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;;ACLH;;;;;AAKG;AAiBH;;;;;AAKG;MAUU,gBAAgB,CAAA;AAT7B,IAAA,WAAA,GAAA;QAYW,IAAI,CAAA,IAAA,GAAgB,MAAM,CAAC;QACI,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAEvC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAe7C,KAAA;AAbC,IAAA,IACI,SAAS,GAAA;QACX,OAAO;AACL,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,mBAAmB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;AAC5C,YAAA,mBAAmB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;AAC5C,Y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/alert/alert.component.ts","../../../projects/lib/alert/alert.component.html","../../../projects/lib/alert/alert.module.ts","../../../projects/lib/alert/public-api.ts","../../../projects/lib/alert/ngwr-alert.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport type WrAlertType = 'info' | 'success' | 'warning' | 'danger';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny } from 'ngwr/cdk/types';\nimport { provideWrIcons, close, WrIconModule } from 'ngwr/icon';\n\nimport { WrAlertType } from './alert-type';\n\n/**\n * NGWR alert component.\n * Closeable component for feedback.\n *\n * {@tutorial} [How to use wr-alert]{@link http://ngwr.dev/docs/components/alert}\n */\n@Component({\n standalone: true,\n selector: 'wr-alert',\n templateUrl: './alert.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WrIconModule],\n providers: [provideWrIcons([close])],\n})\nexport class WrAlertComponent {\n @Input({ required: true }) title!: string;\n @Input() message?: string;\n @Input() type: WrAlertType = 'info';\n @Input({ transform: booleanAttribute }) closeable = false;\n\n protected readonly isClosed = signal(false);\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-alert': true,\n 'wr-alert--success': this.type === 'success',\n 'wr-alert--warning': this.type === 'warning',\n 'wr-alert--danger': this.type === 'danger',\n };\n }\n\n onClose(): void {\n this.isClosed.set(true);\n }\n}\n","@if (!isClosed()) {\n <div class=\"wr-alert__wrapper\">\n <div class=\"wr-alert__body\">\n <p class=\"wr-alert__title\">{{ title }}</p>\n @if (message) {\n <p class=\"wr-alert__message\">{{ message }}</p>\n }\n </div>\n\n @if (closeable) {\n <div class=\"wr-alert-close\">\n <wr-icon name=\"close\" (click)=\"onClose()\"></wr-icon>\n </div>\n }\n </div>\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { WrAlertComponent } from './alert.component';\n\n@NgModule({\n imports: [WrAlertComponent],\n exports: [WrAlertComponent],\n})\nexport class WrAlertModule {}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './alert-type';\nexport * from './alert.component';\nexport * from './alert.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;;ACLH;;;;;AAKG;AAiBH;;;;;AAKG;MAUU,gBAAgB,CAAA;AAT7B,IAAA,WAAA,GAAA;QAYW,IAAI,CAAA,IAAA,GAAgB,MAAM;QACK,IAAS,CAAA,SAAA,GAAG,KAAK;AAEtC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;AAe5C;AAbC,IAAA,IACI,SAAS,GAAA;QACX,OAAO;AACL,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,mBAAmB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;AAC5C,YAAA,mBAAmB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;AAC5C,YAAA,kBAAkB,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;SAC3C;;IAGH,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;;8GAnBd,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAA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,CAAA;sBAAhD,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBAKlC,SAAS,EAAA,CAAA;sBADZ,WAAW;uBAAC,OAAO;;;AE7CtB;;;;;AAKG;MAUU,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAb,aAAa,EAAA,OAAA,EAAA,CAHd,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAChB,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAEf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHd,gBAAgB,CAAA,EAAA,CAAA,CAAA;;2FAGf,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC5B,iBAAA;;;ACdD;;;;;AAKG;;ACLH;;AAEG;;;;"}
@@ -50,10 +50,10 @@ class WrAvatarComponent {
50
50
  height: `${this.size}px`,
51
51
  };
52
52
  }
53
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
54
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.4", type: WrAvatarComponent, isStandalone: true, selector: "wr-avatar", inputs: { url: "url", alt: "alt", rounded: ["rounded", "rounded", booleanAttribute], size: ["size", "size", numberAttribute] }, host: { properties: { "class": "this.elClasses", "style": "this.elStyles" } }, ngImport: i0, template: "<ng-content />\n\n<!--\n img need to be wrapped with @if\n to check is url set\n to trigger (load) listener\n-->\n@if (url) {\n <img\n class=\"wr-avatar__img\"\n [ngSrc]=\"url\"\n (load)=\"isImgLoaded.set(true)\"\n [width]=\"size\"\n [height]=\"size\"\n [alt]=\"alt\"\n priority\n />\n}\n\n@if (!isImgLoaded()) {\n <wr-spinner class=\"wr-avatar__spin\" />\n}\n", dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "ngmodule", type: WrSpinnerModule }, { kind: "component", type: i1.WrSpinnerComponent, selector: "wr-spinner" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
53
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
54
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: WrAvatarComponent, isStandalone: true, selector: "wr-avatar", inputs: { url: "url", alt: "alt", rounded: ["rounded", "rounded", booleanAttribute], size: ["size", "size", numberAttribute] }, host: { properties: { "class": "this.elClasses", "style": "this.elStyles" } }, ngImport: i0, template: "<ng-content />\n\n<!--\n img need to be wrapped with @if\n to check is url set\n to trigger (load) listener\n-->\n@if (url) {\n <img\n class=\"wr-avatar__img\"\n [ngSrc]=\"url\"\n (load)=\"isImgLoaded.set(true)\"\n [width]=\"size\"\n [height]=\"size\"\n [alt]=\"alt\"\n priority\n />\n}\n\n@if (!isImgLoaded()) {\n <wr-spinner class=\"wr-avatar__spin\" />\n}\n", dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "ngmodule", type: WrSpinnerModule }, { kind: "component", type: i1.WrSpinnerComponent, selector: "wr-spinner" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
55
55
  }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAvatarComponent, decorators: [{
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAvatarComponent, decorators: [{
57
57
  type: Component,
58
58
  args: [{ standalone: true, selector: 'wr-avatar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgOptimizedImage, WrSpinnerModule], template: "<ng-content />\n\n<!--\n img need to be wrapped with @if\n to check is url set\n to trigger (load) listener\n-->\n@if (url) {\n <img\n class=\"wr-avatar__img\"\n [ngSrc]=\"url\"\n (load)=\"isImgLoaded.set(true)\"\n [width]=\"size\"\n [height]=\"size\"\n [alt]=\"alt\"\n priority\n />\n}\n\n@if (!isImgLoaded()) {\n <wr-spinner class=\"wr-avatar__spin\" />\n}\n" }]
59
59
  }], ctorParameters: () => [], propDecorators: { url: [{
@@ -83,11 +83,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
83
83
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
84
84
  */
85
85
  class WrAvatarModule {
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
87
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.4", ngImport: i0, type: WrAvatarModule, imports: [WrAvatarComponent], exports: [WrAvatarComponent] }); }
88
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAvatarModule, imports: [WrAvatarComponent] }); }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
87
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: WrAvatarModule, imports: [WrAvatarComponent], exports: [WrAvatarComponent] }); }
88
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAvatarModule, imports: [WrAvatarComponent] }); }
89
89
  }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAvatarModule, decorators: [{
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAvatarModule, decorators: [{
91
91
  type: NgModule,
92
92
  args: [{
93
93
  imports: [WrAvatarComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-avatar.mjs","sources":["../../../projects/lib/avatar/avatar.component.ts","../../../projects/lib/avatar/avatar.component.html","../../../projects/lib/avatar/avatar.module.ts","../../../projects/lib/avatar/public-api.ts","../../../projects/lib/avatar/ngwr-avatar.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgOptimizedImage } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n inject,\n Input,\n numberAttribute,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny } from 'ngwr/cdk/types';\nimport { WrSpinnerModule } from 'ngwr/spinner';\n\n@Component({\n standalone: true,\n selector: 'wr-avatar',\n templateUrl: './avatar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgOptimizedImage, WrSpinnerModule],\n})\nexport class WrAvatarComponent {\n readonly cdr = inject(ChangeDetectorRef);\n readonly elRef = inject(ElementRef);\n readonly remSize: number = 16;\n\n readonly isImgLoaded = signal(false);\n\n private calcRemToPx(): number {\n const nativeElement = this.elRef?.nativeElement as HTMLElement;\n const style = nativeElement?.ownerDocument?.documentElement;\n const fontSize = getComputedStyle(style)?.fontSize;\n return Number(fontSize) || 16;\n }\n\n constructor() {\n this.remSize = this.calcRemToPx();\n }\n\n @Input({ required: true }) url!: string;\n @Input({ required: true }) alt!: string;\n @Input({ transform: booleanAttribute }) rounded = false;\n\n /**\n * Width and height in rem\n * @example size=\"6\" transforms to 6 * remSize (16 by default)\n */\n @Input({ transform: numberAttribute })\n get size(): number {\n return this._size;\n }\n set size(value: number | string) {\n this._size = Number(value) * this.remSize;\n this.cdr.markForCheck();\n }\n private _size: number = 6 * this.remSize;\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-avatar': true,\n 'wr-avatar--rounded': this.rounded,\n 'wr-avatar--loaded': this.isImgLoaded(),\n };\n }\n\n @HostBinding('style')\n get elStyles(): SafeAny {\n return {\n width: `${this.size}px`,\n height: `${this.size}px`,\n };\n }\n}\n","<ng-content />\n\n<!--\n img need to be wrapped with @if\n to check is url set\n to trigger (load) listener\n-->\n@if (url) {\n <img\n class=\"wr-avatar__img\"\n [ngSrc]=\"url\"\n (load)=\"isImgLoaded.set(true)\"\n [width]=\"size\"\n [height]=\"size\"\n [alt]=\"alt\"\n priority\n />\n}\n\n@if (!isImgLoaded()) {\n <wr-spinner class=\"wr-avatar__spin\" />\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { WrAvatarComponent } from './avatar.component';\n\n@NgModule({\n imports: [WrAvatarComponent],\n exports: [WrAvatarComponent],\n})\nexport class WrAvatarModule {}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './avatar.component';\nexport * from './avatar.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;MA4BU,iBAAiB,CAAA;IAOpB,WAAW,GAAA;AACjB,QAAA,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,EAAE,aAA4B,CAAC;AAC/D,QAAA,MAAM,KAAK,GAAG,aAAa,EAAE,aAAa,EAAE,eAAe,CAAC;QAC5D,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;AACnD,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;KAC/B;AAED,IAAA,WAAA,GAAA;AAbS,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAChC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAC3B,IAAO,CAAA,OAAA,GAAW,EAAE,CAAC;AAErB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAeG,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAchD,QAAA,IAAA,CAAA,KAAK,GAAW,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;AAnBvC,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;KACnC;AAMD;;;AAGG;AACH,IAAA,IACI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;IACD,IAAI,IAAI,CAAC,KAAsB,EAAA;QAC7B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;AAC1C,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AA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGhB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA,CAAA;;;ACdD;;;;;AAKG;;ACLH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-avatar.mjs","sources":["../../../projects/lib/avatar/avatar.component.ts","../../../projects/lib/avatar/avatar.component.html","../../../projects/lib/avatar/avatar.module.ts","../../../projects/lib/avatar/public-api.ts","../../../projects/lib/avatar/ngwr-avatar.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgOptimizedImage } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n inject,\n Input,\n numberAttribute,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny } from 'ngwr/cdk/types';\nimport { WrSpinnerModule } from 'ngwr/spinner';\n\n@Component({\n standalone: true,\n selector: 'wr-avatar',\n templateUrl: './avatar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgOptimizedImage, WrSpinnerModule],\n})\nexport class WrAvatarComponent {\n readonly cdr = inject(ChangeDetectorRef);\n readonly elRef = inject(ElementRef);\n readonly remSize: number = 16;\n\n readonly isImgLoaded = signal(false);\n\n private calcRemToPx(): number {\n const nativeElement = this.elRef?.nativeElement as HTMLElement;\n const style = nativeElement?.ownerDocument?.documentElement;\n const fontSize = getComputedStyle(style)?.fontSize;\n return Number(fontSize) || 16;\n }\n\n constructor() {\n this.remSize = this.calcRemToPx();\n }\n\n @Input({ required: true }) url!: string;\n @Input({ required: true }) alt!: string;\n @Input({ transform: booleanAttribute }) rounded = false;\n\n /**\n * Width and height in rem\n * @example size=\"6\" transforms to 6 * remSize (16 by default)\n */\n @Input({ transform: numberAttribute })\n get size(): number {\n return this._size;\n }\n set size(value: number | string) {\n this._size = Number(value) * this.remSize;\n this.cdr.markForCheck();\n }\n private _size: number = 6 * this.remSize;\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-avatar': true,\n 'wr-avatar--rounded': this.rounded,\n 'wr-avatar--loaded': this.isImgLoaded(),\n };\n }\n\n @HostBinding('style')\n get elStyles(): SafeAny {\n return {\n width: `${this.size}px`,\n height: `${this.size}px`,\n };\n }\n}\n","<ng-content />\n\n<!--\n img need to be wrapped with @if\n to check is url set\n to trigger (load) listener\n-->\n@if (url) {\n <img\n class=\"wr-avatar__img\"\n [ngSrc]=\"url\"\n (load)=\"isImgLoaded.set(true)\"\n [width]=\"size\"\n [height]=\"size\"\n [alt]=\"alt\"\n priority\n />\n}\n\n@if (!isImgLoaded()) {\n <wr-spinner class=\"wr-avatar__spin\" />\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { WrAvatarComponent } from './avatar.component';\n\n@NgModule({\n imports: [WrAvatarComponent],\n exports: [WrAvatarComponent],\n})\nexport class WrAvatarModule {}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './avatar.component';\nexport * from './avatar.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;MA4BU,iBAAi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isabledWhenLoading,
54
54
  };
55
55
  }
56
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
57
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.4", type: WrButtonComponent, isStandalone: true, selector: "wr-btn, button[wr-btn], a[wr-btn]", inputs: { color: "color", size: "size", icon: "icon", iconPosition: "iconPosition", disabled: ["disabled", "disabled", booleanAttribute], outlined: ["outlined", "outlined", booleanAttribute], rounded: ["rounded", "rounded", booleanAttribute], block: ["block", "block", booleanAttribute], loading: ["loading", "loading", booleanAttribute], isDisabledWhenLoading: ["isDisabledWhenLoading", "isDisabledWhenLoading", booleanAttribute] }, host: { properties: { "attr.disabled": "this.nativeDisabled", "class": "this.elClasses" } }, ngImport: i0, template: "@if (loading) {\n <wr-spinner class=\"wr-btn__spin\" />\n}\n@if (icon) {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\" />\n}\n<span class=\"wr-btn__text\">\n <ng-content />\n</span>\n", dependencies: [{ kind: "component", type: WrIconComponent, selector: "wr-icon", inputs: ["name"] }, { kind: "ngmodule", type: WrSpinnerModule }, { kind: "component", type: i1.WrSpinnerComponent, selector: "wr-spinner" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
56
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
57
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: WrButtonComponent, isStandalone: true, selector: "wr-btn, button[wr-btn], a[wr-btn]", inputs: { color: "color", size: "size", icon: "icon", iconPosition: "iconPosition", disabled: ["disabled", "disabled", booleanAttribute], outlined: ["outlined", "outlined", booleanAttribute], rounded: ["rounded", "rounded", booleanAttribute], block: ["block", "block", booleanAttribute], loading: ["loading", "loading", booleanAttribute], isDisabledWhenLoading: ["isDisabledWhenLoading", "isDisabledWhenLoading", booleanAttribute] }, host: { properties: { "attr.disabled": "this.nativeDisabled", "class": "this.elClasses" } }, ngImport: i0, template: "@if (loading) {\n <wr-spinner class=\"wr-btn__spin\" />\n}\n@if (icon) {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\" />\n}\n<span class=\"wr-btn__text\">\n <ng-content />\n</span>\n", dependencies: [{ kind: "component", type: WrIconComponent, selector: "wr-icon", inputs: ["name"] }, { kind: "ngmodule", type: WrSpinnerModule }, { kind: "component", type: i1.WrSpinnerComponent, selector: "wr-spinner" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
58
58
  }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrButtonComponent, decorators: [{
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrButtonComponent, decorators: [{
60
60
  type: Component,
61
61
  args: [{ standalone: true, selector: 'wr-btn, button[wr-btn], a[wr-btn]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [WrIconComponent, WrSpinnerModule], template: "@if (loading) {\n <wr-spinner class=\"wr-btn__spin\" />\n}\n@if (icon) {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\" />\n}\n<span class=\"wr-btn__text\">\n <ng-content />\n</span>\n" }]
62
62
  }], propDecorators: { color: [{
@@ -110,10 +110,10 @@ class WrButtonGroupComponent {
110
110
  'wr-btn-group': true,
111
111
  };
112
112
  }
113
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
114
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: WrButtonGroupComponent, isStandalone: true, selector: "wr-btn-group", host: { properties: { "class": "this.classes" } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
113
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
114
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: WrButtonGroupComponent, isStandalone: true, selector: "wr-btn-group", host: { properties: { "class": "this.classes" } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
115
115
  }
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrButtonGroupComponent, decorators: [{
116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrButtonGroupComponent, decorators: [{
117
117
  type: Component,
118
118
  args: [{
119
119
  standalone: true,
@@ -134,11 +134,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
134
134
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
135
135
  */
136
136
  class WrButtonModule {
137
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
138
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.4", ngImport: i0, type: WrButtonModule, imports: [WrButtonComponent, WrButtonGroupComponent], exports: [WrButtonComponent, WrButtonGroupComponent] }); }
139
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrButtonModule, imports: [WrButtonComponent] }); }
137
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
138
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: WrButtonModule, imports: [WrButtonComponent, WrButtonGroupComponent], exports: [WrButtonComponent, WrButtonGroupComponent] }); }
139
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrButtonModule, imports: [WrButtonComponent] }); }
140
140
  }
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrButtonModule, decorators: [{
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrButtonModule, decorators: [{
142
142
  type: NgModule,
143
143
  args: [{
144
144
  imports: [WrButtonComponent, WrButtonGroupComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-button.mjs","sources":["../../../projects/lib/button/button.component.ts","../../../projects/lib/button/button.component.html","../../../projects/lib/button/button-group.component.ts","../../../projects/lib/button/button.module.ts","../../../projects/lib/button/public-api.ts","../../../projects/lib/button/ngwr-button.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny, WrThemeColor } from 'ngwr/cdk/types';\nimport { WrIconComponent, wrIconName } from 'ngwr/icon';\nimport { WrSpinnerModule } from 'ngwr/spinner';\n\n/**\n * NGWR button component.\n * Trigger an operation or perform an action.\n *\n * {@tutorial} [How to use wr-btn]{@link http://ngwr.dev/docs/components/button}\n */\n@Component({\n standalone: true,\n selector: 'wr-btn, button[wr-btn], a[wr-btn]',\n templateUrl: './button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WrIconComponent, WrSpinnerModule],\n})\nexport class WrButtonComponent {\n @Input() color?: WrThemeColor | null;\n @Input() size: 'default' | 'small' = 'default';\n @Input() icon: wrIconName | null = null;\n @Input() iconPosition: 'start' | 'end' = 'start';\n @Input({ transform: booleanAttribute }) disabled = false;\n @Input({ transform: booleanAttribute }) outlined = false;\n @Input({ transform: booleanAttribute }) rounded = false;\n @Input({ transform: booleanAttribute }) block = false;\n @Input({ transform: booleanAttribute }) loading = false;\n @Input({ transform: booleanAttribute }) isDisabledWhenLoading = true;\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.disabled ? '' : null;\n }\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-btn': true,\n 'wr-btn--color-primary': this.color === 'primary',\n 'wr-btn--color-secondary': this.color === 'secondary',\n 'wr-btn--color-success': this.color === 'success',\n 'wr-btn--color-warning': this.color === 'warning',\n 'wr-btn--color-danger': this.color === 'danger',\n 'wr-btn--color-light': this.color === 'light',\n 'wr-btn--color-medium': this.color === 'medium',\n 'wr-btn--color-dark': this.color === 'dark',\n 'wr-btn--small': this.size === 'small',\n 'wr-btn--block': this.block,\n 'wr-btn--rounded': this.rounded,\n 'wr-btn--icon': this.icon,\n 'wr-btn--icon-start': this.icon && this.iconPosition === 'start',\n 'wr-btn--icon-end': this.icon && this.iconPosition === 'end',\n 'wr-btn--outlined': this.outlined,\n 'wr-btn--loading': this.loading,\n 'wr-btn--loading--disabled': this.loading && this.isDisabledWhenLoading,\n };\n }\n}\n","@if (loading) {\n <wr-spinner class=\"wr-btn__spin\" />\n}\n@if (icon) {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\" />\n}\n<span class=\"wr-btn__text\">\n <ng-content />\n</span>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';\n\nimport { SafeAny } from 'ngwr/cdk/types';\n\n/**\n * NGWR button group.\n *\n * {@tutorial} [How to use wr-btn-group]{@link http://ngwr.dev/docs/components/button-group}\n */\n@Component({\n standalone: true,\n selector: 'wr-btn-group',\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrButtonGroupComponent {\n @HostBinding('class')\n get classes(): SafeAny {\n return {\n 'wr-btn-group': true,\n };\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { WrButtonGroupComponent } from './button-group.component';\nimport { WrButtonComponent } from './button.component';\n\n@NgModule({\n imports: [WrButtonComponent, WrButtonGroupComponent],\n exports: [WrButtonComponent, WrButtonGroupComponent],\n})\nexport class WrButtonModule {}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './button.component';\nexport * from './button-group.component';\nexport * from './button.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AAeH;;;;;AAKG;MASU,iBAAiB,CAAA;AAR9B,IAAA,WAAA,GAAA;QAUW,IAAI,CAAA,IAAA,GAAwB,SAAS,CAAC;QACtC,IAAI,CAAA,IAAA,GAAsB,IAAI,CAAC;QAC/B,IAAY,CAAA,YAAA,GAAoB,OAAO,CAAC;QACT,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QACjB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QACj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AGhB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;AACrD,iBAAA,CAAA;;;ACfD;;;;;AAKG;;ACLH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-button.mjs","sources":["../../../projects/lib/button/button.component.ts","../../../projects/lib/button/button.component.html","../../../projects/lib/button/button-group.component.ts","../../../projects/lib/button/button.module.ts","../../../projects/lib/button/public-api.ts","../../../projects/lib/button/ngwr-button.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny, WrThemeColor } from 'ngwr/cdk/types';\nimport { WrIconComponent, wrIconName } from 'ngwr/icon';\nimport { WrSpinnerModule } from 'ngwr/spinner';\n\n/**\n * NGWR button component.\n * Trigger an operation or perform an action.\n *\n * {@tutorial} [How to use wr-btn]{@link http://ngwr.dev/docs/components/button}\n */\n@Component({\n standalone: true,\n selector: 'wr-btn, button[wr-btn], a[wr-btn]',\n templateUrl: './button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WrIconComponent, WrSpinnerModule],\n})\nexport class WrButtonComponent {\n @Input() color?: WrThemeColor | null;\n @Input() size: 'default' | 'small' = 'default';\n @Input() icon: wrIconName | null = null;\n @Input() iconPosition: 'start' | 'end' = 'start';\n @Input({ transform: booleanAttribute }) disabled = false;\n @Input({ transform: booleanAttribute }) outlined = false;\n @Input({ transform: booleanAttribute }) rounded = false;\n @Input({ transform: booleanAttribute }) block = false;\n @Input({ transform: booleanAttribute }) loading = false;\n @Input({ transform: booleanAttribute }) isDisabledWhenLoading = true;\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.disabled ? '' : null;\n }\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-btn': true,\n 'wr-btn--color-primary': this.color === 'primary',\n 'wr-btn--color-secondary': this.color === 'secondary',\n 'wr-btn--color-success': this.color === 'success',\n 'wr-btn--color-warning': this.color === 'warning',\n 'wr-btn--color-danger': this.color === 'danger',\n 'wr-btn--color-light': this.color === 'light',\n 'wr-btn--color-medium': this.color === 'medium',\n 'wr-btn--color-dark': this.color === 'dark',\n 'wr-btn--small': this.size === 'small',\n 'wr-btn--block': this.block,\n 'wr-btn--rounded': this.rounded,\n 'wr-btn--icon': this.icon,\n 'wr-btn--icon-start': this.icon && this.iconPosition === 'start',\n 'wr-btn--icon-end': this.icon && this.iconPosition === 'end',\n 'wr-btn--outlined': this.outlined,\n 'wr-btn--loading': this.loading,\n 'wr-btn--loading--disabled': this.loading && this.isDisabledWhenLoading,\n };\n }\n}\n","@if (loading) {\n <wr-spinner class=\"wr-btn__spin\" />\n}\n@if (icon) {\n <wr-icon class=\"wr-btn__icon\" [name]=\"icon\" />\n}\n<span class=\"wr-btn__text\">\n <ng-content />\n</span>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';\n\nimport { SafeAny } from 'ngwr/cdk/types';\n\n/**\n * NGWR button group.\n *\n * {@tutorial} [How to use wr-btn-group]{@link http://ngwr.dev/docs/components/button-group}\n */\n@Component({\n standalone: true,\n selector: 'wr-btn-group',\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrButtonGroupComponent {\n @HostBinding('class')\n get classes(): SafeAny {\n return {\n 'wr-btn-group': true,\n };\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { WrButtonGroupComponent } from './button-group.component';\nimport { WrButtonComponent } from './button.component';\n\n@NgModule({\n imports: [WrButtonComponent, WrButtonGroupComponent],\n exports: [WrButtonComponent, WrButtonGroupComponent],\n})\nexport class WrButtonModule {}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './button.component';\nexport * from './button-group.component';\nexport * from './button.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AAeH;;;;;AAKG;MASU,iBAAiB,CAAA;AAR9B,IAAA,WAAA,GAAA;QAUW,IAAI,CAAA,IAAA,GAAwB,SAAS;QACrC,IAAI,CAAA,IAAA,GAAsB,IAAI;QAC9B,IAAY,CAAA,YAAA,GAAoB,OAAO;QACR,IAAQ,CAAA,QAAA,GAAG,KAAK;QAChB,IAAQ,CAAA,QAAA,GAAG,KAAK;QAChB,IAAO,CAAA,OAAA,GAAG,KAAK;QACf,IAAK,CAAA,KAAA,GAAG,KAAK;QACb,IAAO,CAAA,OAAA,GAAG,KAAK;QACf,IAAqB,CAAA,qBAAA,GAAG,IAAI;AA8BrE;AA5BC,IAAA,IACI,cAAc,GAAA;QAChB,OAAO,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI;;AAGlC,IAAA,IACI,SAAS,GAAA;QACX,OAAO;AACL,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,uBAAuB,EAAE,IAAI,CAAC,KAAK,KAAK,SAAS;AACjD,YAAA,yBAAyB,EAAE,IAAI,CAAC,KAAK,KAAK,WAAW;AACrD,YAAA,uBAAuB,EAAE,IAAI,CA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U,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,iBAAiB,EAAE,sBAAsB,CACzC,EAAA,OAAA,EAAA,CAAA,iBAAiB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAExC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,iBAAiB,CAAA,EAAA,CAAA,CAAA;;2FAGhB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;AACrD,iBAAA;;;ACfD;;;;;AAKG;;ACLH;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-cdk-rxjs.mjs","sources":["../../../projects/lib/cdk/rxjs/is-array.ts","../../../projects/lib/cdk/rxjs/is-defined.ts","../../../projects/lib/cdk/rxjs/is-not-empty-array.ts","../../../projects/lib/cdk/rxjs/is-observable.ts","../../../projects/lib/cdk/rxjs/public-api.ts","../../../projects/lib/cdk/rxjs/ngwr-cdk-rxjs.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Maybe } from 'ngwr/cdk/types';\n\nexport function isArray<T>(val: Maybe<T>): val is T {\n return Array.isArray(val);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Maybe } from 'ngwr/cdk/types';\n\nexport function isDefined<T>(value: Maybe<T>): value is T {\n return value != null;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Maybe } from 'ngwr/cdk/types';\n\nexport function isNotEmptyArray<T>(val: Maybe<T>): val is T {\n return !Array.isArray(val) || val.length !== 0;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Observable } from 'rxjs';\n\nimport { SafeAny } from 'ngwr/cdk/types';\n\nexport function isObservable(obj: SafeAny | Observable<SafeAny>): obj is Observable<SafeAny> {\n return !!obj && typeof obj.subscribe === 'function';\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './is-array';\nexport * from './is-defined';\nexport * from './is-not-empty-array';\nexport * from './is-observable';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAIG,SAAU,OAAO,CAAI,GAAa,EAAA;AACtC,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC5B;;ACXA;;;;;AAKG;AAIG,SAAU,SAAS,CAAI,KAAe,EAAA;IAC1C,OAAO,KAAK,IAAI,IAAI,CAAC;AACvB;;ACXA;;;;;AAKG;AAIG,SAAU,eAAe,CAAI,GAAa,EAAA;AAC9C,IAAA,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC;AACjD;;ACXA;;;;;AAKG;AAMG,SAAU,YAAY,CAAC,GAAkC,EAAA;IAC7D,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,UAAU,CAAC;AACtD;;ACbA;;;;;AAKG;;ACLH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-cdk-rxjs.mjs","sources":["../../../projects/lib/cdk/rxjs/is-array.ts","../../../projects/lib/cdk/rxjs/is-defined.ts","../../../projects/lib/cdk/rxjs/is-not-empty-array.ts","../../../projects/lib/cdk/rxjs/is-observable.ts","../../../projects/lib/cdk/rxjs/public-api.ts","../../../projects/lib/cdk/rxjs/ngwr-cdk-rxjs.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Maybe } from 'ngwr/cdk/types';\n\nexport function isArray<T>(val: Maybe<T>): val is T {\n return Array.isArray(val);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Maybe } from 'ngwr/cdk/types';\n\nexport function isDefined<T>(value: Maybe<T>): value is T {\n return value != null;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Maybe } from 'ngwr/cdk/types';\n\nexport function isNotEmptyArray<T>(val: Maybe<T>): val is T {\n return !Array.isArray(val) || val.length !== 0;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Observable } from 'rxjs';\n\nimport { SafeAny } from 'ngwr/cdk/types';\n\nexport function isObservable(obj: SafeAny | Observable<SafeAny>): obj is Observable<SafeAny> {\n return !!obj && typeof obj.subscribe === 'function';\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './is-array';\nexport * from './is-defined';\nexport * from './is-not-empty-array';\nexport * from './is-observable';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAIG,SAAU,OAAO,CAAI,GAAa,EAAA;AACtC,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AAC3B;;ACXA;;;;;AAKG;AAIG,SAAU,SAAS,CAAI,KAAe,EAAA;IAC1C,OAAO,KAAK,IAAI,IAAI;AACtB;;ACXA;;;;;AAKG;AAIG,SAAU,eAAe,CAAI,GAAa,EAAA;AAC9C,IAAA,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;AAChD;;ACXA;;;;;AAKG;AAMG,SAAU,YAAY,CAAC,GAAkC,EAAA;IAC7D,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,UAAU;AACrD;;ACbA;;;;;AAKG;;ACLH;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-cdk-utils.mjs","sources":["../../../projects/lib/cdk/utils/generate-random-id.ts","../../../projects/lib/cdk/utils/public-api.ts","../../../projects/lib/cdk/utils/ngwr-cdk-utils.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Generates random ID\n *\n * @return {string}\n */\nexport function generateRandomId(): string {\n const dateRandomizer = Date.now().toString(36);\n const mathRandomizer = Math.random().toString(36).substring(2);\n return `${dateRandomizer}${mathRandomizer}`;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './generate-random-id';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAEH;;;;AAIG;SACa,gBAAgB,GAAA;IAC9B,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC/C,IAAA,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC/D,IAAA,OAAO,CAAG,EAAA,cAAc,CAAG,EAAA,cAAc,EAAE,CAAC;AAC9C;;AChBA;;;;;AAKG;;ACLH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-cdk-utils.mjs","sources":["../../../projects/lib/cdk/utils/generate-random-id.ts","../../../projects/lib/cdk/utils/public-api.ts","../../../projects/lib/cdk/utils/ngwr-cdk-utils.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * Generates random ID\n *\n * @return {string}\n */\nexport function generateRandomId(): string {\n const dateRandomizer = Date.now().toString(36);\n const mathRandomizer = Math.random().toString(36).substring(2);\n return `${dateRandomizer}${mathRandomizer}`;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './generate-random-id';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAEH;;;;AAIG;SACa,gBAAgB,GAAA;IAC9B,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC9C,IAAA,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9D,IAAA,OAAO,CAAG,EAAA,cAAc,CAAG,EAAA,cAAc,EAAE;AAC7C;;AChBA;;;;;AAKG;;ACLH;;AAEG;;;;"}
@@ -16,10 +16,10 @@ class WrAbstractBase {
16
16
  this.destroyed$.next();
17
17
  this.destroyed$.complete();
18
18
  }
19
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAbstractBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
20
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.4", type: WrAbstractBase, isStandalone: true, ngImport: i0 }); }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAbstractBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
20
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.9", type: WrAbstractBase, isStandalone: true, ngImport: i0 }); }
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrAbstractBase, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrAbstractBase, decorators: [{
23
23
  type: Directive,
24
24
  args: [{
25
25
  standalone: true,
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-cdk.mjs","sources":["../../../projects/lib/cdk/base.directive.ts","../../../projects/lib/cdk/public-api.ts","../../../projects/lib/cdk/ngwr-cdk.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, OnDestroy } from '@angular/core';\n\nimport { Subject } from 'rxjs';\n\n@Directive({\n standalone: true,\n})\nexport abstract class WrAbstractBase implements OnDestroy {\n protected readonly destroyed$: Subject<void> = new Subject<void>();\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './base.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;MASmB,cAAc,CAAA;AAHpC,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,UAAU,GAAkB,IAAI,OAAO,EAAQ,CAAC;AAMpE,KAAA;IAJC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;AACvB,QAAA,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;KAC5B;8GANmB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAHnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;;;ACbD;;;;;AAKG;;ACLH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-cdk.mjs","sources":["../../../projects/lib/cdk/base.directive.ts","../../../projects/lib/cdk/public-api.ts","../../../projects/lib/cdk/ngwr-cdk.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, OnDestroy } from '@angular/core';\n\nimport { Subject } from 'rxjs';\n\n@Directive({\n standalone: true,\n})\nexport abstract class WrAbstractBase implements OnDestroy {\n protected readonly destroyed$: Subject<void> = new Subject<void>();\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './base.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;MASmB,cAAc,CAAA;AAHpC,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,UAAU,GAAkB,IAAI,OAAO,EAAQ;AAMnE;IAJC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;AACtB,QAAA,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;8GALR,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAHnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACbD;;;;;AAKG;;ACLH;;AAEG;;;;"}
@@ -1,8 +1,9 @@
1
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
1
2
  import * as i0 from '@angular/core';
2
- import { forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core';
3
+ import { signal, inject, ChangeDetectorRef, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core';
3
4
  import * as i1 from '@angular/forms';
4
- import { NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
5
- import { noop, takeUntil } from 'rxjs';
5
+ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
6
+ import { noop } from 'rxjs';
6
7
  import { WrAbstractBase } from 'ngwr/cdk';
7
8
  import { generateRandomId } from 'ngwr/cdk/utils';
8
9
  import { WrIconComponent } from 'ngwr/icon';
@@ -13,27 +14,30 @@ import { WrIconComponent } from 'ngwr/icon';
13
14
  * Use of this source code is governed by an MIT-style license that can be
14
15
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
15
16
  */
17
+ /**
18
+ * NGWR checkbox component.
19
+ *
20
+ * {@tutorial} [How to use wr-checkbox]{@link http://ngwr.dev/docs/components/checkbox}
21
+ */
16
22
  class WrCheckboxComponent extends WrAbstractBase {
17
23
  constructor() {
18
24
  super(...arguments);
19
25
  this.id = generateRandomId();
20
26
  this.icon = null;
27
+ this.inputValue = signal(null);
28
+ this.cdr = inject(ChangeDetectorRef);
29
+ this.isDisabled = signal(false);
21
30
  this.onChange = noop;
22
31
  this.onTouched = noop;
23
32
  }
24
33
  get elClasses() {
25
34
  return {
26
35
  'wr-checkbox': true,
27
- 'wr-checkbox--checked': this.formControl.value,
36
+ 'wr-checkbox--checked': this.inputValue(),
28
37
  };
29
38
  }
30
39
  get nativeDisabled() {
31
- return this.formControl.disabled ? '' : null;
32
- }
33
- ngOnInit() {
34
- this.formControl.valueChanges
35
- .pipe(takeUntil(this.destroyed$))
36
- .subscribe((isChecked) => this.onChange(isChecked));
40
+ return this.isDisabled() ? '' : null;
37
41
  }
38
42
  registerOnChange(fn) {
39
43
  this.onChange = fn;
@@ -41,41 +45,36 @@ class WrCheckboxComponent extends WrAbstractBase {
41
45
  registerOnTouched(fn) {
42
46
  this.onTouched = fn;
43
47
  }
44
- writeValue(checked) {
45
- this.formControl.patchValue(checked, { emitEvent: false });
46
- }
47
48
  setDisabledState(isDisabled) {
48
- if (isDisabled) {
49
- this.formControl.disable();
50
- }
51
- else {
52
- this.formControl.enable();
53
- }
49
+ this.isDisabled.set(coerceBooleanProperty(isDisabled));
50
+ }
51
+ writeValue(value) {
52
+ this.value = value;
53
+ this.onChange(value);
54
+ this.inputValue.set(value);
55
+ this.cdr.markForCheck();
54
56
  }
55
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
56
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.4", type: WrCheckboxComponent, isStandalone: true, selector: "wr-checkbox", inputs: { formControl: "formControl", id: "id", icon: "icon" }, host: { properties: { "class": "this.elClasses", "attr.disabled": "this.nativeDisabled" } }, providers: [
57
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
58
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: WrCheckboxComponent, isStandalone: true, selector: "wr-checkbox", inputs: { id: "id", icon: "icon" }, host: { properties: { "class": "this.elClasses", "attr.disabled": "this.nativeDisabled" } }, providers: [
57
59
  {
58
60
  provide: NG_VALUE_ACCESSOR,
59
61
  // eslint-disable-next-line @angular-eslint/no-forward-ref
60
62
  useExisting: forwardRef(() => WrCheckboxComponent),
61
63
  multi: true,
62
64
  },
63
- ], usesInheritance: true, ngImport: i0, template: "<label class=\"wr-checkbox__wrapper\" [for]=\"id\">\n <input class=\"wr-checkbox__input\" type=\"checkbox\" [formControl]=\"formControl\" [id]=\"id\" />\n @if (icon) {\n <wr-icon class=\"wr-checkbox__icon\" [name]=\"icon\" />\n } @else {\n <div class=\"wr-checkbox-inner\">\n <div class=\"wr-checkbox-inner__mark\"></div>\n </div>\n }\n <ng-content />\n</label>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: WrIconComponent, selector: "wr-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
65
+ ], usesInheritance: true, ngImport: i0, template: "<label class=\"wr-checkbox__wrapper\" [for]=\"id\">\n <input\n class=\"wr-checkbox__input\"\n type=\"checkbox\"\n [id]=\"id\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"writeValue($event)\"\n />\n @if (icon) {\n <wr-icon class=\"wr-checkbox__icon\" [name]=\"icon\" />\n } @else {\n <div class=\"wr-checkbox-inner\">\n <div class=\"wr-checkbox-inner__mark\"></div>\n </div>\n }\n <ng-content />\n</label>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: WrIconComponent, selector: "wr-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
64
66
  }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrCheckboxComponent, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrCheckboxComponent, decorators: [{
66
68
  type: Component,
67
- args: [{ standalone: true, selector: 'wr-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [ReactiveFormsModule, WrIconComponent], providers: [
69
+ args: [{ standalone: true, selector: 'wr-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [FormsModule, WrIconComponent], providers: [
68
70
  {
69
71
  provide: NG_VALUE_ACCESSOR,
70
72
  // eslint-disable-next-line @angular-eslint/no-forward-ref
71
73
  useExisting: forwardRef(() => WrCheckboxComponent),
72
74
  multi: true,
73
75
  },
74
- ], template: "<label class=\"wr-checkbox__wrapper\" [for]=\"id\">\n <input class=\"wr-checkbox__input\" type=\"checkbox\" [formControl]=\"formControl\" [id]=\"id\" />\n @if (icon) {\n <wr-icon class=\"wr-checkbox__icon\" [name]=\"icon\" />\n } @else {\n <div class=\"wr-checkbox-inner\">\n <div class=\"wr-checkbox-inner__mark\"></div>\n </div>\n }\n <ng-content />\n</label>\n" }]
75
- }], propDecorators: { formControl: [{
76
- type: Input,
77
- args: [{ required: true }]
78
- }], id: [{
76
+ ], template: "<label class=\"wr-checkbox__wrapper\" [for]=\"id\">\n <input\n class=\"wr-checkbox__input\"\n type=\"checkbox\"\n [id]=\"id\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"writeValue($event)\"\n />\n @if (icon) {\n <wr-icon class=\"wr-checkbox__icon\" [name]=\"icon\" />\n } @else {\n <div class=\"wr-checkbox-inner\">\n <div class=\"wr-checkbox-inner__mark\"></div>\n </div>\n }\n <ng-content />\n</label>\n" }]
77
+ }], propDecorators: { id: [{
79
78
  type: Input
80
79
  }], icon: [{
81
80
  type: Input
@@ -94,11 +93,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
94
93
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
95
94
  */
96
95
  class WrCheckboxModule {
97
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
98
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.4", ngImport: i0, type: WrCheckboxModule, imports: [WrCheckboxComponent], exports: [WrCheckboxComponent] }); }
99
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrCheckboxModule, imports: [WrCheckboxComponent] }); }
96
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
97
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: WrCheckboxModule, imports: [WrCheckboxComponent], exports: [WrCheckboxComponent] }); }
98
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrCheckboxModule, imports: [WrCheckboxComponent] }); }
100
99
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: WrCheckboxModule, decorators: [{
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrCheckboxModule, decorators: [{
102
101
  type: NgModule,
103
102
  args: [{
104
103
  imports: [WrCheckboxComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-checkbox.mjs","sources":["../../../projects/lib/checkbox/checkbox.component.ts","../../../projects/lib/checkbox/checkbox.component.html","../../../projects/lib/checkbox/checkbox.module.ts","../../../projects/lib/checkbox/public-api.ts","../../../projects/lib/checkbox/ngwr-checkbox.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n forwardRef,\n HostBinding,\n Input,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\n\nimport { noop, takeUntil } from 'rxjs';\n\nimport { WrAbstractBase } from 'ngwr/cdk';\nimport { SafeAny } from 'ngwr/cdk/types';\nimport { generateRandomId } from 'ngwr/cdk/utils';\nimport { WrIconComponent, wrIconName } from 'ngwr/icon';\n\n@Component({\n standalone: true,\n selector: 'wr-checkbox',\n templateUrl: './checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [ReactiveFormsModule, WrIconComponent],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrCheckboxComponent),\n multi: true,\n },\n ],\n})\nexport class WrCheckboxComponent extends WrAbstractBase implements ControlValueAccessor, OnInit {\n @Input({ required: true }) formControl!: FormControl;\n @Input() id: string = generateRandomId();\n @Input() icon: wrIconName | null = null;\n\n onChange: (value: boolean) => void = noop;\n onTouched: () => void = noop;\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-checkbox': true,\n 'wr-checkbox--checked': this.formControl.value,\n };\n }\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.formControl.disabled ? '' : null;\n }\n\n ngOnInit(): void {\n this.formControl.valueChanges\n .pipe(takeUntil(this.destroyed$))\n .subscribe((isChecked: boolean) => this.onChange(isChecked));\n }\n\n registerOnChange(fn: () => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(checked: boolean): void {\n this.formControl.patchValue(checked, { emitEvent: false });\n }\n\n setDisabledState?(isDisabled: boolean): void {\n if (isDisabled) {\n this.formControl.disable();\n } else {\n this.formControl.enable();\n }\n }\n}\n","<label class=\"wr-checkbox__wrapper\" [for]=\"id\">\n <input class=\"wr-checkbox__input\" type=\"checkbox\" [formControl]=\"formControl\" [id]=\"id\" />\n @if (icon) {\n <wr-icon class=\"wr-checkbox__icon\" [name]=\"icon\" />\n } @else {\n <div class=\"wr-checkbox-inner\">\n <div class=\"wr-checkbox-inner__mark\"></div>\n </div>\n }\n <ng-content />\n</label>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { WrCheckboxComponent } from './checkbox.component';\n\n@NgModule({\n imports: [WrCheckboxComponent],\n exports: [WrCheckboxComponent],\n})\nexport class WrCheckboxModule {}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './checkbox.component';\nexport * from './checkbox.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AAoCG,MAAO,mBAAoB,SAAQ,cAAc,CAAA;AAhBvD,IAAA,WAAA,GAAA;;QAkBW,IAAE,CAAA,EAAA,GAAW,gBAAgB,EAAE,CAAC;QAChC,IAAI,CAAA,IAAA,GAAsB,IAAI,CAAC;QAExC,IAAQ,CAAA,QAAA,GAA6B,IAAI,CAAC;QAC1C,IAAS,CAAA,SAAA,GAAe,IAAI,CAAC;AAwC9B,KAAA;AAtCC,IAAA,IACI,SAAS,GAAA;QACX,OAAO;AACL,YAAA,aAAa,EAAE,IAAI;AACnB,YAAA,sBAAsB,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK;SAC/C,CAAC;KACH;AAED,IAAA,IACI,cAAc,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ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D;;;;;AAKG;;ACLH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-checkbox.mjs","sources":["../../../projects/lib/checkbox/checkbox.component.ts","../../../projects/lib/checkbox/checkbox.component.html","../../../projects/lib/checkbox/checkbox.module.ts","../../../projects/lib/checkbox/public-api.ts","../../../projects/lib/checkbox/ngwr-checkbox.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n HostBinding,\n inject,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { noop } from 'rxjs';\n\nimport { WrAbstractBase } from 'ngwr/cdk';\nimport { SafeAny } from 'ngwr/cdk/types';\nimport { generateRandomId } from 'ngwr/cdk/utils';\nimport { WrIconComponent, wrIconName } from 'ngwr/icon';\n\n/**\n * NGWR checkbox component.\n *\n * {@tutorial} [How to use wr-checkbox]{@link http://ngwr.dev/docs/components/checkbox}\n */\n@Component({\n standalone: true,\n selector: 'wr-checkbox',\n templateUrl: './checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [FormsModule, WrIconComponent],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrCheckboxComponent),\n multi: true,\n },\n ],\n})\nexport class WrCheckboxComponent extends WrAbstractBase implements ControlValueAccessor {\n @Input() id: string = generateRandomId();\n @Input() icon: wrIconName | null = null;\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-checkbox': true,\n 'wr-checkbox--checked': this.inputValue(),\n };\n }\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.isDisabled() ? '' : null;\n }\n\n protected readonly inputValue = signal<boolean | null>(null);\n protected value?: boolean;\n\n private readonly cdr = inject(ChangeDetectorRef);\n protected readonly isDisabled = signal(false);\n\n onChange: (value: boolean) => void = noop;\n onTouched: () => void = noop;\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled.set(coerceBooleanProperty(isDisabled));\n }\n\n writeValue(value: boolean): void {\n this.value = value;\n this.onChange(value);\n this.inputValue.set(value);\n this.cdr.markForCheck();\n }\n}\n","<label class=\"wr-checkbox__wrapper\" [for]=\"id\">\n <input\n class=\"wr-checkbox__input\"\n type=\"checkbox\"\n [id]=\"id\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"writeValue($event)\"\n />\n @if (icon) {\n <wr-icon class=\"wr-checkbox__icon\" [name]=\"icon\" />\n } @else {\n <div class=\"wr-checkbox-inner\">\n <div class=\"wr-checkbox-inner__mark\"></div>\n </div>\n }\n <ng-content />\n</label>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { WrCheckboxComponent } from './checkbox.component';\n\n@NgModule({\n imports: [WrCheckboxComponent],\n exports: [WrCheckboxComponent],\n})\nexport class WrCheckboxModule {}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './checkbox.component';\nexport * from './checkbox.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;AAKG;AAuBH;;;;AAIG;AAiBG,MAAO,mBAAoB,SAAQ,cAAc,CAAA;AAhBv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