ngwr 0.1.3 → 0.2.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 (230) hide show
  1. package/LICENSE +3 -1
  2. package/README.md +35 -22
  3. package/_index.scss +27 -0
  4. package/button/{button.module.d.ts → button-module.d.ts} +4 -4
  5. package/button/button.d.ts +58 -0
  6. package/button/button.scss +160 -0
  7. package/button/index.d.ts +2 -2
  8. package/checkbox/{checkbox.module.d.ts → checkbox-module.d.ts} +2 -2
  9. package/checkbox/checkbox.d.ts +49 -0
  10. package/checkbox/checkbox.scss +103 -0
  11. package/checkbox/index.d.ts +2 -2
  12. package/core/abstract/base.d.ts +9 -0
  13. package/core/abstract/index.d.ts +1 -0
  14. package/core/color/color.d.ts +2 -0
  15. package/core/color/index.d.ts +2 -0
  16. package/core/color/is-theme-color.d.ts +2 -0
  17. package/core/decorators/index.d.ts +1 -0
  18. package/core/decorators/input-boolean.d.ts +1 -0
  19. package/core/types/index.d.ts +3 -0
  20. package/{_core → core}/types/on-change-type.d.ts +0 -0
  21. package/{_core → core}/types/on-touched-type.d.ts +0 -0
  22. package/{_core → core}/types/safe-any.d.ts +0 -0
  23. package/divider/{divider.module.d.ts → divider-module.d.ts} +2 -2
  24. package/divider/divider.d.ts +40 -0
  25. package/divider/divider.scss +34 -0
  26. package/divider/index.d.ts +2 -2
  27. package/esm2020/button/button-module.mjs +20 -0
  28. package/esm2020/button/button.mjs +187 -0
  29. package/esm2020/button/index.mjs +3 -3
  30. package/esm2020/button/ngwr-button.mjs +5 -0
  31. package/esm2020/checkbox/checkbox-module.mjs +20 -0
  32. package/esm2020/checkbox/checkbox.mjs +154 -0
  33. package/esm2020/checkbox/index.mjs +3 -3
  34. package/esm2020/checkbox/ngwr-checkbox.mjs +5 -0
  35. package/esm2020/core/abstract/base.mjs +18 -0
  36. package/esm2020/core/abstract/index.mjs +2 -0
  37. package/esm2020/core/abstract/ngwr-core-abstract.mjs +5 -0
  38. package/esm2020/core/color/color.mjs +11 -0
  39. package/esm2020/core/color/index.mjs +3 -0
  40. package/esm2020/core/color/is-theme-color.mjs +9 -0
  41. package/esm2020/core/color/ngwr-core-color.mjs +5 -0
  42. package/esm2020/core/decorators/index.mjs +2 -0
  43. package/esm2020/core/decorators/input-boolean.mjs +15 -0
  44. package/esm2020/core/decorators/ngwr-core-decorators.mjs +5 -0
  45. package/esm2020/core/types/index.mjs +4 -0
  46. package/esm2020/core/types/ngwr-core-types.mjs +5 -0
  47. package/esm2020/core/types/on-change-type.mjs +2 -0
  48. package/esm2020/core/types/on-touched-type.mjs +2 -0
  49. package/esm2020/core/types/safe-any.mjs +2 -0
  50. package/esm2020/divider/divider-module.mjs +16 -0
  51. package/esm2020/divider/divider.mjs +100 -0
  52. package/esm2020/divider/index.mjs +3 -3
  53. package/esm2020/divider/ngwr-divider.mjs +5 -0
  54. package/esm2020/form/form-error.mjs +23 -0
  55. package/esm2020/form/form-item.mjs +46 -0
  56. package/esm2020/form/form-module.mjs +19 -0
  57. package/esm2020/form/index.mjs +4 -4
  58. package/esm2020/form/ngwr-form.mjs +5 -0
  59. package/esm2020/icon/icon-module.mjs +21 -0
  60. package/esm2020/icon/icon-service.mjs +21 -0
  61. package/esm2020/icon/icon.mjs +60 -0
  62. package/esm2020/icon/icons.mjs +424 -0
  63. package/esm2020/icon/index.mjs +5 -5
  64. package/esm2020/icon/ngwr-icon.mjs +5 -0
  65. package/esm2020/index.mjs +3 -0
  66. package/esm2020/input/index.mjs +3 -3
  67. package/esm2020/input/input-module.mjs +20 -0
  68. package/esm2020/input/input-types.mjs +2 -0
  69. package/esm2020/input/input.mjs +240 -0
  70. package/esm2020/input/ngwr-input.mjs +5 -0
  71. package/esm2020/ngwr.mjs +2 -2
  72. package/esm2020/skeleton/index.mjs +3 -3
  73. package/esm2020/skeleton/ngwr-skeleton.mjs +5 -0
  74. package/esm2020/skeleton/skeleton-module.mjs +18 -0
  75. package/esm2020/skeleton/skeleton.mjs +44 -0
  76. package/esm2020/spinner/index.mjs +3 -3
  77. package/esm2020/spinner/ngwr-spinner.mjs +5 -0
  78. package/esm2020/spinner/spinner-module.mjs +16 -0
  79. package/esm2020/spinner/spinner.mjs +23 -0
  80. package/esm2020/tag/index.mjs +3 -3
  81. package/esm2020/tag/ngwr-tag.mjs +5 -0
  82. package/esm2020/tag/tag-module.mjs +20 -0
  83. package/esm2020/tag/tag.mjs +80 -0
  84. package/fesm2015/ngwr-button.mjs +211 -0
  85. package/fesm2015/ngwr-button.mjs.map +1 -0
  86. package/fesm2015/ngwr-checkbox.mjs +177 -0
  87. package/fesm2015/ngwr-checkbox.mjs.map +1 -0
  88. package/fesm2015/ngwr-core-abstract.mjs +25 -0
  89. package/fesm2015/ngwr-core-abstract.mjs.map +1 -0
  90. package/fesm2015/ngwr-core-color.mjs +25 -0
  91. package/fesm2015/ngwr-core-color.mjs.map +1 -0
  92. package/fesm2015/ngwr-core-decorators.mjs +22 -0
  93. package/fesm2015/ngwr-core-decorators.mjs.map +1 -0
  94. package/fesm2015/ngwr-core-types.mjs +4 -0
  95. package/fesm2015/ngwr-core-types.mjs.map +1 -0
  96. package/fesm2015/ngwr-divider.mjs +120 -0
  97. package/fesm2015/ngwr-divider.mjs.map +1 -0
  98. package/fesm2015/ngwr-form.mjs +89 -0
  99. package/fesm2015/ngwr-form.mjs.map +1 -0
  100. package/fesm2015/ngwr-icon.mjs +527 -0
  101. package/fesm2015/ngwr-icon.mjs.map +1 -0
  102. package/fesm2015/ngwr-input.mjs +262 -0
  103. package/fesm2015/ngwr-input.mjs.map +1 -0
  104. package/fesm2015/ngwr-skeleton.mjs +66 -0
  105. package/fesm2015/ngwr-skeleton.mjs.map +1 -0
  106. package/fesm2015/ngwr-spinner.mjs +43 -0
  107. package/fesm2015/ngwr-spinner.mjs.map +1 -0
  108. package/fesm2015/ngwr-tag.mjs +104 -0
  109. package/fesm2015/ngwr-tag.mjs.map +1 -0
  110. package/fesm2015/ngwr.mjs +2 -1404
  111. package/fesm2015/ngwr.mjs.map +1 -1
  112. package/fesm2020/ngwr-button.mjs +211 -0
  113. package/fesm2020/ngwr-button.mjs.map +1 -0
  114. package/fesm2020/ngwr-checkbox.mjs +177 -0
  115. package/fesm2020/ngwr-checkbox.mjs.map +1 -0
  116. package/fesm2020/ngwr-core-abstract.mjs +25 -0
  117. package/fesm2020/ngwr-core-abstract.mjs.map +1 -0
  118. package/fesm2020/ngwr-core-color.mjs +25 -0
  119. package/fesm2020/ngwr-core-color.mjs.map +1 -0
  120. package/fesm2020/ngwr-core-decorators.mjs +22 -0
  121. package/fesm2020/ngwr-core-decorators.mjs.map +1 -0
  122. package/fesm2020/ngwr-core-types.mjs +4 -0
  123. package/fesm2020/ngwr-core-types.mjs.map +1 -0
  124. package/fesm2020/ngwr-divider.mjs +120 -0
  125. package/fesm2020/ngwr-divider.mjs.map +1 -0
  126. package/fesm2020/ngwr-form.mjs +89 -0
  127. package/fesm2020/ngwr-form.mjs.map +1 -0
  128. package/fesm2020/ngwr-icon.mjs +525 -0
  129. package/fesm2020/ngwr-icon.mjs.map +1 -0
  130. package/fesm2020/ngwr-input.mjs +263 -0
  131. package/fesm2020/ngwr-input.mjs.map +1 -0
  132. package/fesm2020/ngwr-skeleton.mjs +66 -0
  133. package/fesm2020/ngwr-skeleton.mjs.map +1 -0
  134. package/fesm2020/ngwr-spinner.mjs +43 -0
  135. package/fesm2020/ngwr-spinner.mjs.map +1 -0
  136. package/fesm2020/ngwr-tag.mjs +104 -0
  137. package/fesm2020/ngwr-tag.mjs.map +1 -0
  138. package/fesm2020/ngwr.mjs +2 -1402
  139. package/fesm2020/ngwr.mjs.map +1 -1
  140. package/form/form-error.d.ts +6 -0
  141. package/form/form-item.d.ts +15 -0
  142. package/form/{form.module.d.ts → form-module.d.ts} +3 -3
  143. package/form/form.scss +52 -0
  144. package/form/index.d.ts +3 -3
  145. package/icon/{wr-icon.module.d.ts → icon-module.d.ts} +2 -2
  146. package/icon/{wr-icon.service.d.ts → icon-service.d.ts} +0 -9
  147. package/icon/icon.d.ts +20 -0
  148. package/icon/icon.scss +27 -0
  149. package/icon/{wr-icons.d.ts → icons.d.ts} +59 -3
  150. package/icon/index.d.ts +4 -4
  151. package/index.d.ts +2 -5
  152. package/input/index.d.ts +2 -2
  153. package/input/{input.module.d.ts → input-module.d.ts} +3 -3
  154. package/{_core/types/input-autocomplete-type.d.ts → input/input-types.d.ts} +2 -0
  155. package/input/{input.component.d.ts → input.d.ts} +7 -4
  156. package/input/input.scss +163 -0
  157. package/logo.svg +6 -1
  158. package/package.json +124 -19
  159. package/skeleton/index.d.ts +2 -2
  160. package/skeleton/{skeleton.module.d.ts → skeleton-module.d.ts} +2 -2
  161. package/skeleton/skeleton.d.ts +11 -0
  162. package/skeleton/skeleton.scss +54 -0
  163. package/spinner/index.d.ts +2 -2
  164. package/spinner/{spinner.module.d.ts → spinner-module.d.ts} +2 -2
  165. package/spinner/spinner.d.ts +6 -0
  166. package/spinner/spinner.scss +33 -0
  167. package/styles/animations.scss +14 -0
  168. package/styles/grid.scss +164 -0
  169. package/styles/reset.scss +106 -0
  170. package/styles/root.scss +152 -0
  171. package/styles/vars.scss +2 -0
  172. package/tag/index.d.ts +2 -2
  173. package/tag/{tag.module.d.ts → tag-module.d.ts} +4 -4
  174. package/tag/tag.d.ts +18 -0
  175. package/tag/tag.scss +106 -0
  176. package/_core/components/base.component.d.ts +0 -9
  177. package/_core/constants/style-prefix.d.ts +0 -1
  178. package/_core/index.d.ts +0 -4
  179. package/_core/types/boolean-input.d.ts +0 -1
  180. package/_core/types/color.d.ts +0 -1
  181. package/_core/types/index.d.ts +0 -8
  182. package/_core/types/input-mode-type.d.ts +0 -1
  183. package/_core/types/input-type.d.ts +0 -1
  184. package/_core/util/convert.d.ts +0 -19
  185. package/button/button.component.d.ts +0 -36
  186. package/checkbox/checkbox.component.d.ts +0 -32
  187. package/divider/divider.component.d.ts +0 -28
  188. package/esm2020/_core/components/base.component.mjs +0 -18
  189. package/esm2020/_core/constants/style-prefix.mjs +0 -2
  190. package/esm2020/_core/index.mjs +0 -9
  191. package/esm2020/_core/types/boolean-input.mjs +0 -2
  192. package/esm2020/_core/types/color.mjs +0 -2
  193. package/esm2020/_core/types/index.mjs +0 -2
  194. package/esm2020/_core/types/input-autocomplete-type.mjs +0 -2
  195. package/esm2020/_core/types/input-mode-type.mjs +0 -2
  196. package/esm2020/_core/types/input-type.mjs +0 -2
  197. package/esm2020/_core/types/on-change-type.mjs +0 -2
  198. package/esm2020/_core/types/on-touched-type.mjs +0 -2
  199. package/esm2020/_core/types/safe-any.mjs +0 -2
  200. package/esm2020/_core/util/convert.mjs +0 -51
  201. package/esm2020/button/button.component.mjs +0 -137
  202. package/esm2020/button/button.module.mjs +0 -20
  203. package/esm2020/checkbox/checkbox.component.mjs +0 -128
  204. package/esm2020/checkbox/checkbox.module.mjs +0 -20
  205. package/esm2020/divider/divider.component.mjs +0 -72
  206. package/esm2020/divider/divider.module.mjs +0 -16
  207. package/esm2020/form/form-error.component.mjs +0 -23
  208. package/esm2020/form/form-item.component.mjs +0 -35
  209. package/esm2020/form/form.module.mjs +0 -19
  210. package/esm2020/icon/wr-icon.component.mjs +0 -51
  211. package/esm2020/icon/wr-icon.module.mjs +0 -21
  212. package/esm2020/icon/wr-icon.service.mjs +0 -30
  213. package/esm2020/icon/wr-icons.mjs +0 -384
  214. package/esm2020/input/input.component.mjs +0 -239
  215. package/esm2020/input/input.module.mjs +0 -20
  216. package/esm2020/public-api.mjs +0 -11
  217. package/esm2020/skeleton/skeleton.component.mjs +0 -47
  218. package/esm2020/skeleton/skeleton.module.mjs +0 -18
  219. package/esm2020/spinner/spinner.component.mjs +0 -23
  220. package/esm2020/spinner/spinner.module.mjs +0 -16
  221. package/esm2020/tag/tag.component.mjs +0 -80
  222. package/esm2020/tag/tag.module.mjs +0 -20
  223. package/form/form-error.component.d.ts +0 -6
  224. package/form/form-item.component.d.ts +0 -8
  225. package/icon/wr-icon.component.d.ts +0 -17
  226. package/ngwr.min.css +0 -8
  227. package/public-api.d.ts +0 -10
  228. package/skeleton/skeleton.component.d.ts +0 -9
  229. package/spinner/spinner.component.d.ts +0 -6
  230. package/tag/tag.component.d.ts +0 -16
