ngwr 0.1.3 → 0.3.1
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/_index.scss +31 -0
- package/backdrop/backdrop.scss +3 -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/dialog/dialog-animations.d.ts +16 -0
- package/dialog/dialog-base.d.ts +34 -0
- package/dialog/dialog-config.d.ts +11 -0
- package/dialog/dialog-container.d.ts +22 -0
- package/dialog/dialog-content-directives.d.ts +31 -0
- package/dialog/dialog-module.d.ts +12 -0
- package/dialog/dialog-ref.d.ts +20 -0
- package/dialog/dialog-service.d.ts +27 -0
- package/dialog/dialog-tokens.d.ts +2 -0
- package/dialog/dialog.scss +48 -0
- package/dialog/index.d.ts +9 -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/dialog/dialog-animations.mjs +22 -0
- package/esm2020/dialog/dialog-base.mjs +92 -0
- package/esm2020/dialog/dialog-config.mjs +3 -0
- package/esm2020/dialog/dialog-container.mjs +58 -0
- package/esm2020/dialog/dialog-content-directives.mjs +98 -0
- package/esm2020/dialog/dialog-module.mjs +24 -0
- package/esm2020/dialog/dialog-ref.mjs +61 -0
- package/esm2020/dialog/dialog-service.mjs +109 -0
- package/esm2020/dialog/dialog-tokens.mjs +3 -0
- package/esm2020/dialog/index.mjs +10 -0
- package/esm2020/dialog/ngwr-dialog.mjs +5 -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-dialog.mjs +453 -0
- package/fesm2015/ngwr-dialog.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-dialog.mjs +447 -0
- package/fesm2020/ngwr-dialog.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 +133 -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 +92 -0
- package/styles/cdk.scss +1 -0
- package/styles/grid.scss +164 -0
- package/styles/reset.scss +106 -0
- package/styles/root.scss +163 -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/README.md +0 -40
- 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/_index.scss
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
@import 'styles/cdk';
|
|
18
|
+
|
|
19
|
+
@import 'backdrop/backdrop';
|
|
20
|
+
|
|
21
|
+
@import 'button/button';
|
|
22
|
+
@import 'checkbox/checkbox';
|
|
23
|
+
@import 'dialog/dialog';
|
|
24
|
+
@import 'divider/divider';
|
|
25
|
+
@import 'form/form';
|
|
26
|
+
@import 'icon/icon';
|
|
27
|
+
@import 'input/input';
|
|
28
|
+
@import 'skeleton/skeleton';
|
|
29
|
+
@import 'spinner/spinner';
|
|
30
|
+
@import 'tag/tag';
|
|
31
|
+
|
|
@@ -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
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnimationTriggerMetadata } from '@angular/animations';
|
|
2
|
+
export declare const WR_ANIMATION_ZOOM_CLASS_NAME_MAP: {
|
|
3
|
+
enter: string;
|
|
4
|
+
enterActive: string;
|
|
5
|
+
leave: string;
|
|
6
|
+
leaveActive: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const WR_ANIMATION_FADE_CLASS_NAME_MAP: {
|
|
9
|
+
enter: string;
|
|
10
|
+
enterActive: string;
|
|
11
|
+
leave: string;
|
|
12
|
+
leaveActive: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const wrDialogAnimations: {
|
|
15
|
+
readonly dialogContainer: AnimationTriggerMetadata;
|
|
16
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AnimationEvent } from '@angular/animations';
|
|
2
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
3
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
4
|
+
import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
import { WrDialogConfig } from './dialog-config';
|
|
7
|
+
import { WrDialogRef } from './dialog-ref';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class WrDialogBase extends BasePortalOutlet implements OnDestroy {
|
|
10
|
+
cdr: ChangeDetectorRef;
|
|
11
|
+
config: WrDialogConfig;
|
|
12
|
+
protected overlayRef: OverlayRef;
|
|
13
|
+
portalOutlet: CdkPortalOutlet;
|
|
14
|
+
dialogElementRef: ElementRef<HTMLDivElement>;
|
|
15
|
+
dialogRef: WrDialogRef;
|
|
16
|
+
containerClick: EventEmitter<void>;
|
|
17
|
+
animationStateChanged: EventEmitter<AnimationEvent>;
|
|
18
|
+
state: 'void' | 'enter' | 'exit';
|
|
19
|
+
protected readonly destroyed$: Subject<void>;
|
|
20
|
+
constructor(cdr: ChangeDetectorRef, config: WrDialogConfig, overlayRef: OverlayRef);
|
|
21
|
+
ngOnDestroy(): void;
|
|
22
|
+
onContainerClick(e: MouseEvent): void;
|
|
23
|
+
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
24
|
+
attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
|
|
25
|
+
private setEnterAnimationClass;
|
|
26
|
+
private setExitAnimationClass;
|
|
27
|
+
private setMaskExitAnimationClass;
|
|
28
|
+
private cleanAnimationClass;
|
|
29
|
+
onAnimationDone(event: AnimationEvent): void;
|
|
30
|
+
onAnimationStart(event: AnimationEvent): void;
|
|
31
|
+
startExitAnimation(): void;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogBase, never>;
|
|
33
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogBase, never, never, {}, {}, never, never, false>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentType, PositionStrategy } from '@angular/cdk/overlay';
|
|
2
|
+
import { ViewContainerRef } from '@angular/core';
|
|
3
|
+
import { SafeAny } from 'ngwr/core/types';
|
|
4
|
+
export declare class WrDialogConfig<T = SafeAny> {
|
|
5
|
+
id?: string;
|
|
6
|
+
component?: ComponentType<T>;
|
|
7
|
+
title?: string;
|
|
8
|
+
data?: SafeAny;
|
|
9
|
+
viewContainerRef?: ViewContainerRef;
|
|
10
|
+
positionStrategy?: PositionStrategy;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AnimationEvent } from '@angular/animations';
|
|
2
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
3
|
+
import { CdkPortalOutlet } from '@angular/cdk/portal';
|
|
4
|
+
import { ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
5
|
+
import { SafeAny } from 'ngwr/core/types';
|
|
6
|
+
import { WrDialogBase } from './dialog-base';
|
|
7
|
+
import { WrDialogConfig } from './dialog-config';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class WrDialogContainer extends WrDialogBase {
|
|
10
|
+
config: WrDialogConfig;
|
|
11
|
+
portalOutlet: CdkPortalOutlet;
|
|
12
|
+
dialogElementRef: ElementRef<HTMLDivElement>;
|
|
13
|
+
state: 'void' | 'enter' | 'exit';
|
|
14
|
+
onAnimationStart(event: AnimationEvent): void;
|
|
15
|
+
onAnimationDone(event: AnimationEvent): void;
|
|
16
|
+
onContainerClick(e: MouseEvent): void;
|
|
17
|
+
/** Set element classes */
|
|
18
|
+
get elClasses(): SafeAny;
|
|
19
|
+
constructor(cdr: ChangeDetectorRef, config: WrDialogConfig, overlayRef: OverlayRef);
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogContainer, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrDialogContainer, "wr-dialog-container", ["wrDialogContainer"], {}, {}, never, never, false>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { SafeAny } from 'ngwr/core/types';
|
|
3
|
+
import { WrDialogRef } from './dialog-ref';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class WrDialogClose {
|
|
6
|
+
dialogRef: WrDialogRef;
|
|
7
|
+
_onButtonClick(event: MouseEvent): void;
|
|
8
|
+
constructor(dialogRef: WrDialogRef);
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogClose, [{ optional: true; }]>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogClose, "[wr-dialog-close], [wrDialogClose]", ["wrDialogClose"], {}, {}, never, never, false>;
|
|
11
|
+
}
|
|
12
|
+
export declare class WrDialogTitle {
|
|
13
|
+
get elClasses(): SafeAny;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogTitle, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogTitle, "[wr-dialog-title], [wrDialogTitle]", ["wrtDialogTitle"], {}, {}, never, never, false>;
|
|
16
|
+
}
|
|
17
|
+
export declare class WrDialogContent {
|
|
18
|
+
get elClasses(): SafeAny;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogContent, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogContent, "[wr-dialog-content], wr-dialog-content, [wrDialogContent]", never, {}, {}, never, never, false>;
|
|
21
|
+
}
|
|
22
|
+
export declare class WrDialogFooter {
|
|
23
|
+
private readonly cdr;
|
|
24
|
+
get position(): 'start' | 'center' | 'end';
|
|
25
|
+
set position(value: 'start' | 'center' | 'end');
|
|
26
|
+
private _position;
|
|
27
|
+
get elClasses(): SafeAny;
|
|
28
|
+
constructor(cdr: ChangeDetectorRef);
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogFooter, never>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogFooter, "[wr-dialog-footer], wr-dialog-footer, [wrDialogFooter]", never, { "position": "position"; }, {}, never, never, false>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./dialog-container";
|
|
3
|
+
import * as i2 from "./dialog-content-directives";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/cdk/overlay";
|
|
6
|
+
import * as i5 from "@angular/cdk/portal";
|
|
7
|
+
import * as i6 from "ngwr/icon";
|
|
8
|
+
export declare class WrDialogModule {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WrDialogModule, [typeof i1.WrDialogContainer, typeof i2.WrDialogClose, typeof i2.WrDialogTitle, typeof i2.WrDialogContent, typeof i2.WrDialogFooter], [typeof i3.CommonModule, typeof i4.OverlayModule, typeof i5.PortalModule, typeof i6.WrIconModule], [typeof i1.WrDialogContainer, typeof i2.WrDialogClose, typeof i2.WrDialogTitle, typeof i2.WrDialogContent, typeof i2.WrDialogFooter]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<WrDialogModule>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { WrAbstractBase } from 'ngwr/core/abstract';
|
|
4
|
+
import { SafeAny } from 'ngwr/core/types';
|
|
5
|
+
import { WrDialogBase } from './dialog-base';
|
|
6
|
+
import { WrDialogConfig } from './dialog-config';
|
|
7
|
+
export declare class WrDialogRef<T = SafeAny, R = SafeAny> extends WrAbstractBase {
|
|
8
|
+
private readonly config;
|
|
9
|
+
private readonly overlayRef;
|
|
10
|
+
containerInstance: WrDialogBase;
|
|
11
|
+
readonly id?: string;
|
|
12
|
+
result?: R;
|
|
13
|
+
componentInstance: T | null;
|
|
14
|
+
private closeTimeout?;
|
|
15
|
+
readonly afterClosed: Subject<R | undefined>;
|
|
16
|
+
readonly afterOpened: Subject<void>;
|
|
17
|
+
constructor(config: WrDialogConfig<T>, overlayRef: OverlayRef, containerInstance: WrDialogBase);
|
|
18
|
+
close(result?: R): void;
|
|
19
|
+
_finishDialogClose(): void;
|
|
20
|
+
}
|