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
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-tag.mjs","sources":["../../../projects/lib/tag/tag.component.ts","../../../projects/lib/tag/tag.component.html","../../../projects/lib/tag/tag.module.ts","../../../projects/lib/tag/public-api.ts","../../../projects/lib/tag/ngwr-tag.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@Component({\n standalone: true,\n selector: 'wr-tag',\n templateUrl: './tag.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WrIconComponent, WrSpinnerModule],\n})\nexport class WrTagComponent {\n @Input() color: WrThemeColor = 'primary';\n @Input() icon: wrIconName | null = null;\n @Input() iconPosition: 'start' | 'end' = 'start';\n @Input({ transform: booleanAttribute }) outlined = false;\n @Input({ transform: booleanAttribute }) rounded = false;\n @Input({ transform: booleanAttribute }) transparent = false;\n @Input({ transform: booleanAttribute }) hoverable = false;\n @Input({ transform: booleanAttribute }) loading = false;\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-tag': true,\n 'wr-tag--color-primary': this.color === 'primary',\n 'wr-tag--color-secondary': this.color === 'secondary',\n 'wr-tag--color-success': this.color === 'success',\n 'wr-tag--color-warning': this.color === 'warning',\n 'wr-tag--color-danger': this.color === 'danger',\n 'wr-tag--color-light': this.color === 'light',\n 'wr-tag--color-medium': this.color === 'medium',\n 'wr-tag--color-dark': this.color === 'dark',\n 'wr-tag--icon-start': (this.icon || this.loading) && this.iconPosition === 'start',\n 'wr-tag--icon-end': (this.icon || this.loading) && this.iconPosition === 'end',\n 'wr-tag--loading': this.loading,\n 'wr-tag--rounded': this.rounded,\n 'wr-tag--outlined': this.outlined,\n 'wr-tag--transparent': this.transparent,\n 'wr-tag--hoverable': this.hoverable,\n };\n }\n}\n","@if (loading && iconPosition === 'start') {\n <wr-spinner class=\"wr-tag__spin\" />\n}\n@if (icon && !loading && iconPosition === 'start') {\n <wr-icon class=\"wr-tag__icon\" [name]=\"icon\" />\n}\n<ng-content />\n@if (loading && iconPosition === 'end') {\n <wr-spinner class=\"wr-tag__spin\" />\n}\n@if (icon && !loading && iconPosition === 'end') {\n <wr-icon class=\"wr-tag__icon\" [name]=\"icon\" />\n}\n","import { NgModule } from '@angular/core';\n\nimport { WrTagComponent } from './tag.component';\n\n@NgModule({\n imports: [WrTagComponent],\n exports: [WrTagComponent],\n})\nexport class WrTagModule {}\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 './tag.component';\nexport * from './tag.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;MAuBU,cAAc,CAAA;AAR3B,IAAA,WAAA,GAAA;QASW,IAAK,CAAA,KAAA,GAAiB,SAAS,CAAC;QAChC,IAAI,CAAA,IAAA,GAAsB,IAAI,CAAC;QAC/B,IAAY,CAAA,YAAA,GAAoB,OAAO,CAAC;QACT,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QACjB,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;QAChB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;QACpB,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;QAClB,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAuBzD,KAAA;AArBC,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,CAAC,KAAK,KAAK,SAAS;AACjD,YAAA,uBAAuB,EAAE,IAAI,CAAC,KAAK,KAAK,SAAS;AACjD,YAAA,sBAAsB,EAAE,IAAI,CAAC,KAAK,KAAK,QAAQ;AAC/C,YAAA,qBAAqB,EAAE,IAAI,CAAC,KAAK,KAAK,OAAO;AAC7C,YAAA,sBAAsB,EAAE,IAAI,CAAC,KAAK,KAAK,QAAQ;AAC/C,YAAA,oBAAoB,EAAE,IAAI,CAAC,KAAK,KAAK,MAAM;AAC3C,YAAA,oBAAoB,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,YAAY,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;+GAAX,WAAW,EAAA,OAAA,EAAA,CAHZ,cAAc,CAAA,EAAA,OAAA,EAAA,CACd,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;AAEb,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,WAAW,YAHZ,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGb,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc,CAAC;AAC1B,iBAAA,CAAA;;;ACPD;;;;;AAKG;;ACLH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-tag.mjs","sources":["../../../projects/lib/tag/tag.component.ts","../../../projects/lib/tag/tag.component.html","../../../projects/lib/tag/tag.module.ts","../../../projects/lib/tag/public-api.ts","../../../projects/lib/tag/ngwr-tag.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@Component({\n standalone: true,\n selector: 'wr-tag',\n templateUrl: './tag.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WrIconComponent, WrSpinnerModule],\n})\nexport class WrTagComponent {\n @Input() color: WrThemeColor = 'primary';\n @Input() icon: wrIconName | null = null;\n @Input() iconPosition: 'start' | 'end' = 'start';\n @Input({ transform: booleanAttribute }) outlined = false;\n @Input({ transform: booleanAttribute }) rounded = false;\n @Input({ transform: booleanAttribute }) transparent = false;\n @Input({ transform: booleanAttribute }) hoverable = false;\n @Input({ transform: booleanAttribute }) loading = false;\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-tag': true,\n 'wr-tag--color-primary': this.color === 'primary',\n 'wr-tag--color-secondary': this.color === 'secondary',\n 'wr-tag--color-success': this.color === 'success',\n 'wr-tag--color-warning': this.color === 'warning',\n 'wr-tag--color-danger': this.color === 'danger',\n 'wr-tag--color-light': this.color === 'light',\n 'wr-tag--color-medium': this.color === 'medium',\n 'wr-tag--color-dark': this.color === 'dark',\n 'wr-tag--icon-start': (this.icon || this.loading) && this.iconPosition === 'start',\n 'wr-tag--icon-end': (this.icon || this.loading) && this.iconPosition === 'end',\n 'wr-tag--loading': this.loading,\n 'wr-tag--rounded': this.rounded,\n 'wr-tag--outlined': this.outlined,\n 'wr-tag--transparent': this.transparent,\n 'wr-tag--hoverable': this.hoverable,\n };\n }\n}\n","@if (loading && iconPosition === 'start') {\n <wr-spinner class=\"wr-tag__spin\" />\n}\n@if (icon && !loading && iconPosition === 'start') {\n <wr-icon class=\"wr-tag__icon\" [name]=\"icon\" />\n}\n<ng-content />\n@if (loading && iconPosition === 'end') {\n <wr-spinner class=\"wr-tag__spin\" />\n}\n@if (icon && !loading && iconPosition === 'end') {\n <wr-icon class=\"wr-tag__icon\" [name]=\"icon\" />\n}\n","import { NgModule } from '@angular/core';\n\nimport { WrTagComponent } from './tag.component';\n\n@NgModule({\n imports: [WrTagComponent],\n exports: [WrTagComponent],\n})\nexport class WrTagModule {}\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 './tag.component';\nexport * from './tag.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;A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AA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc,CAAC;AAC1B,iBAAA;;;ACPD;;;;;AAKG;;ACLH;;AAEG;;;;"}
@@ -0,0 +1,185 @@
1
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
+ import { isPlatformBrowser } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { signal, inject, PLATFORM_ID, ChangeDetectorRef, booleanAttribute, numberAttribute, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ViewChild, HostBinding, NgModule } from '@angular/core';
5
+ import * as i1 from '@angular/forms';
6
+ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
7
+ import { noop } from 'rxjs';
8
+ import { WrAbstractBase } from 'ngwr/cdk';
9
+
10
+ /**
11
+ * @license
12
+ *
13
+ * Use of this source code is governed by an MIT-style license that can be
14
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
15
+ */
16
+ /**
17
+ * NGWR textarea component.
18
+ *
19
+ * {@tutorial} [How to use wr-textarea]{@link http://ngwr.dev/docs/components/textarea}
20
+ */
21
+ class WrTextareaComponent extends WrAbstractBase {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.placeholder = '';
25
+ this.readonly = false;
26
+ this.resizable = true;
27
+ this.autosize = false;
28
+ this.rows = 2;
29
+ this.inputValue = signal(null);
30
+ this.isDisabled = signal(false);
31
+ this.platformId = inject(PLATFORM_ID);
32
+ this.cdr = inject(ChangeDetectorRef);
33
+ this.onChange = noop;
34
+ this.onTouch = noop;
35
+ }
36
+ set disabled(value) {
37
+ this.isDisabled.set(value);
38
+ }
39
+ get disabled() {
40
+ return this.isDisabled();
41
+ }
42
+ get elClasses() {
43
+ return {
44
+ 'wr-textarea': true,
45
+ 'wr-textarea--resizable': this.resizable,
46
+ 'wr-textarea--disabled': this.isDisabled(),
47
+ 'wr-textarea--autosize': this.autosize,
48
+ };
49
+ }
50
+ get isBrowser() {
51
+ return isPlatformBrowser(this.platformId);
52
+ }
53
+ ngAfterViewInit() {
54
+ if (this.autosize && this.isBrowser) {
55
+ this.resizeTextarea();
56
+ }
57
+ }
58
+ registerOnChange(fn) {
59
+ this.onChange = fn;
60
+ }
61
+ registerOnTouched(fn) {
62
+ this.onTouch = fn;
63
+ }
64
+ setDisabledState(isDisabled) {
65
+ this.isDisabled.set(coerceBooleanProperty(isDisabled));
66
+ }
67
+ writeValue(value) {
68
+ this.value = value;
69
+ this.onChange(value);
70
+ this.inputValue.set(value);
71
+ if (this.isBrowser) {
72
+ requestAnimationFrame(() => {
73
+ this.resizeTextarea();
74
+ });
75
+ }
76
+ this.cdr.markForCheck();
77
+ }
78
+ resizeTextarea() {
79
+ if (!this.autosize || !this.textareaNative || !this.isBrowser) {
80
+ return;
81
+ }
82
+ const textarea = this.textareaNative.nativeElement;
83
+ textarea.style.height = 'auto';
84
+ let newHeight;
85
+ let maxHeight = 'none';
86
+ if (this.maxRows) {
87
+ const computedStyle = getComputedStyle(textarea);
88
+ const lineHeight = parseInt(computedStyle.lineHeight, 10) || parseInt(computedStyle.fontSize, 10) * 1.2;
89
+ maxHeight = `${lineHeight * this.maxRows}px`;
90
+ newHeight = Math.min(textarea.scrollHeight, lineHeight * this.maxRows);
91
+ }
92
+ else {
93
+ newHeight = textarea.scrollHeight;
94
+ }
95
+ textarea.style.maxHeight = maxHeight;
96
+ textarea.style.height = `${newHeight}px`;
97
+ textarea.style.overflowY = this.maxRows && textarea.scrollHeight > newHeight ? 'auto' : 'hidden';
98
+ }
99
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
100
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.9", type: WrTextareaComponent, isStandalone: true, selector: "wr-textarea", inputs: { placeholder: "placeholder", readonly: ["readonly", "readonly", booleanAttribute], resizable: ["resizable", "resizable", booleanAttribute], autosize: ["autosize", "autosize", booleanAttribute], rows: ["rows", "rows", numberAttribute], maxRows: ["maxRows", "maxRows", numberAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, host: { properties: { "class": "this.elClasses" } }, providers: [
101
+ {
102
+ provide: NG_VALUE_ACCESSOR,
103
+ // eslint-disable-next-line @angular-eslint/no-forward-ref
104
+ useExisting: forwardRef(() => WrTextareaComponent),
105
+ multi: true,
106
+ },
107
+ ], viewQueries: [{ propertyName: "textareaNative", first: true, predicate: ["textareaNative"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<textarea\n #textareaNative\n class=\"wr-textarea__native\"\n [placeholder]=\"placeholder\"\n [rows]=\"rows\"\n [readonly]=\"readonly\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"writeValue($event)\"\n (input)=\"resizeTextarea()\"\n></textarea>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
108
+ }
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrTextareaComponent, decorators: [{
110
+ type: Component,
111
+ args: [{ standalone: true, selector: 'wr-textarea', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [FormsModule], providers: [
112
+ {
113
+ provide: NG_VALUE_ACCESSOR,
114
+ // eslint-disable-next-line @angular-eslint/no-forward-ref
115
+ useExisting: forwardRef(() => WrTextareaComponent),
116
+ multi: true,
117
+ },
118
+ ], template: "<textarea\n #textareaNative\n class=\"wr-textarea__native\"\n [placeholder]=\"placeholder\"\n [rows]=\"rows\"\n [readonly]=\"readonly\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"writeValue($event)\"\n (input)=\"resizeTextarea()\"\n></textarea>\n" }]
119
+ }], propDecorators: { placeholder: [{
120
+ type: Input
121
+ }], readonly: [{
122
+ type: Input,
123
+ args: [{ transform: booleanAttribute }]
124
+ }], resizable: [{
125
+ type: Input,
126
+ args: [{ transform: booleanAttribute }]
127
+ }], autosize: [{
128
+ type: Input,
129
+ args: [{ transform: booleanAttribute }]
130
+ }], rows: [{
131
+ type: Input,
132
+ args: [{ transform: numberAttribute }]
133
+ }], maxRows: [{
134
+ type: Input,
135
+ args: [{ transform: numberAttribute }]
136
+ }], disabled: [{
137
+ type: Input,
138
+ args: [{ transform: booleanAttribute }]
139
+ }], textareaNative: [{
140
+ type: ViewChild,
141
+ args: ['textareaNative']
142
+ }], elClasses: [{
143
+ type: HostBinding,
144
+ args: ['class']
145
+ }] } });
146
+
147
+ /**
148
+ * @license
149
+ *
150
+ * Use of this source code is governed by an MIT-style license that can be
151
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
152
+ */
153
+ class WrTextareaModule {
154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrTextareaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
155
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: WrTextareaModule, imports: [WrTextareaComponent], exports: [WrTextareaComponent] }); }
156
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrTextareaModule, imports: [WrTextareaComponent] }); }
157
+ }
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WrTextareaModule, decorators: [{
159
+ type: NgModule,
160
+ args: [{
161
+ imports: [WrTextareaComponent],
162
+ exports: [WrTextareaComponent],
163
+ }]
164
+ }] });
165
+
166
+ /**
167
+ * @license
168
+ *
169
+ * Use of this source code is governed by an MIT-style license that can be
170
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
171
+ */
172
+
173
+ /**
174
+ * @license
175
+ *
176
+ * Use of this source code is governed by an MIT-style license that can be
177
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
178
+ */
179
+
180
+ /**
181
+ * Generated bundle index. Do not edit.
182
+ */
183
+
184
+ export { WrTextareaComponent, WrTextareaModule };
185
+ //# sourceMappingURL=ngwr-textarea.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-textarea.mjs","sources":["../../../projects/lib/textarea/textarea.component.ts","../../../projects/lib/textarea/textarea.component.html","../../../projects/lib/textarea/textarea.module.ts","../../../projects/lib/textarea/public-api.ts","../../../projects/lib/textarea/index.ts","../../../projects/lib/textarea/ngwr-textarea.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 { isPlatformBrowser } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n inject,\n Input,\n numberAttribute,\n PLATFORM_ID,\n signal,\n ViewChild,\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';\n\n/**\n * NGWR textarea component.\n *\n * {@tutorial} [How to use wr-textarea]{@link http://ngwr.dev/docs/components/textarea}\n */\n@Component({\n standalone: true,\n selector: 'wr-textarea',\n templateUrl: './textarea.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [FormsModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrTextareaComponent),\n multi: true,\n },\n ],\n})\nexport class WrTextareaComponent extends WrAbstractBase implements ControlValueAccessor, AfterViewInit {\n @Input() placeholder = '';\n @Input({ transform: booleanAttribute }) readonly = false;\n @Input({ transform: booleanAttribute }) resizable = true;\n @Input({ transform: booleanAttribute }) autosize = false;\n @Input({ transform: numberAttribute }) rows = 2;\n @Input({ transform: numberAttribute }) maxRows?: number;\n\n @Input({ transform: booleanAttribute })\n set disabled(value: boolean) {\n this.isDisabled.set(value);\n }\n get disabled(): boolean {\n return this.isDisabled();\n }\n\n @ViewChild('textareaNative')\n private textareaNative: ElementRef<HTMLTextAreaElement> | undefined;\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-textarea': true,\n 'wr-textarea--resizable': this.resizable,\n 'wr-textarea--disabled': this.isDisabled(),\n 'wr-textarea--autosize': this.autosize,\n };\n }\n\n protected value?: string;\n\n protected readonly inputValue = signal<string | null>(null);\n protected readonly isDisabled = signal(false);\n\n private readonly platformId = inject(PLATFORM_ID);\n private readonly cdr = inject(ChangeDetectorRef);\n\n private get isBrowser(): boolean {\n return isPlatformBrowser(this.platformId);\n }\n\n ngAfterViewInit(): void {\n if (this.autosize && this.isBrowser) {\n this.resizeTextarea();\n }\n }\n\n onChange: (value: string) => void = noop;\n onTouch: () => void = noop;\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled.set(coerceBooleanProperty(isDisabled));\n }\n\n writeValue(value: string): void {\n this.value = value;\n this.onChange(value);\n this.inputValue.set(value);\n\n if (this.isBrowser) {\n requestAnimationFrame(() => {\n this.resizeTextarea();\n });\n }\n\n this.cdr.markForCheck();\n }\n\n resizeTextarea(): void {\n if (!this.autosize || !this.textareaNative || !this.isBrowser) {\n return;\n }\n\n const textarea = this.textareaNative.nativeElement;\n\n textarea.style.height = 'auto';\n\n let newHeight: number;\n let maxHeight = 'none';\n\n if (this.maxRows) {\n const computedStyle = getComputedStyle(textarea);\n const lineHeight = parseInt(computedStyle.lineHeight, 10) || parseInt(computedStyle.fontSize, 10) * 1.2;\n\n maxHeight = `${lineHeight * this.maxRows}px`;\n newHeight = Math.min(textarea.scrollHeight, lineHeight * this.maxRows);\n } else {\n newHeight = textarea.scrollHeight;\n }\n\n textarea.style.maxHeight = maxHeight;\n textarea.style.height = `${newHeight}px`;\n textarea.style.overflowY = this.maxRows && textarea.scrollHeight > newHeight ? 'auto' : 'hidden';\n }\n}\n","<textarea\n #textareaNative\n class=\"wr-textarea__native\"\n [placeholder]=\"placeholder\"\n [rows]=\"rows\"\n [readonly]=\"readonly\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"inputValue()\"\n (ngModelChange)=\"writeValue($event)\"\n (input)=\"resizeTextarea()\"\n></textarea>\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 { WrTextareaComponent } from './textarea.component';\n\n@NgModule({\n imports: [WrTextareaComponent],\n exports: [WrTextareaComponent],\n})\nexport class WrTextareaModule {}\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 './textarea.component';\nexport * from './textarea.module';\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 './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AA4BH;;;;AAIG;AAiBG,MAAO,mBAAoB,SAAQ,cAAc,CAAA;AAhBvD,IAAA,WAAA,GAAA;;QAiBW,IAAW,CAAA,WAAA,GAAG,EAAE;QACe,IAAQ,CAAA,QAAA,GAAG,KAAK;QAChB,IAAS,CAAA,SAAA,GAAG,IAAI;QAChB,IAAQ,CAAA,QAAA,GAAG,KAAK;QACjB,IAAI,CAAA,IAAA,GAAG,CAAC;AA0B5B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAgB,IAAI,CAAC;AACxC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;AAE5B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAYhD,IAAQ,CAAA,QAAA,GAA4B,IAAI;QACxC,IAAO,CAAA,OAAA,GAAe,IAAI;AAsD3B;IA9FC,IACI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC;;AAE5B,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,UAAU,EAAE;;AAM1B,IAAA,IACI,SAAS,GAAA;QACX,OAAO;AACL,YAAA,aAAa,EAAE,IAAI;YACnB,wBAAwB,EAAE,IAAI,CAAC,SAAS;AACxC,YAAA,uBAAuB,EAAE,IAAI,CAAC,UAAU,EAAE;YAC1C,uBAAuB,EAAE,IAAI,CAAC,QAAQ;SACvC;;AAW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AAmB,CAAA,EAAA,CAAA,CAAA;AAElB,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,gBAAgB,YAHjB,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAGlB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,mBAAmB,CAAC;oBAC9B,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA;;;ACdD;;;;;AAKG;;ACLH;;;;;AAKG;;ACLH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngwr",
3
- "version": "4.2.2",
3
+ "version": "4.3.0",
4
4
  "license": "MIT",
