ngwr 0.0.2 → 0.0.6

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 (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +30 -0
  3. package/_core/components/base.component.d.ts +11 -0
  4. package/_core/constants/style-prefix.d.ts +1 -0
  5. package/_core/index.d.ts +4 -0
  6. package/_core/types/boolean-input.d.ts +1 -0
  7. package/_core/util/convert.d.ts +18 -0
  8. package/button/button.component.d.ts +27 -0
  9. package/button/button.module.d.ts +9 -0
  10. package/button/{index.ts → index.d.ts} +0 -0
  11. package/divider/divider.component.d.ts +6 -0
  12. package/divider/divider.module.d.ts +7 -0
  13. package/divider/{index.ts → index.d.ts} +0 -0
  14. package/esm2020/_core/components/base.component.mjs +23 -0
  15. package/esm2020/_core/constants/style-prefix.mjs +2 -0
  16. package/esm2020/_core/index.mjs +9 -0
  17. package/esm2020/_core/types/boolean-input.mjs +2 -0
  18. package/esm2020/_core/util/convert.mjs +50 -0
  19. package/esm2020/button/button.component.mjs +132 -0
  20. package/esm2020/button/button.module.mjs +19 -0
  21. package/esm2020/button/index.mjs +3 -0
  22. package/esm2020/divider/divider.component.mjs +23 -0
  23. package/esm2020/divider/divider.module.mjs +16 -0
  24. package/esm2020/divider/index.mjs +3 -0
  25. package/esm2020/extended-input/extended-input.component.mjs +68 -0
  26. package/esm2020/extended-input/extended-input.module.mjs +28 -0
  27. package/esm2020/extended-input/index.mjs +3 -0
  28. package/esm2020/form/form-error.component.mjs +23 -0
  29. package/esm2020/form/form-item.component.mjs +48 -0
  30. package/esm2020/form/form.module.mjs +27 -0
  31. package/esm2020/form/index.mjs +4 -0
  32. package/esm2020/icon/index.mjs +5 -0
  33. package/esm2020/icon/wr-icon.component.mjs +51 -0
  34. package/esm2020/icon/wr-icon.module.mjs +21 -0
  35. package/esm2020/icon/wr-icon.service.mjs +30 -0
  36. package/esm2020/icon/wr-icons.mjs +244 -0
  37. package/esm2020/input/index.mjs +3 -0
  38. package/esm2020/input/input.directive.mjs +61 -0
  39. package/esm2020/input/input.module.mjs +19 -0
  40. package/esm2020/ngwr.mjs +5 -0
  41. package/esm2020/password-input/index.mjs +3 -0
  42. package/esm2020/password-input/password-input.component.mjs +58 -0
  43. package/esm2020/password-input/password-input.module.mjs +36 -0
  44. package/esm2020/public-api.mjs +11 -0
  45. package/esm2020/skeleton/index.mjs +3 -0
  46. package/esm2020/skeleton/skeleton.component.mjs +31 -0
  47. package/esm2020/skeleton/skeleton.module.mjs +19 -0
  48. package/esm2020/spinner/index.mjs +3 -0
  49. package/esm2020/spinner/spinner.component.mjs +23 -0
  50. package/esm2020/spinner/spinner.module.mjs +16 -0
  51. package/esm2020/tag/index.mjs +3 -0
  52. package/esm2020/tag/tag.component.mjs +84 -0
  53. package/esm2020/tag/tag.module.mjs +19 -0
  54. package/extended-input/extended-input.component.d.ts +25 -0
  55. package/extended-input/extended-input.module.d.ts +10 -0
  56. package/extended-input/{index.ts → index.d.ts} +0 -0
  57. package/fesm2015/ngwr.mjs +1092 -0
  58. package/fesm2015/ngwr.mjs.map +1 -0
  59. package/fesm2020/ngwr.mjs +1082 -0
  60. package/fesm2020/ngwr.mjs.map +1 -0
  61. package/form/form-error.component.d.ts +6 -0
  62. package/form/form-item.component.d.ts +16 -0
  63. package/form/form.module.d.ts +9 -0
  64. package/form/{index.ts → index.d.ts} +0 -0
  65. package/icon/index.d.ts +4 -0
  66. package/icon/wr-icon.component.d.ts +16 -0
  67. package/icon/wr-icon.module.d.ts +9 -0
  68. package/icon/wr-icon.service.d.ts +17 -0
  69. package/icon/wr-icons.d.ts +343 -0
  70. package/index.d.ts +5 -0
  71. package/input/{index.ts → index.d.ts} +0 -0
  72. package/input/input.directive.d.ts +18 -0
  73. package/input/input.module.d.ts +9 -0
  74. package/logo.svg +1 -0
  75. package/package.json +33 -15
  76. package/password-input/{index.ts → index.d.ts} +0 -0
  77. package/password-input/password-input.component.d.ts +21 -0
  78. package/password-input/password-input.module.d.ts +11 -0
  79. package/{public-api.ts → public-api.d.ts} +0 -0
  80. package/skeleton/{index.ts → index.d.ts} +0 -0
  81. package/skeleton/skeleton.component.d.ts +11 -0
  82. package/skeleton/skeleton.module.d.ts +9 -0
  83. package/spinner/{index.ts → index.d.ts} +0 -0
  84. package/spinner/spinner.component.d.ts +6 -0
  85. package/spinner/spinner.module.d.ts +7 -0
  86. package/styles/components/tag.scss +2 -2
  87. package/styles/index.scss +8 -9
  88. package/styles.css +4 -0
  89. package/tag/{index.ts → index.d.ts} +0 -0
  90. package/tag/tag.component.d.ts +22 -0
  91. package/tag/tag.module.d.ts +9 -0
  92. package/button/button.component.ts +0 -132
  93. package/button/button.module.ts +0 -11
  94. package/core/types/convert-input.ts +0 -2
  95. package/core/types/index.ts +0 -3
  96. package/core/types/indexable.ts +0 -3
  97. package/core/types/ng-class.ts +0 -11
  98. package/core/util/convert.ts +0 -63
  99. package/core/util/index.ts +0 -1
  100. package/divider/divider.component.ts +0 -13
  101. package/divider/divider.module.ts +0 -10
  102. package/extended-input/extended-input.component.html +0 -13
  103. package/extended-input/extended-input.component.ts +0 -77
  104. package/extended-input/extended-input.module.ts +0 -17
  105. package/form/form-error.component.ts +0 -20
  106. package/form/form-item.component.ts +0 -60
  107. package/form/form.module.ts +0 -17
  108. package/icon/icon.component.ts +0 -45
  109. package/icon/icons.ts +0 -229
  110. package/icon/index.ts +0 -3
  111. package/icon/walrus-icons-registry.service.ts +0 -20
  112. package/icon/walrus-icons.module.ts +0 -16
  113. package/index.ts +0 -1
  114. package/input/input.directive.ts +0 -65
  115. package/input/input.module.ts +0 -16
  116. package/ng-package.json +0 -11
  117. package/password-input/password-input.component.html +0 -10
  118. package/password-input/password-input.component.ts +0 -56
  119. package/password-input/password-input.module.ts +0 -28
  120. package/skeleton/skeleton.component.ts +0 -38
  121. package/skeleton/skeleton.module.ts +0 -11
  122. package/spinner/spinner.component.ts +0 -11
  123. package/spinner/spinner.module.ts +0 -10
  124. package/tag/tag.component.ts +0 -92
  125. package/tag/tag.module.ts +0 -11
  126. package/tsconfig.lib.json +0 -15
  127. package/tsconfig.lib.prod.json +0 -10
@@ -1,92 +0,0 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- ElementRef,
5
- Input, OnChanges,
6
- OnDestroy,
7
- OnInit,
8
- Renderer2, SimpleChanges,
9
- ViewEncapsulation
10
- } from '@angular/core';
11
- import { Subject } from 'rxjs';
12
- import { InputBoolean } from '../core/util';
13
-
14
- export type WalrusTagColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'dark';
15
-
16
- @Component({
17
- selector: 'wr-tag',
18
- exportAs: 'wrTag',
19
- preserveWhitespaces: false,
20
- template: '<wr-spin *ngIf="loading"></wr-spin><ng-content></ng-content>',
21
- changeDetection: ChangeDetectionStrategy.OnPush,
22
- encapsulation: ViewEncapsulation.None
23
- })
24
- export class WalrusTagComponent implements OnInit, OnDestroy, OnChanges {
25
- // add color class
26
- @Input() color: WalrusTagColor = 'default';
27
-
28
- // Is tag transparent
29
- @Input() @InputBoolean() transparent = false;
30
-
31
- @Input() @InputBoolean() loading = false;
32
-
33
- // Is tag outlined
34
- @Input() @InputBoolean() outline = false;
35
-
36
- // Is tag outlined
37
- @Input() @InputBoolean() round = false;
38
-
39
- // Is tag hoverable
40
- @Input() @InputBoolean() hoverable = false;
41
-
42
- private destroy$ = new Subject<void>();
43
-
44
- constructor(
45
- private readonly elementRef: ElementRef,
46
- private readonly r2: Renderer2
47
- ) {
48
- }
49
-
50
- ngOnInit(): void {
51
- this.setClasses();
52
- }
53
-
54
- ngOnDestroy(): void {
55
- this.destroy$.next();
56
- this.destroy$.complete();
57
- }
58
-
59
- ngOnChanges(changes: SimpleChanges) {
60
- if (changes) {
61
- this.setClasses();
62
- }
63
- }
64
-
65
- private setClasses(): void {
66
- const baseClass = 'wr-tag';
67
- const el = this.elementRef.nativeElement;
68
- const add = (klass: string) => this.r2.addClass(el, `${baseClass}-${klass}`);
69
- const rm = (klass: string) => this.r2.removeClass(el, `${baseClass}-${klass}`);
70
-
71
- el.classList = [];
72
-
73
- this.r2.addClass(el, baseClass);
74
- add(this.color);
75
-
76
- if (this.round) {
77
- add(`-round`);
78
- }
79
-
80
- if (this.transparent) {
81
- add(`-transparent`);
82
- }
83
-
84
- if (this.hoverable) {
85
- add(`-hoverable`);
86
- }
87
-
88
- if (this.outline) {
89
- add(`-outline`);
90
- }
91
- }
92
- }
package/tag/tag.module.ts DELETED
@@ -1,11 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { NgModule } from '@angular/core';
3
- import { WalrusTagComponent } from './tag.component';
4
- import { WalrusSpinnerModule } from '../spinner';
5
-
6
- @NgModule({
7
- imports: [CommonModule, WalrusSpinnerModule],
8
- declarations: [WalrusTagComponent],
9
- exports: [WalrusTagComponent]
10
- })
11
- export class WalrusTagModule {}
package/tsconfig.lib.json DELETED
@@ -1,15 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "../../tsconfig.json",
4
- "compilerOptions": {
5
- "outDir": "../../out-tsc/lib",
6
- "declaration": true,
7
- "declarationMap": true,
8
- "inlineSources": true,
9
- "types": []
10
- },
11
- "exclude": [
12
- "src/test.ts",
13
- "**/*.spec.ts"
14
- ]
15
- }
@@ -1,10 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "./tsconfig.lib.json",
4
- "compilerOptions": {
5
- "declarationMap": false
6
- },
7
- "angularCompilerOptions": {
8
- "compilationMode": "partial"
9
- }
10
- }