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.
- package/LICENSE +3 -1
- package/README.md +35 -22
- package/_index.scss +27 -0
- package/button/{button.module.d.ts → button-module.d.ts} +4 -4
- package/button/button.d.ts +58 -0
- package/button/button.scss +160 -0
- package/button/index.d.ts +2 -2
- package/checkbox/{checkbox.module.d.ts → checkbox-module.d.ts} +2 -2
- package/checkbox/checkbox.d.ts +49 -0
- package/checkbox/checkbox.scss +103 -0
- package/checkbox/index.d.ts +2 -2
- package/core/abstract/base.d.ts +9 -0
- package/core/abstract/index.d.ts +1 -0
- package/core/color/color.d.ts +2 -0
- package/core/color/index.d.ts +2 -0
- package/core/color/is-theme-color.d.ts +2 -0
- package/core/decorators/index.d.ts +1 -0
- package/core/decorators/input-boolean.d.ts +1 -0
- package/core/types/index.d.ts +3 -0
- package/{_core → core}/types/on-change-type.d.ts +0 -0
- package/{_core → core}/types/on-touched-type.d.ts +0 -0
- package/{_core → core}/types/safe-any.d.ts +0 -0
- package/divider/{divider.module.d.ts → divider-module.d.ts} +2 -2
- package/divider/divider.d.ts +40 -0
- package/divider/divider.scss +34 -0
- package/divider/index.d.ts +2 -2
- package/esm2020/button/button-module.mjs +20 -0
- package/esm2020/button/button.mjs +187 -0
- package/esm2020/button/index.mjs +3 -3
- package/esm2020/button/ngwr-button.mjs +5 -0
- package/esm2020/checkbox/checkbox-module.mjs +20 -0
- package/esm2020/checkbox/checkbox.mjs +154 -0
- package/esm2020/checkbox/index.mjs +3 -3
- package/esm2020/checkbox/ngwr-checkbox.mjs +5 -0
- package/esm2020/core/abstract/base.mjs +18 -0
- package/esm2020/core/abstract/index.mjs +2 -0
- package/esm2020/core/abstract/ngwr-core-abstract.mjs +5 -0
- package/esm2020/core/color/color.mjs +11 -0
- package/esm2020/core/color/index.mjs +3 -0
- package/esm2020/core/color/is-theme-color.mjs +9 -0
- package/esm2020/core/color/ngwr-core-color.mjs +5 -0
- package/esm2020/core/decorators/index.mjs +2 -0
- package/esm2020/core/decorators/input-boolean.mjs +15 -0
- package/esm2020/core/decorators/ngwr-core-decorators.mjs +5 -0
- package/esm2020/core/types/index.mjs +4 -0
- package/esm2020/core/types/ngwr-core-types.mjs +5 -0
- package/esm2020/core/types/on-change-type.mjs +2 -0
- package/esm2020/core/types/on-touched-type.mjs +2 -0
- package/esm2020/core/types/safe-any.mjs +2 -0
- package/esm2020/divider/divider-module.mjs +16 -0
- package/esm2020/divider/divider.mjs +100 -0
- package/esm2020/divider/index.mjs +3 -3
- package/esm2020/divider/ngwr-divider.mjs +5 -0
- package/esm2020/form/form-error.mjs +23 -0
- package/esm2020/form/form-item.mjs +46 -0
- package/esm2020/form/form-module.mjs +19 -0
- package/esm2020/form/index.mjs +4 -4
- package/esm2020/form/ngwr-form.mjs +5 -0
- package/esm2020/icon/icon-module.mjs +21 -0
- package/esm2020/icon/icon-service.mjs +21 -0
- package/esm2020/icon/icon.mjs +60 -0
- package/esm2020/icon/icons.mjs +424 -0
- package/esm2020/icon/index.mjs +5 -5
- package/esm2020/icon/ngwr-icon.mjs +5 -0
- package/esm2020/index.mjs +3 -0
- package/esm2020/input/index.mjs +3 -3
- package/esm2020/input/input-module.mjs +20 -0
- package/esm2020/input/input-types.mjs +2 -0
- package/esm2020/input/input.mjs +240 -0
- package/esm2020/input/ngwr-input.mjs +5 -0
- package/esm2020/ngwr.mjs +2 -2
- package/esm2020/skeleton/index.mjs +3 -3
- package/esm2020/skeleton/ngwr-skeleton.mjs +5 -0
- package/esm2020/skeleton/skeleton-module.mjs +18 -0
- package/esm2020/skeleton/skeleton.mjs +44 -0
- package/esm2020/spinner/index.mjs +3 -3
- package/esm2020/spinner/ngwr-spinner.mjs +5 -0
- package/esm2020/spinner/spinner-module.mjs +16 -0
- package/esm2020/spinner/spinner.mjs +23 -0
- package/esm2020/tag/index.mjs +3 -3
- package/esm2020/tag/ngwr-tag.mjs +5 -0
- package/esm2020/tag/tag-module.mjs +20 -0
- package/esm2020/tag/tag.mjs +80 -0
- package/fesm2015/ngwr-button.mjs +211 -0
- package/fesm2015/ngwr-button.mjs.map +1 -0
- package/fesm2015/ngwr-checkbox.mjs +177 -0
- package/fesm2015/ngwr-checkbox.mjs.map +1 -0
- package/fesm2015/ngwr-core-abstract.mjs +25 -0
- package/fesm2015/ngwr-core-abstract.mjs.map +1 -0
- package/fesm2015/ngwr-core-color.mjs +25 -0
- package/fesm2015/ngwr-core-color.mjs.map +1 -0
- package/fesm2015/ngwr-core-decorators.mjs +22 -0
- package/fesm2015/ngwr-core-decorators.mjs.map +1 -0
- package/fesm2015/ngwr-core-types.mjs +4 -0
- package/fesm2015/ngwr-core-types.mjs.map +1 -0
- package/fesm2015/ngwr-divider.mjs +120 -0
- package/fesm2015/ngwr-divider.mjs.map +1 -0
- package/fesm2015/ngwr-form.mjs +89 -0
- package/fesm2015/ngwr-form.mjs.map +1 -0
- package/fesm2015/ngwr-icon.mjs +527 -0
- package/fesm2015/ngwr-icon.mjs.map +1 -0
- package/fesm2015/ngwr-input.mjs +262 -0
- package/fesm2015/ngwr-input.mjs.map +1 -0
- package/fesm2015/ngwr-skeleton.mjs +66 -0
- package/fesm2015/ngwr-skeleton.mjs.map +1 -0
- package/fesm2015/ngwr-spinner.mjs +43 -0
- package/fesm2015/ngwr-spinner.mjs.map +1 -0
- package/fesm2015/ngwr-tag.mjs +104 -0
- package/fesm2015/ngwr-tag.mjs.map +1 -0
- package/fesm2015/ngwr.mjs +2 -1404
- package/fesm2015/ngwr.mjs.map +1 -1
- package/fesm2020/ngwr-button.mjs +211 -0
- package/fesm2020/ngwr-button.mjs.map +1 -0
- package/fesm2020/ngwr-checkbox.mjs +177 -0
- package/fesm2020/ngwr-checkbox.mjs.map +1 -0
- package/fesm2020/ngwr-core-abstract.mjs +25 -0
- package/fesm2020/ngwr-core-abstract.mjs.map +1 -0
- package/fesm2020/ngwr-core-color.mjs +25 -0
- package/fesm2020/ngwr-core-color.mjs.map +1 -0
- package/fesm2020/ngwr-core-decorators.mjs +22 -0
- package/fesm2020/ngwr-core-decorators.mjs.map +1 -0
- package/fesm2020/ngwr-core-types.mjs +4 -0
- package/fesm2020/ngwr-core-types.mjs.map +1 -0
- package/fesm2020/ngwr-divider.mjs +120 -0
- package/fesm2020/ngwr-divider.mjs.map +1 -0
- package/fesm2020/ngwr-form.mjs +89 -0
- package/fesm2020/ngwr-form.mjs.map +1 -0
- package/fesm2020/ngwr-icon.mjs +525 -0
- package/fesm2020/ngwr-icon.mjs.map +1 -0
- package/fesm2020/ngwr-input.mjs +263 -0
- package/fesm2020/ngwr-input.mjs.map +1 -0
- package/fesm2020/ngwr-skeleton.mjs +66 -0
- package/fesm2020/ngwr-skeleton.mjs.map +1 -0
- package/fesm2020/ngwr-spinner.mjs +43 -0
- package/fesm2020/ngwr-spinner.mjs.map +1 -0
- package/fesm2020/ngwr-tag.mjs +104 -0
- package/fesm2020/ngwr-tag.mjs.map +1 -0
- package/fesm2020/ngwr.mjs +2 -1402
- package/fesm2020/ngwr.mjs.map +1 -1
- package/form/form-error.d.ts +6 -0
- package/form/form-item.d.ts +15 -0
- package/form/{form.module.d.ts → form-module.d.ts} +3 -3
- package/form/form.scss +52 -0
- package/form/index.d.ts +3 -3
- package/icon/{wr-icon.module.d.ts → icon-module.d.ts} +2 -2
- package/icon/{wr-icon.service.d.ts → icon-service.d.ts} +0 -9
- package/icon/icon.d.ts +20 -0
- package/icon/icon.scss +27 -0
- package/icon/{wr-icons.d.ts → icons.d.ts} +59 -3
- package/icon/index.d.ts +4 -4
- package/index.d.ts +2 -5
- package/input/index.d.ts +2 -2
- package/input/{input.module.d.ts → input-module.d.ts} +3 -3
- package/{_core/types/input-autocomplete-type.d.ts → input/input-types.d.ts} +2 -0
- package/input/{input.component.d.ts → input.d.ts} +7 -4
- package/input/input.scss +163 -0
- package/logo.svg +6 -1
- package/package.json +124 -19
- package/skeleton/index.d.ts +2 -2
- package/skeleton/{skeleton.module.d.ts → skeleton-module.d.ts} +2 -2
- package/skeleton/skeleton.d.ts +11 -0
- package/skeleton/skeleton.scss +54 -0
- package/spinner/index.d.ts +2 -2
- package/spinner/{spinner.module.d.ts → spinner-module.d.ts} +2 -2
- package/spinner/spinner.d.ts +6 -0
- package/spinner/spinner.scss +33 -0
- package/styles/animations.scss +14 -0
- package/styles/grid.scss +164 -0
- package/styles/reset.scss +106 -0
- package/styles/root.scss +152 -0
- package/styles/vars.scss +2 -0
- package/tag/index.d.ts +2 -2
- package/tag/{tag.module.d.ts → tag-module.d.ts} +4 -4
- package/tag/tag.d.ts +18 -0
- package/tag/tag.scss +106 -0
- package/_core/components/base.component.d.ts +0 -9
- package/_core/constants/style-prefix.d.ts +0 -1
- package/_core/index.d.ts +0 -4
- package/_core/types/boolean-input.d.ts +0 -1
- package/_core/types/color.d.ts +0 -1
- package/_core/types/index.d.ts +0 -8
- package/_core/types/input-mode-type.d.ts +0 -1
- package/_core/types/input-type.d.ts +0 -1
- package/_core/util/convert.d.ts +0 -19
- package/button/button.component.d.ts +0 -36
- package/checkbox/checkbox.component.d.ts +0 -32
- package/divider/divider.component.d.ts +0 -28
- package/esm2020/_core/components/base.component.mjs +0 -18
- package/esm2020/_core/constants/style-prefix.mjs +0 -2
- package/esm2020/_core/index.mjs +0 -9
- package/esm2020/_core/types/boolean-input.mjs +0 -2
- package/esm2020/_core/types/color.mjs +0 -2
- package/esm2020/_core/types/index.mjs +0 -2
- package/esm2020/_core/types/input-autocomplete-type.mjs +0 -2
- package/esm2020/_core/types/input-mode-type.mjs +0 -2
- package/esm2020/_core/types/input-type.mjs +0 -2
- package/esm2020/_core/types/on-change-type.mjs +0 -2
- package/esm2020/_core/types/on-touched-type.mjs +0 -2
- package/esm2020/_core/types/safe-any.mjs +0 -2
- package/esm2020/_core/util/convert.mjs +0 -51
- package/esm2020/button/button.component.mjs +0 -137
- package/esm2020/button/button.module.mjs +0 -20
- package/esm2020/checkbox/checkbox.component.mjs +0 -128
- package/esm2020/checkbox/checkbox.module.mjs +0 -20
- package/esm2020/divider/divider.component.mjs +0 -72
- package/esm2020/divider/divider.module.mjs +0 -16
- package/esm2020/form/form-error.component.mjs +0 -23
- package/esm2020/form/form-item.component.mjs +0 -35
- package/esm2020/form/form.module.mjs +0 -19
- package/esm2020/icon/wr-icon.component.mjs +0 -51
- package/esm2020/icon/wr-icon.module.mjs +0 -21
- package/esm2020/icon/wr-icon.service.mjs +0 -30
- package/esm2020/icon/wr-icons.mjs +0 -384
- package/esm2020/input/input.component.mjs +0 -239
- package/esm2020/input/input.module.mjs +0 -20
- package/esm2020/public-api.mjs +0 -11
- package/esm2020/skeleton/skeleton.component.mjs +0 -47
- package/esm2020/skeleton/skeleton.module.mjs +0 -18
- package/esm2020/spinner/spinner.component.mjs +0 -23
- package/esm2020/spinner/spinner.module.mjs +0 -16
- package/esm2020/tag/tag.component.mjs +0 -80
- package/esm2020/tag/tag.module.mjs +0 -20
- package/form/form-error.component.d.ts +0 -6
- package/form/form-item.component.d.ts +0 -8
- package/icon/wr-icon.component.d.ts +0 -17
- package/ngwr.min.css +0 -8
- package/public-api.d.ts +0 -10
- package/skeleton/skeleton.component.d.ts +0 -9
- package/spinner/spinner.component.d.ts +0 -6
- 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
|
|
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"
|
|
1
|
+
# <img src="logo.svg" alt="ngwr logo" height="32px">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
[](https://www.npmjs.com/package/ngwr)[](https://www.npmjs.com/package/ngwr)[](https://www.npmjs.com/package/ngwr)[](https://www.npmjs.com/package/ngwr)
|
|
3
|
+
[](https://www.npmjs.com/package/ngwr)
|
|
4
|
+
[](https://www.npmjs.com/package/ngwr)
|
|
5
|
+
[](https://www.npmjs.com/package/ngwr)
|
|
6
|
+
[](https://www.npmjs.com/package/ngwr)
|
|
10
7
|
|
|
11
8
|
[](https://github.com/thekhegay/ngwr)
|
|
12
9
|
|
|
13
10
|
[](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
|
-
|
|
15
|
+
## Installation
|
|
18
16
|
|
|
19
|
-
```
|
|
17
|
+
```shell
|
|
18
|
+
$ npm install ngwr
|
|
19
|
+
# or yarn users
|
|
20
20
|
$ yarn add ngwr
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
## Styles
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
Don't forget to add styles:
|
|
26
|
+
```scss
|
|
27
|
+
@import '~ngwr';
|
|
27
28
|
```
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
## [Components](https://ngwr.dev/components)
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
45
|
+
## Authors
|
|
46
|
+
- [Roman Khegay](https://github.com/thekhegay) – code code, design
|
|
36
47
|
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
## Sponsors
|
|
49
|
+
- [Garuna](https://garuna.dev)
|
|
50
|
+
- [Stingray Technologies](https://stingray-mobile.ru/)
|
|
39
51
|
|
|
40
|
-
|
|
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
|
|
2
|
+
import * as i1 from "./button";
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "
|
|
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.
|
|
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 {
|
|
2
|
-
export { WrButtonModule } from './button
|
|
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
|
|
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.
|
|
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
|
+
}
|
package/checkbox/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { WrCheckboxModule } from './checkbox
|
|
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 @@
|
|
|
1
|
+
export * from './input-boolean';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function InputBoolean(): PropertyDecorator;
|
|
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
|
|
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.
|
|
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
|
+
}
|
package/divider/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { WrDivider } from './divider';
|
|
2
|
+
export { WrDividerModule } from './divider-module';
|