5
5
  "description": "NGWR – Angular UI components library",
6
6
  "author": "Roman Khegay <rk@garuna.dev> (https://garuna.dev)",
@@ -83,6 +83,9 @@
83
83
  "./tag/styles": {
84
84
  "sass": "./tag/styles/_index.scss"
85
85
  },
86
+ "./textarea/styles": {
87
+ "sass": "./textarea/styles/_index.scss"
88
+ },
86
89
  "./package.json": {
87
90
  "default": "./package.json"
88
91
  },
@@ -116,18 +119,18 @@
116
119
  "esm": "./esm2022/checkbox/ngwr-checkbox.mjs",
117
120
  "default": "./fesm2022/ngwr-checkbox.mjs"
118
121
  },
119
- "./dialog": {
120
- "types": "./dialog/index.d.ts",
121
- "esm2022": "./esm2022/dialog/ngwr-dialog.mjs",
122
- "esm": "./esm2022/dialog/ngwr-dialog.mjs",
123
- "default": "./fesm2022/ngwr-dialog.mjs"
124
- },
125
122
  "./divider": {
126
123
  "types": "./divider/index.d.ts",
127
124
  "esm2022": "./esm2022/divider/ngwr-divider.mjs",
128
125
  "esm": "./esm2022/divider/ngwr-divider.mjs",
129
126
  "default": "./fesm2022/ngwr-divider.mjs"
130
127
  },
