ngwr 0.1.2 → 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 -1401
  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 -1399
  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 -35
  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 -133
  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
package/LICENSE CHANGED
@@ -1,6 +1,8 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Garuna LLP
3
+ Copyright (c) 2022 Roman Khegay
4
+ Copyright (c) 2022 Garuna, LLP
5
+ Copyright (c) 2022 Stingray Technologies, LLP
4
6
 
5
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
8
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,40 +1,53 @@
1
- <img src="logo.svg" alt="ngwr logo" width="24px">
1
+ # <img src="logo.svg" alt="ngwr logo" height="32px">
2
2
 
3
- ---
4
-
5
- ### [NGWR](https://ngwr.dev) – Angular UI components library
6
-
7
- ---
8
-
9
- [![npm version](https://img.shields.io/npm/v/ngwr)](https://www.npmjs.com/package/ngwr)[![ngwr downloads](https://img.shields.io/npm/dm/ngwr)](https://www.npmjs.com/package/ngwr)[![ngwr size](https://img.shields.io/bundlephobia/min/ngwr.svg)](https://www.npmjs.com/package/ngwr)[![angular version](https://img.shields.io/npm/dependency-version/ngwr/peer/@angular/core)](https://www.npmjs.com/package/ngwr)
3
+ [![npm version](https://img.shields.io/npm/v/ngwr)](https://www.npmjs.com/package/ngwr)
4
+ [![ngwr downloads](https://img.shields.io/npm/dm/ngwr)](https://www.npmjs.com/package/ngwr)
5
+ [![ngwr size](https://img.shields.io/bundlephobia/min/ngwr.svg)](https://www.npmjs.com/package/ngwr)
6
+ [![angular version](https://img.shields.io/npm/dependency-version/ngwr/peer/@angular/core)](https://www.npmjs.com/package/ngwr)
10
7
 
11
8
  [![ngwr codeql](https://github.com/thekhegay/ngwr/workflows/CodeQL/badge.svg)](https://github.com/thekhegay/ngwr)
12
9
 
13
10
  [![license](https://img.shields.io/npm/l/ngwr)](https://github.com/thekhegay/ngwr/blob/main/LICENSE)
14
11
 
15
- ---
12
+ ## Important information
13
+ NGWR is currently in development stage. All components are updating every week. Use it on your own risk. All bugreports and ideas are [welcomed](https://github.com/thekhegay/ngwr/issues/new).
16
14
 
17
- ### Installation
15
+ ## Installation
18
16
 
19
- ```bash
17
+ ```shell
18
+ $ npm install ngwr
19
+ # or yarn users
20
20
  $ yarn add ngwr
21
21
  ```
22
22
 
23
- or
23
+ ## Styles
24
24
 
25
- ```bash
26
- $ npm install ngwr
25
+ Don't forget to add styles:
26
+ ```scss
27
+ @import '~ngwr';
27
28
  ```
28
29
 
29
- then
30
+ ## [Components](https://ngwr.dev/components)
30
31
 
31
- ```scss
32
- @import '~ngwr/ngwr.min.css';
33
- ```
32
+ - [Button](https://ngwr.dev/components/button)
33
+ - [Checkbox](https://ngwr.dev/components/checkbox)
34
+ - [Divider](https://ngwr.dev/components/divider)
35
+ - [Form](https://ngwr.dev/components/form)
36
+ - [Icon](https://ngwr.dev/components/icon)
37
+ - [Input](https://ngwr.dev/components/input)
38
+ - [Skeleton](https://ngwr.dev/components/skeleton)
39
+ - [Spinner](https://ngwr.dev/components/spinner)
40
+ - [Tag](https://ngwr.dev/components/tag)
41
+
42
+ - [Colors](https://ngwr.dev/common/colors)
43
+ - [Grid](https://ngwr.dev/common/grid)
34
44
 
35
- then add [components](https://ngwr.dev/components) to your project.
45
+ ## Authors
46
+ - [Roman Khegay](https://github.com/thekhegay) – code code, design
36
47
 
37
- ---
38
- > Originally created by [@thekhegay](https://github.com/thekhegay)
48
+ ## Sponsors
49
+ - [Garuna](https://garuna.dev)
50
+ - [Stingray Technologies](https://stingray-mobile.ru/)
39
51
 
40
- >Copyright @ 2022 [Garuna](https://garuna.dev) & [Stingray Technologies](https://stingray-mobile.ru/)
52
+ ## License
53
+ Feel free to use NGWR in your commercial projects. Everything is covered by [MIT](/LICENSE) license.
package/_index.scss ADDED
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * Copyright 2022 Garuna LLP
3
+ * Copyright 2022 Stingray Technologies LLP
4
+ *
5
+ * Licensed under MIT
6
+ *
7
+ * https://github.com/thekhegay/ngwr
8
+ */
9
+
10
+ @import 'styles/vars';
11
+
12
+ @import 'styles/root';
13
+ @import 'styles/reset';
14
+
15
+ @import 'styles/grid';
16
+ @import 'styles/animations';
17
+
18
+ @import 'button/button';
19
+ @import 'checkbox/checkbox';
20
+ @import 'divider/divider';
21
+ @import 'form/form';
22
+ @import 'icon/icon';
23
+ @import 'input/input';
24
+ @import 'skeleton/skeleton';
25
+ @import 'spinner/spinner';
26
+ @import 'tag/tag';
27
+
@@ -1,10 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./button.component";
2
+ import * as i1 from "./button";
3
3
  import * as i2 from "@angular/common";
4
- import * as i3 from "../spinner/spinner.module";
5
- import * as i4 from "../icon/wr-icon.module";
4
+ import * as i3 from "ngwr/spinner";
5
+ import * as i4 from "ngwr/icon";
6
6
  export declare class WrButtonModule {
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<WrButtonModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<WrButtonModule, [typeof i1.WrButtonComponent], [typeof i2.CommonModule, typeof i3.WrSpinnerModule, typeof i4.WrIconModule], [typeof i1.WrButtonComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WrButtonModule, [typeof i1.WrButton], [typeof i2.CommonModule, typeof i3.WrSpinnerModule, typeof i4.WrIconModule], [typeof i1.WrButton]>;
9
9
  static ɵinj: i0.ɵɵInjectorDeclaration<WrButtonModule>;
10
10
  }
@@ -0,0 +1,58 @@
1
+ import { BooleanInput } from '@angular/cdk/coercion';
2
+ import { ChangeDetectorRef, ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
3
+ import { WrAbstractBase } from 'ngwr/core/abstract';
4
+ import { WrThemeColor } from 'ngwr/core/color';
5
+ import { SafeAny } from 'ngwr/core/types';
6
+ import { wrIconName } from 'ngwr/icon';
7
+ import * as i0 from "@angular/core";
8
+ export declare class WrButton extends WrAbstractBase implements OnInit, OnDestroy {
9
+ private readonly cdr;
10
+ private readonly elRef;
11
+ private readonly ngZone;
12
+ /** Set color of `wr-btn`; */
13
+ get color(): WrThemeColor;
14
+ set color(value: WrThemeColor);
15
+ private _color;
16
+ /** Set size of `wr-btn`; */
17
+ get size(): 'default' | 'small';
18
+ set size(value: 'default' | 'small');
19
+ private _size;
20
+ /** Set outlined state of `wr-btn`; */
21
+ get outlined(): boolean;
22
+ set outlined(value: BooleanInput);
23
+ private _outlined;
24
+ /** Set rounded state of `wr-btn`; */
25
+ get rounded(): boolean;
26
+ set rounded(value: BooleanInput);
27
+ private _rounded;
28
+ /** Set fullwidth state of `wr-btn`; */
29
+ get fullwidth(): boolean;
30
+ set fullwidth(value: BooleanInput);
31
+ private _fullwidth;
32
+ /** Set loading state of `wr-btn`; */
33
+ get loading(): boolean;
34
+ set loading(value: BooleanInput);
35
+ private _loading;
36
+ /** Set disabled state of `wr-btn`; */
37
+ get disabled(): boolean;
38
+ set disabled(value: BooleanInput);
39
+ private _disabled;
40
+ /** Set icon of `wr-btn`; */
41
+ get icon(): wrIconName | null;
42
+ set icon(value: wrIconName | null);
43
+ private _icon;
44
+ /** Set icon position of `wr-btn`; */
45
+ get iconPosition(): 'start' | 'end';
46
+ set iconPosition(value: 'start' | 'end');
47
+ private _iconPosition;
48
+ /** Set element disabled attribute */
49
+ get nativeDisabled(): '' | null;
50
+ /** Set element classes */
51
+ get elClasses(): SafeAny;
52
+ constructor(cdr: ChangeDetectorRef, elRef: ElementRef<HTMLButtonElement | HTMLLinkElement | HTMLAnchorElement | HTMLElement>, ngZone: NgZone);
53
+ ngOnInit(): void;
54
+ ngOnDestroy(): void;
55
+ private preventEventsWhenDisabled;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrButton, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrButton, "wr-btn, button[wr-btn], a[wr-btn]", ["wrBtn"], { "color": "color"; "size": "size"; "outlined": "outlined"; "rounded": "rounded"; "fullwidth": "fullwidth"; "loading": "loading"; "disabled": "disabled"; "icon": "icon"; "iconPosition": "iconPosition"; }, {}, never, ["*"], false>;
58
+ }
@@ -0,0 +1,160 @@
1
+ @import '../styles/vars';
2
+
3
+ .wr-btn {
4
+ display: inline-block;
5
+
6
+ padding: var(--wr-btn-padding-y-base) var(--wr-btn-padding-x-base);
7
+
8
+ font-family: var(--wr-btn-font-family-base);
9
+ font-size: var(--wr-btn-font-size-base);
10
+ font-weight: var(--wr-btn-font-weight-base);
11
+ line-height: var(--wr-btn-line-height-base);
12
+
13
+ text-align: center;
14
+ text-decoration: none;
15
+ vertical-align: middle;
16
+
17
+ cursor: pointer;
18
+ user-select: none;
19
+
20
+ border: none;
21
+ border-radius: var(--wr-btn-border-radius-base);
22
+
23
+ transition: var(--wr-transition-short);
24
+
25
+ position: relative;
26
+
27
+ &:hover {
28
+ text-decoration: none;
29
+ }
30
+
31
+ &[disabled],
32
+ &:disabled,
33
+ &.disabled,
34
+ fieldset:disabled & {
35
+ color: var(--wr-color-medium) !important;
36
+ background-color: var(--wr-color-light) !important;
37
+ background-image: none;
38
+ border: none;
39
+ box-shadow: none !important;
40
+ pointer-events: none;
41
+
42
+ .wr-btn__icon,
43
+ .wr-btn__spin {
44
+ color: var(--wr-color-medium);
45
+ }
46
+ }
47
+
48
+ &__text {
49
+ display: inline-block;
50
+ font-family: inherit;
51
+ font-size: inherit;
52
+ font-weight: inherit;
53
+ line-height: inherit;
54
+ word-break: break-all;
55
+ padding: 0;
56
+ transition: var(--wr-transition-base);
57
+ }
58
+
59
+ &__spin {
60
+ position: absolute;
61
+ z-index: 3;
62
+ left: 50%;
63
+ top: 50%;
64
+ transform: translate(-50%,-50%);
65
+ }
66
+
67
+ &__icon {
68
+ width: 1rem !important;
69
+ height: 1rem !important;
70
+ min-width: 1rem !important;
71
+ min-height: 1rem !important;
72
+ transition: var(--wr-transition-base);
73
+ }
74
+
75
+ &--icon-start {
76
+ padding-left: calc(var(--wr-btn-padding-x-base) - 0.0825rem);
77
+
78
+ .wr-btn__icon {
79
+ margin-right: 0.375rem;
80
+ }
81
+ }
82
+
83
+ &--icon-end {
84
+ .wr-btn__icon {
85
+ margin-left: 0.25rem;
86
+ }
87
+ }
88
+
89
+ &--loading {
90
+ pointer-events: none;
91
+
92
+ .wr-btn__text,
93
+ .wr-btn__icon,{
94
+ opacity: 0;
95
+ }
96
+ }
97
+
98
+ &--rounded {
99
+ border-radius: var(--wr-btn-rounded-border-radius);
100
+ padding: var(--wr-btn-rounded-padding-y) var(--wr-btn-rounded-padding-x);
101
+ }
102
+
103
+ &--small {
104
+ padding: var(--wr-btn-padding-y-small) var(--wr-btn-padding-x-small);
105
+ border-radius: var(--wr-btn-border-radius-small);
106
+ font-size: var(--wr-btn-font-size-small);
107
+ line-height: var(--wr-btn-line-height-small);
108
+
109
+ .wr-btn {
110
+ &__icon,
111
+ &__spin {
112
+ height: var(--wr-btn-font-size-small) !important;
113
+ width: var(--wr-btn-font-size-small) !important;;
114
+ min-height: var(--wr-btn-font-size-small) !important;;
115
+ min-width: var(--wr-btn-font-size-small) !important;;
116
+ }
117
+
118
+ &--icon-start {
119
+ .wr-btn__icon {
120
+ margin-right: 0.2rem !important;
121
+ }
122
+ }
123
+
124
+ &--icon-end {
125
+ .wr-btn__icon {
126
+ margin-left: 0.2rem !important;
127
+ }
128
+ }
129
+ }
130
+ }
131
+
132
+ &--full {
133
+ display: block;
134
+ width: 100%;
135
+ }
136
+ }
137
+
138
+ @each $color in $theme-colors {
139
+ .wr-btn--#{$color} {
140
+ color: var(--wr-color-#{$color}-contrast);
141
+ background-color: var(--wr-color-#{$color});
142
+
143
+ &:hover {
144
+ color: var(--wr-color-#{$color}-contrast);
145
+ background-color: var(--wr-color-#{$color}-shade);
146
+ }
147
+
148
+ &.wr-btn--outlined {
149
+ color: var(--wr-color-#{$color});
150
+ background-color: transparent;
151
+ box-shadow: inset 0 0 0 1.25px rgba(var(--wr-color-#{$color}-rgb), 0.375);
152
+
153
+ &:hover {
154
+ color: var(--wr-color-#{$color}-contrast);
155
+ background-color: var(--wr-color-#{$color});
156
+ box-shadow: none;
157
+ }
158
+ }
159
+ }
160
+ }
package/button/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { WrButtonComponent } from './button.component';
2
- export { WrButtonModule } from './button.module';
1
+ export { WrButton } from './button';
2
+ export { WrButtonModule } from './button-module';
@@ -1,10 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./checkbox.component";
2
+ import * as i1 from "./checkbox";
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "@angular/forms";
5
5
  import * as i4 from "@angular/cdk/a11y";
6
6
  export declare class WrCheckboxModule {
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<WrCheckboxModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<WrCheckboxModule, [typeof i1.WrCheckboxComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.A11yModule], [typeof i1.WrCheckboxComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WrCheckboxModule, [typeof i1.WrCheckbox], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.A11yModule], [typeof i1.WrCheckbox]>;
9
9
  static ɵinj: i0.ɵɵInjectorDeclaration<WrCheckboxModule>;
10
10
  }
@@ -0,0 +1,49 @@
1
+ import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
2
+ import { BooleanInput } from '@angular/cdk/coercion';
3
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
4
+ import { ControlValueAccessor } from '@angular/forms';
5
+ import { WrAbstractBase } from 'ngwr/core/abstract';
6
+ import { OnChangeType, OnTouchedType, SafeAny } from 'ngwr/core/types';
7
+ import * as i0 from "@angular/core";
8
+ export declare class WrCheckbox extends WrAbstractBase implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy {
9
+ private readonly cdr;
10
+ private readonly elRef;
11
+ private readonly focusMonitor;
12
+ private readonly ngZone;
13
+ inputElement: HTMLInputElement;
14
+ get checked(): boolean;
15
+ set checked(value: BooleanInput);
16
+ private _checked;
17
+ /** Set autofocus for checkbox; */
18
+ get autofocus(): boolean;
19
+ set autofocus(value: BooleanInput);
20
+ private _autofocus;
21
+ /** Set disabled state of `wr-btn`; */
22
+ get disabled(): boolean;
23
+ set disabled(value: BooleanInput);
24
+ private _disabled;
25
+ get focused(): boolean;
26
+ set focused(value: BooleanInput);
27
+ private _focused;
28
+ private onChange;
29
+ private onTouched;
30
+ /** Set element classes */
31
+ get elClasses(): SafeAny;
32
+ constructor(cdr: ChangeDetectorRef, elRef: ElementRef<HTMLElement>, focusMonitor: FocusMonitor, ngZone: NgZone);
33
+ ngOnInit(): void;
34
+ ngAfterViewInit(): void;
35
+ ngOnDestroy(): void;
36
+ focus(origin?: FocusOrigin, options?: FocusOptions): void;
37
+ writeValue(value: BooleanInput): void;
38
+ registerOnChange(fn: OnChangeType): void;
39
+ registerOnTouched(fn: OnTouchedType): void;
40
+ setDisabledState(isDisabled: boolean): void;
41
+ /**
42
+ * A disabled checkbox shouldn't apply any actions
43
+ *
44
+ * @param event
45
+ */
46
+ private preventEventsWhenDisabled;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrCheckbox, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrCheckbox, "wr-checkbox", ["wrCheckbox"], { "autofocus": "autofocus"; "disabled": "disabled"; }, {}, never, ["*"], false>;
49
+ }
@@ -0,0 +1,103 @@
1
+ .wr-checkbox {
2
+ display: inline-block;
3
+
4
+ &__container {
5
+ display: inline-flex;
6
+ align-items: center;
7
+ cursor: pointer;
8
+ padding: 0;
9
+ margin: 0;
10
+
11
+ color: var(--wr-checkbox-color-base);
12
+ font-size: var(--wr-checkbox-font-size);
13
+ font-weight: var(--wr-checkbox-font-weight);
14
+ line-height: var(--wr-checkbox-line-height);
15
+ }
16
+
17
+ &__input {
18
+ position: absolute;
19
+ opacity: 0;
20
+ cursor: pointer;
21
+ height: 0;
22
+ width: 0;
23
+ }
24
+
25
+ &-inner {
26
+ display: inline-flex;
27
+ flex-direction: column;
28
+ align-items: center;
29
+ justify-content: center;
30
+ height: var(--wr-checkbox-height);
31
+ width: var(--wr-checkbox-width);
32
+
33
+ margin-right: calc(var(--wr-checkbox-width) / 4);
34
+
35
+ border: 1px solid rgba(var(--wr-color-medium-rgb), 0.25);
36
+ border-radius: var(--wr-checkbox-border-radius);
37
+
38
+ transition: var(--wr-transition-base);
39
+
40
+ &__mark {
41
+ display: inline-block;
42
+ transform: rotate(45deg) translateX(-0.05rem) translateY(-0.05rem) scale(0.1);
43
+ opacity: 0;
44
+ height: calc(var(--wr-checkbox-height) / 2);
45
+ width: calc(var(--wr-checkbox-height) / 3);
46
+ border-bottom: 0.2rem solid var(--wr-color-white);
47
+ border-right: 0.2rem solid var(--wr-color-white);
48
+ transition: var(--wr-transition-short);
49
+ }
50
+ }
51
+
52
+ &:hover {
53
+ .wr-checkbox-inner {
54
+ border-color: var(--wr-color-primary);
55
+ }
56
+ }
57
+
58
+ &--checked {
59
+ .wr-checkbox-inner {
60
+ border-color: var(--wr-color-primary);
61
+ background: var(--wr-color-primary);
62
+
63
+ &__mark {
64
+ transform: rotate(45deg) translateX(-0.05rem) translateY(-0.05rem) scale(1);
65
+ opacity: 1;
66
+ }
67
+ }
68
+
69
+ &:hover {
70
+ .wr-checkbox-inner {
71
+ background: rgba(var(--wr-color-primary-rgb), 0.75);
72
+ }
73
+ }
74
+ }
75
+
76
+ &--focused {
77
+ .wr-checkbox-inner {
78
+ box-shadow: 0 0 0 1.5px rgba(var(--wr-color-primary-rgb), 0.25);
79
+ }
80
+ }
81
+
82
+ &[disabled],
83
+ &:disabled,
84
+ &.disabled {
85
+ pointer-events: none;
86
+
87
+ .wr-checkbox-inner {
88
+ border-color: rgba(var(--wr-color-medium-rgb), 0.25);
89
+ background: rgba(var(--wr-color-medium-rgb), 0.25);
90
+ }
91
+
92
+ &.wr-checkbox--checked {
93
+ .wr-checkbox-inner {
94
+ background: rgba(var(--wr-color-medium-rgb), 0.25);
95
+
96
+ &__mark {
97
+ border-bottom: 0.2rem solid rgba(var(--wr-color-medium-rgb), 0.75);
98
+ border-right: 0.2rem solid rgba(var(--wr-color-medium-rgb), 0.75);
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
@@ -1,2 +1,2 @@
1
- export { WrCheckboxComponent } from './checkbox.component';
2
- export { WrCheckboxModule } from './checkbox.module';
1
+ export { WrCheckbox } from './checkbox';
2
+ export { WrCheckboxModule } from './checkbox-module';
@@ -0,0 +1,9 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare abstract class WrAbstractBase implements OnDestroy {
5
+ protected readonly destroyed$: Subject<void>;
6
+ ngOnDestroy(): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrAbstractBase, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WrAbstractBase, never, never, {}, {}, never, never, false>;
9
+ }
@@ -0,0 +1 @@
1
+ export * from './base';
@@ -0,0 +1,2 @@
1
+ export declare const wrThemeColors: readonly ["primary", "secondary", "success", "warning", "danger", "light", "medium", "dark"];
2
+ export declare type WrThemeColor = typeof wrThemeColors[number];
@@ -0,0 +1,2 @@
1
+ export * from './color';
2
+ export * from './is-theme-color';
@@ -0,0 +1,2 @@
1
+ import { WrThemeColor } from './color';
2
+ export declare function isThemeColor(color: string): color is WrThemeColor;
@@ -0,0 +1 @@
1
+ export * from './input-boolean';
@@ -0,0 +1 @@
1
+ export declare function InputBoolean(): PropertyDecorator;
@@ -0,0 +1,3 @@
1
+ export * from './on-change-type';
2
+ export * from './on-touched-type';
3
+ export * from './safe-any';
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./divider.component";
2
+ import * as i1 from "./divider";
3
3
  export declare class WrDividerModule {
4
4
  static ɵfac: i0.ɵɵFactoryDeclaration<WrDividerModule, never>;
5
- static ɵmod: i0.ɵɵNgModuleDeclaration<WrDividerModule, [typeof i1.WrDividerComponent], never, [typeof i1.WrDividerComponent]>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WrDividerModule, [typeof i1.WrDivider], never, [typeof i1.WrDivider]>;
6
6
  static ɵinj: i0.ɵɵInjectorDeclaration<WrDividerModule>;
7
7
  }
@@ -0,0 +1,40 @@
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import { WrThemeColor } from 'ngwr/core/color';
3
+ import { SafeAny } from 'ngwr/core/types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class WrDivider {
6
+ private readonly cdr;
7
+ /**
8
+ * Set color of `wr-divider`
9
+ *
10
+ * @default 'light';
11
+ */
12
+ get color(): WrThemeColor;
13
+ set color(value: WrThemeColor);
14
+ private _color;
15
+ /**
16
+ * Set style of `wr-divider`
17
+ *
18
+ * @default `solid`;
19
+ */
20
+ get type(): 'solid' | 'dashed' | 'dotted';
21
+ set type(value: 'solid' | 'dashed' | 'dotted');
22
+ private _type;
23
+ /**
24
+ * Set width of `wr-divider`
25
+ *
26
+ * @default 1px;
27
+ */
28
+ get width(): string;
29
+ set width(value: string);
30
+ private _width;
31
+ /** Set element classes */
32
+ get elClasses(): SafeAny;
33
+ /** Set element style **/
34
+ get elStyles(): SafeAny;
35
+ /** Set element role **/
36
+ role: string;
37
+ constructor(cdr: ChangeDetectorRef);
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDivider, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrDivider, "wr-divider", ["wrDivider"], { "color": "color"; "type": "type"; "width": "width"; }, {}, never, never, false>;
40
+ }
@@ -0,0 +1,34 @@
1
+ @import '../styles/vars';
2
+
3
+ .wr-divider {
4
+ --wr-divider-width: 1px;
5
+
6
+ display: block;
7
+
8
+ width: 100%;
9
+ border-bottom-width: var(--wr-divider-width);
10
+
11
+ margin-top: 0.5rem;
12
+ margin-bottom: 0.5rem;
13
+
14
+ user-select: none;
15
+ pointer-events: none;
16
+
17
+ &--solid {
18
+ border-bottom-style: solid;
19
+ }
20
+
21
+ &--dashed {
22
+ border-bottom-style: dashed;
23
+ }
24
+
25
+ &--dotted {
26
+ border-bottom-style: dotted;
27
+ }
28
+ }
29
+
30
+ @each $color, $value in $theme-colors {
31
+ .wr-divider--#{$color} {
32
+ border-bottom-color: var(--wr-color-#{$color});
33
+ }
34
+ }
@@ -1,2 +1,2 @@
1
- export { WrDividerModule } from './divider.module';
2
- export { WrDividerComponent } from './divider.component';
1
+ export { WrDivider } from './divider';
2
+ export { WrDividerModule } from './divider-module';