@@ -0,0 +1,22 @@
1
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
+
3
+ function InputBoolean() {
4
+ return (target, propertyKey) => {
5
+ const coercedBooleanKey = `$$__wr__${String(propertyKey)}`;
6
+ Object.defineProperty(target, propertyKey, {
7
+ get: function () {
8
+ return this[coercedBooleanKey] || false;
9
+ },
10
+ set: function (value) {
11
+ this[coercedBooleanKey] = coerceBooleanProperty(value);
12
+ },
13
+ });
14
+ };
15
+ }
16
+
17
+ /**
18
+ * Generated bundle index. Do not edit.
19
+ */
20
+
21
+ export { InputBoolean };
22
+ //# sourceMappingURL=ngwr-core-decorators.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-core-decorators.mjs","sources":["../../../projects/lib/core/decorators/input-boolean.ts","../../../projects/lib/core/decorators/ngwr-core-decorators.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\n\nimport { SafeAny } from 'ngwr/core/types';\n\nexport function InputBoolean(): PropertyDecorator {\n return (target: SafeAny, propertyKey: string | symbol): void => {\n const coercedBooleanKey = `$$__wr__${String(propertyKey)}`;\n\n Object.defineProperty(target, propertyKey, {\n get: function (): boolean {\n return this[coercedBooleanKey] || false;\n },\n set: function (value: boolean | unknown): void {\n this[coercedBooleanKey] = coerceBooleanProperty(value);\n },\n });\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;SAIgB,YAAY,GAAA;AAC1B,IAAA,OAAO,CAAC,MAAe,EAAE,WAA4B,KAAU;QAC7D,MAAM,iBAAiB,GAAG,CAAW,QAAA,EAAA,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;AAE3D,QAAA,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;AACzC,YAAA,GAAG,EAAE,YAAA;AACH,gBAAA,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC;aACzC;YACD,GAAG,EAAE,UAAU,KAAwB,EAAA;gBACrC,IAAI,CAAC,iBAAiB,CAAC,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;aACxD;AACF,SAAA,CAAC,CAAC;AACL,KAAC,CAAC;AACJ;;ACjBA;;AAEG;;;;"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ //# sourceMappingURL=ngwr-core-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-core-types.mjs","sources":["../../../projects/lib/core/types/ngwr-core-types.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;AAEG"}
@@ -0,0 +1,120 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core';
3
+ import { isThemeColor } from 'ngwr/core/color';
4
+
5
+ class WrDivider {
6
+ constructor(cdr) {
7
+ this.cdr = cdr;
8
+ this._color = 'light';
9
+ this._type = 'solid';
10
+ this._width = '1px';
11
+ /** Set element role **/
12
+ this.role = 'separator';
13
+ }
14
+ /**
15
+ * Set color of `wr-divider`
16
+ *
17
+ * @default 'light';
18
+ */
19
+ get color() {
20
+ return this._color;
21
+ }
22
+ set color(value) {
23
+ this._color = isThemeColor(value) ? value : 'primary';
24
+ this.cdr.markForCheck();
25
+ }
26
+ /**
27
+ * Set style of `wr-divider`
28
+ *
29
+ * @default `solid`;
30
+ */
31
+ get type() {
32
+ return this._type;
33
+ }
34
+ set type(value) {
35
+ this._type = value;
36
+ this.cdr.markForCheck();
37
+ }
38
+ /**
39
+ * Set width of `wr-divider`
40
+ *
41
+ * @default 1px;
42
+ */
43
+ get width() {
44
+ return this._width;
45
+ }
46
+ set width(value) {
47
+ this._width = value;
48
+ this.cdr.markForCheck();
49
+ }
50
+ /** Set element classes */
51
+ get elClasses() {
52
+ return {
53
+ 'wr-divider': true,
54
+ 'wr-divider--primary': this.color === 'primary',
55
+ 'wr-divider--secondary': this.color === 'secondary',
56
+ 'wr-divider--success': this.color === 'success',
57
+ 'wr-divider--warning': this.color === 'warning',
58
+ 'wr-divider--danger': this.color === 'danger',
59
+ 'wr-divider--light': this.color === 'light',
60
+ 'wr-divider--medium': this.color === 'medium',
61
+ 'wr-divider--dark': this.color === 'dark',
62
+ 'wr-divider--solid': this.type === 'solid',
63
+ 'wr-divider--dashed': this.type === 'dashed',
64
+ 'wr-divider--dotted': this.type === 'dotted',
65
+ };
66
+ }
67
+ /** Set element style **/
68
+ get elStyles() {
69
+ return {
70
+ '--wr-divider-width': this.width,
71
+ };
72
+ }
73
+ }
74
+ WrDivider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDivider, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
75
+ WrDivider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.10", type: WrDivider, selector: "wr-divider", inputs: { color: "color", type: "type", width: "width" }, host: { properties: { "class": "this.elClasses", "style": "this.elStyles", "role": "this.role" } }, exportAs: ["wrDivider"], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDivider, decorators: [{
77
+ type: Component,
78
+ args: [{
79
+ selector: 'wr-divider',
80
+ exportAs: 'wrDivider',
81
+ template: '',
82
+ changeDetection: ChangeDetectionStrategy.OnPush,
83
+ encapsulation: ViewEncapsulation.None,
84
+ }]
85
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { color: [{
86
+ type: Input
87
+ }], type: [{
88
+ type: Input
89
+ }], width: [{
90
+ type: Input
91
+ }], elClasses: [{
92
+ type: HostBinding,
93
+ args: ['class']
94
+ }], elStyles: [{
95
+ type: HostBinding,
96
+ args: ['style']
97
+ }], role: [{
98
+ type: HostBinding,
99
+ args: ['role']
100
+ }] } });
101
+
102
+ class WrDividerModule {
103
+ }
104
+ WrDividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
105
+ WrDividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.10", ngImport: i0, type: WrDividerModule, declarations: [WrDivider], exports: [WrDivider] });
106
+ WrDividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDividerModule });
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrDividerModule, decorators: [{
108
+ type: NgModule,
109
+ args: [{
110
+ declarations: [WrDivider],
111
+ exports: [WrDivider],
112
+ }]
113
+ }] });
114
+
115
+ /**
116
+ * Generated bundle index. Do not edit.
117
+ */
118
+
119
+ export { WrDivider, WrDividerModule };
120
+ //# sourceMappingURL=ngwr-divider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-divider.mjs","sources":["../../../projects/lib/divider/divider.ts","../../../projects/lib/divider/divider-module.ts","../../../projects/lib/divider/ngwr-divider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { isThemeColor, WrThemeColor } from 'ngwr/core/color';\nimport { SafeAny } from 'ngwr/core/types';\n\n@Component({\n selector: 'wr-divider',\n exportAs: 'wrDivider',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrDivider {\n /**\n * Set color of `wr-divider`\n *\n * @default 'light';\n */\n @Input()\n get color(): WrThemeColor {\n return this._color;\n }\n set color(value: WrThemeColor) {\n this._color = isThemeColor(value) ? value : 'primary';\n this.cdr.markForCheck();\n }\n private _color: WrThemeColor = 'light';\n /**\n * Set style of `wr-divider`\n *\n * @default `solid`;\n */\n @Input()\n get type(): 'solid' | 'dashed' | 'dotted' {\n return this._type;\n }\n set type(value: 'solid' | 'dashed' | 'dotted') {\n this._type = value;\n this.cdr.markForCheck();\n }\n private _type: 'solid' | 'dashed' | 'dotted' = 'solid';\n /**\n * Set width of `wr-divider`\n *\n * @default 1px;\n */\n @Input()\n get width(): string {\n return this._width;\n }\n set width(value: string) {\n this._width = value;\n this.cdr.markForCheck();\n }\n private _width: string = '1px';\n\n /** Set element classes */\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-divider': true,\n 'wr-divider--primary': this.color === 'primary',\n 'wr-divider--secondary': this.color === 'secondary',\n 'wr-divider--success': this.color === 'success',\n 'wr-divider--warning': this.color === 'warning',\n 'wr-divider--danger': this.color === 'danger',\n 'wr-divider--light': this.color === 'light',\n 'wr-divider--medium': this.color === 'medium',\n 'wr-divider--dark': this.color === 'dark',\n 'wr-divider--solid': this.type === 'solid',\n 'wr-divider--dashed': this.type === 'dashed',\n 'wr-divider--dotted': this.type === 'dotted',\n };\n }\n\n /** Set element style **/\n @HostBinding('style')\n get elStyles(): SafeAny {\n return {\n '--wr-divider-width': this.width,\n };\n }\n\n /** Set element role **/\n @HostBinding('role') role = 'separator';\n\n constructor(private readonly cdr: ChangeDetectorRef) {}\n}\n","import { NgModule } from '@angular/core';\n\nimport { WrDivider } from './divider';\n\n@NgModule({\n declarations: [WrDivider],\n exports: [WrDivider],\n})\nexport class WrDividerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAmBa,SAAS,CAAA;AA0EpB,IAAA,WAAA,CAA6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AAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC,CAAA;wGAQK,KAAK,EAAA,CAAA;sBADR,KAAK;gBAeF,IAAI,EAAA,CAAA;sBADP,KAAK;gBAeF,KAAK,EAAA,CAAA;sBADR,KAAK;gBAYF,SAAS,EAAA,CAAA;sBADZ,WAAW;uBAAC,OAAO,CAAA;gBAoBhB,QAAQ,EAAA,CAAA;sBADX,WAAW;uBAAC,OAAO,CAAA;gBAQC,IAAI,EAAA,CAAA;sBAAxB,WAAW;uBAAC,MAAM,CAAA;;;MCnFR,eAAe,CAAA;;6GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAf,eAAe,EAAA,YAAA,EAAA,CAHX,SAAS,CAAA,EAAA,OAAA,EAAA,CACd,SAAS,CAAA,EAAA,CAAA,CAAA;8GAER,eAAe,EAAA,CAAA,CAAA;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,SAAS,CAAC;oBACzB,OAAO,EAAE,CAAC,SAAS,CAAC;iBACrB,CAAA;;;ACPD;;AAEG;;;;"}
@@ -0,0 +1,89 @@
1
+ import { __decorate } from 'tslib';
2
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
3
+ import * as i0 from '@angular/core';
4
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core';
5
+ import { InputBoolean } from 'ngwr/core/decorators';
6
+ import { CommonModule } from '@angular/common';
7
+
8
+ class WrFormItem {
9
+ constructor(cdr) {
10
+ this.cdr = cdr;
11
+ this._hasError = false;
12
+ }
13
+ get hasError() {
14
+ return this._hasError;
15
+ }
16
+ set hasError(value) {
17
+ this._hasError = coerceBooleanProperty(value);
18
+ this.cdr.markForCheck();
19
+ }
20
+ /** Set element classes */
21
+ get elClasses() {
22
+ return {
23
+ 'wr-form-item': true,
24
+ 'wr-form-item--has-error': this.hasError,
25
+ };
26
+ }
27
+ }
28
+ WrFormItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrFormItem, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
29
+ WrFormItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.10", type: WrFormItem, selector: "wr-form-item", inputs: { hasError: "hasError" }, host: { properties: { "class": "this.elClasses" } }, exportAs: ["wrFormItem"], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
30
+ __decorate([
31
+ InputBoolean()
32
+ ], WrFormItem.prototype, "hasError", null);
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrFormItem, decorators: [{
34
+ type: Component,
35
+ args: [{
36
+ selector: 'wr-form-item',
37
+ exportAs: 'wrFormItem',
38
+ template: `<ng-content></ng-content>`,
39
+ changeDetection: ChangeDetectionStrategy.OnPush,
40
+ encapsulation: ViewEncapsulation.None,
41
+ }]
42
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { hasError: [{
43
+ type: Input
44
+ }], elClasses: [{
45
+ type: HostBinding,
46
+ args: ['class']
47
+ }] } });
48
+
49
+ class WrFormError {
50
+ constructor() {
51
+ this.class = 'wr-form-error';
52
+ }
53
+ }
54
+ WrFormError.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrFormError, deps: [], target: i0.ɵɵFactoryTarget.Component });
55
+ WrFormError.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.10", type: WrFormError, selector: "wr-form-error", host: { properties: { "class": "this.class" } }, exportAs: ["wrFormError"], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrFormError, decorators: [{
57
+ type: Component,
58
+ args: [{
59
+ selector: 'wr-form-error',
60
+ exportAs: 'wrFormError',
61
+ template: `<ng-content></ng-content>`,
62
+ changeDetection: ChangeDetectionStrategy.OnPush,
63
+ encapsulation: ViewEncapsulation.None,
64
+ }]
65
+ }], propDecorators: { class: [{
66
+ type: HostBinding,
67
+ args: ['class']
68
+ }] } });
69
+
70
+ class WrFormModule {
71
+ }
72
+ WrFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
73
+ WrFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.10", ngImport: i0, type: WrFormModule, declarations: [WrFormItem, WrFormError], imports: [CommonModule], exports: [WrFormItem, WrFormError] });
74
+ WrFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrFormModule, imports: [CommonModule] });
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: WrFormModule, decorators: [{
76
+ type: NgModule,
77
+ args: [{
78
+ imports: [CommonModule],
79
+ declarations: [WrFormItem, WrFormError],
80
+ exports: [WrFormItem, WrFormError],
81
+ }]
82
+ }] });
83
+
84
+ /**
85
+ * Generated bundle index. Do not edit.
86
+ */
87
+
88
+ export { WrFormError, WrFormItem, WrFormModule };
89
+ //# sourceMappingURL=ngwr-form.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-form.mjs","sources":["../../../projects/lib/form/form-item.ts","../../../projects/lib/form/form-error.ts","../../../projects/lib/form/form-module.ts","../../../projects/lib/form/ngwr-form.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { InputBoolean } from 'ngwr/core/decorators';\nimport { SafeAny } from 'ngwr/core/types';\n\n@Component({\n selector: 'wr-form-item',\n exportAs: 'wrFormItem',\n template: `<ng-content></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrFormItem {\n @Input()\n @InputBoolean()\n get hasError(): boolean {\n return this._hasError;\n }\n set hasError(value: BooleanInput) {\n this._hasError = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n private _hasError: boolean = false;\n\n /** Set element classes */\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-form-item': true,\n 'wr-form-item--has-error': this.hasError,\n };\n }\n\n constructor(private readonly cdr: ChangeDetectorRef) {}\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'wr-form-error',\n exportAs: 'wrFormError',\n template: `<ng-content></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrFormError {\n @HostBinding('class') class = 'wr-form-error';\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { WrFormError } from './form-error';\nimport { WrFormItem } from './form-item';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [WrFormItem, WrFormError],\n exports: [WrFormItem, WrFormError],\n})\nexport class WrFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAoBa,UAAU,CAAA;AAqBrB,IAAA,WAAA,CAA6B,GAAsB,EAAA;AAAtB,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AAX3C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