128
+ "./dialog": {
129
+ "types": "./dialog/index.d.ts",
130
+ "esm2022": "./esm2022/dialog/ngwr-dialog.mjs",
131
+ "esm": "./esm2022/dialog/ngwr-dialog.mjs",
132
+ "default": "./fesm2022/ngwr-dialog.mjs"
133
+ },
131
134
  "./form": {
132
135
  "types": "./form/index.d.ts",
133
136
  "esm2022": "./esm2022/form/ngwr-form.mjs",
@@ -182,6 +185,12 @@
182
185
  "esm": "./esm2022/tag/ngwr-tag.mjs",
183
186
  "default": "./fesm2022/ngwr-tag.mjs"
184
187
  },
188
+ "./textarea": {
189
+ "types": "./textarea/index.d.ts",
190
+ "esm2022": "./esm2022/textarea/ngwr-textarea.mjs",
191
+ "esm": "./esm2022/textarea/ngwr-textarea.mjs",
192
+ "default": "./fesm2022/ngwr-textarea.mjs"
193
+ },
185
194
  "./cdk/rxjs": {
186
195
  "types": "./cdk/rxjs/index.d.ts",
187
196
  "esm2022": "./esm2022/cdk/rxjs/ngwr-cdk-rxjs.mjs",
package/styles.scss CHANGED
@@ -20,4 +20,5 @@
20
20
  @forward './skeleton/styles';
21
21
  @forward './spinner/styles';
22
22
  @forward './tag/styles';
23
+ @forward './textarea/styles';
23
24
  //@forward './tooltip';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Use of this source code is governed by an MIT-style license that can be
5
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
6
+ */
7
+ export * from './public-api';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Use of this source code is governed by an MIT-style license that can be
5
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
6
+ */
7
+ export * from './textarea.component';
8
+ export * from './textarea.module';
@@ -0,0 +1,77 @@
1
+ @forward './vars';
2
+
3
+ .wr-textarea {
4
+ --wr-textarea-padding-right: var(--wr-textarea-padding-x);
5
+ --wr-textarea-cursor: default;
6
+ --wr-textarea-resize: none;
7
+
8
+ display: flex;
9
+
10
+ cursor: var(--wr-textarea-cursor);
11
+
12
+ color: var(--wr-textarea-color);
13
+ font-size: var(--wr-textarea-font-size);
14
+ font-weight: var(--wr-textarea-font-weight);
15
+ line-height: var(--wr-textarea-line-height);
16
+
17
+ background-color: var(--wr-textarea-bg-color);
18
+ border: 1px solid var(--wr-textarea-border-color);
19
+ border-radius: var(--wr-textarea-border-radius);
20
+ box-shadow: var(--wr-textarea-box-shadow);
21
+
22
+ overflow: hidden;
23
+ position: relative;
24
+
25
+ transition: var(--wr-transition-base);
26
+
27
+ &--disabled {
28
+ --wr-textarea-cursor: not-allowed;
29
+ --wr-textarea-color: var(--wr-color-medium);
30
+ --wr-textarea-bg-color: var(--wr-color-light-lighter);
31
+ }
32
+
33
+ &--resizable {
34
+ --wr-textarea-resize: vertical;
35
+ }
36
+
37
+ &--autosize {
38
+ .wr-textarea__native {
39
+ overflow-y: hidden;
40
+ resize: none;
41
+ }
42
+ }
43
+
44
+ &__native {
45
+ display: inline-block;
46
+
47
+ flex: 1;
48
+
49
+ appearance: none;
50
+ background: none;
51
+ border: none;
52
+ outline: none;
53
+ margin: 0;
54
+ vertical-align: middle;
55
+ white-space: normal;
56
+
57
+ resize: var(--wr-textarea-resize);
58
+
59
+ color: inherit;
60
+ font-size: inherit;
61
+ font-weight: inherit;
62
+ line-height: inherit;
63
+
64
+ padding: var(--wr-textarea-padding-y) var(--wr-textarea-padding-x);
65
+ padding-right: var(--wr-textarea-padding-right);
66
+
67
+ &[disabled],
68
+ &:disabled {
69
+ cursor: var(--wr-textarea-cursor);
70
+ }
71
+
72
+ &::placeholder {
73
+ color: var(--wr-textarea-placeholder-color);
74
+ font-style: italic;
75
+ }
76
+ }
77
+ }
@@ -0,0 +1,17 @@
1
+ :root {
2
+ --wr-textarea-color: var(--wr-color-dark);
3
+ --wr-textarea-placeholder-color: var(--wr-color-light);
4
+ --wr-textarea-suffix-prefix-color: var(--wr-color-medium);
5
+ --wr-textarea-bg-color: var(--wr-color-white);
6
+ --wr-textarea-border-color: var(--wr-color-light-lighter);
7
+ --wr-textarea-border-radius: 0.375rem;
8
+ --wr-textarea-box-shadow: none;
9
+ --wr-textarea-icon-size: 1.25rem;
10
+ --wr-textarea-icon-color: var(--wr-color-medium);
11
+ --wr-textarea-font-size: 0.875rem;
12
+ --wr-textarea-font-weight: 400;
13
+ --wr-textarea-font-family: var(--wr-font-family-base);
14
+ --wr-textarea-line-height: 1.25rem;
15
+ --wr-textarea-padding-y: 0.375rem;
16
+ --wr-textarea-padding-x: 0.825rem;
17
+ }
@@ -0,0 +1,44 @@
1
+ import { AfterViewInit } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { WrAbstractBase } from 'ngwr/cdk';
4
+ import { SafeAny } from 'ngwr/cdk/types';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * NGWR textarea component.
8
+ *
9
+ * {@tutorial} [How to use wr-textarea]{@link http://ngwr.dev/docs/components/textarea}
10
+ */
11
+ export declare class WrTextareaComponent extends WrAbstractBase implements ControlValueAccessor, AfterViewInit {
12
+ placeholder: string;
13
+ readonly: boolean;
14
+ resizable: boolean;
15
+ autosize: boolean;
16
+ rows: number;
17
+ maxRows?: number;
18
+ set disabled(value: boolean);
19
+ get disabled(): boolean;
20
+ private textareaNative;
21
+ get elClasses(): SafeAny;
22
+ protected value?: string;
23
+ protected readonly inputValue: import("@angular/core").WritableSignal<string | null>;
24
+ protected readonly isDisabled: import("@angular/core").WritableSignal<boolean>;
25
+ private readonly platformId;
26
+ private readonly cdr;
27
+ private get isBrowser();
28
+ ngAfterViewInit(): void;
29
+ onChange: (value: string) => void;
30
+ onTouch: () => void;
31
+ registerOnChange(fn: (value: string) => void): void;
32
+ registerOnTouched(fn: () => void): void;
33
+ setDisabledState(isDisabled: boolean): void;
34
+ writeValue(value: string): void;
35
+ resizeTextarea(): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrTextareaComponent, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrTextareaComponent, "wr-textarea", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "autosize": { "alias": "autosize"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "maxRows": { "alias": "maxRows"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
38
+ static ngAcceptInputType_readonly: unknown;
39
+ static ngAcceptInputType_resizable: unknown;
40
+ static ngAcceptInputType_autosize: unknown;
41
+ static ngAcceptInputType_rows: unknown;
42
+ static ngAcceptInputType_maxRows: unknown;
43
+ static ngAcceptInputType_disabled: unknown;
44
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./textarea.component";
3
+ export declare class WrTextareaModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrTextareaModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WrTextareaModule, never, [typeof i1.WrTextareaComponent], [typeof i1.WrTextareaComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<WrTextareaModule>;
7
+ }