ngwr 5.0.3 → 6.1.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.
Files changed (160) hide show
  1. package/alert/index.d.ts +30 -3
  2. package/avatar/index.d.ts +30 -5
  3. package/button/index.d.ts +43 -3
  4. package/cdk/index.d.ts +22 -3
  5. package/cdk/rxjs/index.d.ts +38 -3
  6. package/cdk/types/index.d.ts +25 -3
  7. package/cdk/utils/index.d.ts +12 -3
  8. package/checkbox/index.d.ts +29 -3
  9. package/dialog/index.d.ts +191 -3
  10. package/divider/index.d.ts +16 -5
  11. package/dropdown/index.d.ts +68 -0
  12. package/dropdown/styles/_index.scss +91 -0
  13. package/dropdown/styles/vars.scss +18 -0
  14. package/fesm2022/ngwr-alert.mjs +8 -28
  15. package/fesm2022/ngwr-alert.mjs.map +1 -1
  16. package/fesm2022/ngwr-avatar.mjs +8 -28
  17. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  18. package/fesm2022/ngwr-button.mjs +10 -31
  19. package/fesm2022/ngwr-button.mjs.map +1 -1
  20. package/fesm2022/ngwr-cdk.mjs +9 -4
  21. package/fesm2022/ngwr-cdk.mjs.map +1 -1
  22. package/fesm2022/ngwr-checkbox.mjs +7 -26
  23. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  24. package/fesm2022/ngwr-dialog.mjs +135 -159
  25. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  26. package/fesm2022/ngwr-divider.mjs +5 -19
  27. package/fesm2022/ngwr-divider.mjs.map +1 -1
  28. package/fesm2022/ngwr-dropdown.mjs +315 -0
  29. package/fesm2022/ngwr-dropdown.mjs.map +1 -0
  30. package/fesm2022/ngwr-form.mjs +8 -29
  31. package/fesm2022/ngwr-form.mjs.map +1 -1
  32. package/fesm2022/ngwr-icon.mjs +11 -32
  33. package/fesm2022/ngwr-icon.mjs.map +1 -1
  34. package/fesm2022/ngwr-input.mjs +12 -32
  35. package/fesm2022/ngwr-input.mjs.map +1 -1
  36. package/fesm2022/ngwr-pagination.mjs +125 -0
  37. package/fesm2022/ngwr-pagination.mjs.map +1 -0
  38. package/fesm2022/ngwr-pipes.mjs +5 -25
  39. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  40. package/fesm2022/ngwr-progress.mjs +6 -25
  41. package/fesm2022/ngwr-progress.mjs.map +1 -1
  42. package/fesm2022/ngwr-qr.mjs +15 -37
  43. package/fesm2022/ngwr-qr.mjs.map +1 -1
  44. package/fesm2022/ngwr-select.mjs +405 -0
  45. package/fesm2022/ngwr-select.mjs.map +1 -0
  46. package/fesm2022/ngwr-skeleton.mjs +5 -19
  47. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  48. package/fesm2022/ngwr-spinner.mjs +16 -28
  49. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  50. package/fesm2022/ngwr-table.mjs +258 -0
  51. package/fesm2022/ngwr-table.mjs.map +1 -0
  52. package/fesm2022/ngwr-tag.mjs +7 -21
  53. package/fesm2022/ngwr-tag.mjs.map +1 -1
  54. package/fesm2022/ngwr-textarea.mjs +8 -27
  55. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  56. package/form/index.d.ts +26 -3
  57. package/icon/index.d.ts +828 -3
  58. package/index.d.ts +2 -5
  59. package/input/index.d.ts +41 -3
  60. package/package.json +35 -7
  61. package/pagination/index.d.ts +34 -0
  62. package/pagination/styles/_index.scss +60 -0
  63. package/pagination/styles/vars.scss +14 -0
  64. package/pipes/index.d.ts +15 -3
  65. package/progress/index.d.ts +13 -5
  66. package/qr/index.d.ts +127 -5
  67. package/select/index.d.ts +121 -0
  68. package/select/styles/_index.scss +237 -0
  69. package/select/styles/vars.scss +32 -0
  70. package/skeleton/index.d.ts +13 -2
  71. package/spinner/index.d.ts +23 -2
  72. package/spinner/styles/_index.scss +10 -3
  73. package/styles.scss +4 -0
  74. package/table/index.d.ts +101 -0
  75. package/table/styles/_index.scss +4 -0
  76. package/table/styles/table-filter.scss +202 -0
  77. package/table/styles/table-sort.scss +47 -0
  78. package/table/styles/table.scss +232 -0
  79. package/table/styles/vars.scss +21 -0
  80. package/tag/index.d.ts +24 -5
  81. package/textarea/index.d.ts +44 -4
  82. package/alert/alert-type.d.ts +0 -7
  83. package/alert/alert.component.d.ts +0 -21
  84. package/alert/alert.module.d.ts +0 -7
  85. package/alert/public-api.d.ts +0 -9
  86. package/avatar/avatar.component.d.ts +0 -27
  87. package/avatar/avatar.module.d.ts +0 -7
  88. package/avatar/public-api.d.ts +0 -8
  89. package/button/button-group.component.d.ts +0 -12
  90. package/button/button.component.d.ts +0 -31
  91. package/button/button.module.d.ts +0 -8
  92. package/button/public-api.d.ts +0 -9
  93. package/cdk/base.directive.d.ts +0 -15
  94. package/cdk/public-api.d.ts +0 -7
  95. package/cdk/rxjs/is-array.d.ts +0 -8
  96. package/cdk/rxjs/is-defined.d.ts +0 -8
  97. package/cdk/rxjs/is-not-empty-array.d.ts +0 -8
  98. package/cdk/rxjs/is-observable.d.ts +0 -9
  99. package/cdk/rxjs/public-api.d.ts +0 -10
  100. package/cdk/types/maybe.d.ts +0 -7
  101. package/cdk/types/public-api.d.ts +0 -9
  102. package/cdk/types/safe-any.d.ts +0 -7
  103. package/cdk/types/theme-color.d.ts +0 -8
  104. package/cdk/utils/generate-random-id.d.ts +0 -12
  105. package/cdk/utils/public-api.d.ts +0 -7
  106. package/checkbox/checkbox.component.d.ts +0 -28
  107. package/checkbox/checkbox.module.d.ts +0 -7
  108. package/checkbox/public-api.d.ts +0 -8
  109. package/dialog/dialog-animations.d.ts +0 -22
  110. package/dialog/dialog-base.directive.d.ts +0 -40
  111. package/dialog/dialog-close.directive.d.ts +0 -9
  112. package/dialog/dialog-content.directive.d.ts +0 -6
  113. package/dialog/dialog-data.token.d.ts +0 -8
  114. package/dialog/dialog-footer.directive.d.ts +0 -8
  115. package/dialog/dialog-options.d.ts +0 -19
  116. package/dialog/dialog-ref.d.ts +0 -26
  117. package/dialog/dialog-title.directive.d.ts +0 -6
  118. package/dialog/dialog.component.d.ts +0 -28
  119. package/dialog/dialog.module.d.ts +0 -11
  120. package/dialog/dialog.service.d.ts +0 -28
  121. package/dialog/public-api.d.ts +0 -18
  122. package/divider/divider.component.d.ts +0 -13
  123. package/divider/divider.module.d.ts +0 -7
  124. package/divider/public-api.d.ts +0 -8
  125. package/form/form-error.component.d.ts +0 -11
  126. package/form/form-item.component.d.ts +0 -14
  127. package/form/form.module.d.ts +0 -8
  128. package/form/public-api.d.ts +0 -9
  129. package/icon/icon.component.d.ts +0 -24
  130. package/icon/icon.module.d.ts +0 -7
  131. package/icon/icon.service.d.ts +0 -23
  132. package/icon/icons.d.ts +0 -770
  133. package/icon/provide-wr-icons.d.ts +0 -9
  134. package/icon/public-api.d.ts +0 -11
  135. package/input/input-types.d.ts +0 -1
  136. package/input/input.component.d.ts +0 -38
  137. package/input/input.module.d.ts +0 -7
  138. package/input/public-api.d.ts +0 -9
  139. package/pipes/new-array.pipe.d.ts +0 -13
  140. package/pipes/pipes.module.d.ts +0 -7
  141. package/pipes/public-api.d.ts +0 -8
  142. package/progress/progress.component.d.ts +0 -10
  143. package/progress/progress.module.d.ts +0 -7
  144. package/progress/public-api.d.ts +0 -8
  145. package/public-api.d.ts +0 -2
  146. package/qr/generator.d.ts +0 -7
  147. package/qr/public-api.d.ts +0 -8
  148. package/qr/qr.component.d.ts +0 -31
  149. package/qr/qr.module.d.ts +0 -7
  150. package/qr/qrcodegen.d.ts +0 -94
  151. package/skeleton/skeleton.component.d.ts +0 -10
  152. package/skeleton/skeleton.module.d.ts +0 -7
  153. package/spinner/spinner.component.d.ts +0 -11
  154. package/spinner/spinner.module.d.ts +0 -7
  155. package/tag/public-api.d.ts +0 -8
  156. package/tag/tag.component.d.ts +0 -21
  157. package/tag/tag.module.d.ts +0 -7
  158. package/textarea/public-api.d.ts +0 -8
  159. package/textarea/textarea.component.d.ts +0 -44
  160. package/textarea/textarea.module.d.ts +0 -7
package/alert/index.d.ts CHANGED
@@ -1,5 +1,32 @@
1
+ import * as i0 from '@angular/core';
2
+ import { SafeAny } from 'ngwr/cdk/types';
3
+
1
4
  /**
2
- * Generated bundle index. Do not edit.
5
+ * @license
6
+ *
7
+ * Use of this source code is governed by an MIT-style license that can be
8
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
3
9
  */
4
- /// <amd-module name="ngwr/alert" />
5
- export * from './public-api';
10
+ type WrAlertType = 'info' | 'success' | 'warning' | 'danger';
11
+
12
+ /**
13
+ * NGWR alert component.
14
+ * Closeable component for feedback.
15
+ *
16
+ * {@tutorial} [How to use wr-alert]{@link http://ngwr.dev/docs/components/alert}
17
+ */
18
+ declare class WrAlertComponent {
19
+ title: string;
20
+ message?: string;
21
+ type: WrAlertType;
22
+ closeable: boolean;
23
+ protected readonly isClosed: i0.WritableSignal<boolean>;
24
+ get elClasses(): SafeAny;
25
+ onClose(): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrAlertComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrAlertComponent, "wr-alert", never, { "title": { "alias": "title"; "required": true; }; "message": { "alias": "message"; "required": false; }; "type": { "alias": "type"; "required": false; }; "closeable": { "alias": "closeable"; "required": false; }; }, {}, never, never, true, never>;
28
+ static ngAcceptInputType_closeable: unknown;
29
+ }
30
+
31
+ export { WrAlertComponent };
32
+ export type { WrAlertType };
package/avatar/index.d.ts CHANGED
@@ -1,5 +1,30 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ngwr/avatar" />
5
- export * from './public-api';
1
+ import * as i0 from '@angular/core';
2
+ import { ChangeDetectorRef, ElementRef } from '@angular/core';
3
+ import { SafeAny } from 'ngwr/cdk/types';
4
+
5
+ declare class WrAvatarComponent {
6
+ readonly cdr: ChangeDetectorRef;
7
+ readonly elRef: ElementRef<any>;
8
+ readonly remSize: number;
9
+ readonly isImgLoaded: i0.WritableSignal<boolean>;
10
+ private calcRemToPx;
11
+ constructor();
12
+ url: string;
13
+ alt: string;
14
+ rounded: boolean;
15
+ /**
16
+ * Width and height in rem
17
+ * @example size="6" transforms to 6 * remSize (16 by default)
18
+ */
19
+ get size(): number;
20
+ set size(value: number | string);
21
+ private _size;
22
+ get elClasses(): SafeAny;
23
+ get elStyles(): SafeAny;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrAvatarComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrAvatarComponent, "wr-avatar", never, { "url": { "alias": "url"; "required": true; }; "alt": { "alias": "alt"; "required": true; }; "rounded": { "alias": "rounded"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, ["*"], true, never>;
26
+ static ngAcceptInputType_rounded: unknown;
27
+ static ngAcceptInputType_size: unknown;
28
+ }
29
+
30
+ export { WrAvatarComponent };
package/button/index.d.ts CHANGED
@@ -1,5 +1,45 @@
1
+ import { WrThemeColor, SafeAny } from 'ngwr/cdk/types';
2
+ import { wrIconName } from 'ngwr/icon';
3
+ import * as i0 from '@angular/core';
4
+
1
5
  /**
2
- * Generated bundle index. Do not edit.
6
+ * NGWR button component.
7
+ * Trigger an operation or perform an action.
8
+ *
9
+ * {@tutorial} [How to use wr-btn]{@link http://ngwr.dev/docs/components/button}
3
10
  */
4
- /// <amd-module name="ngwr/button" />
5
- export * from './public-api';
11
+ declare class WrButtonComponent {
12
+ color?: WrThemeColor | null;
13
+ size: 'default' | 'small';
14
+ icon: wrIconName | null;
15
+ iconPosition: 'start' | 'end';
16
+ disabled: boolean;
17
+ outlined: boolean;
18
+ rounded: boolean;
19
+ block: boolean;
20
+ loading: boolean;
21
+ isDisabledWhenLoading: boolean;
22
+ get nativeDisabled(): '' | null;
23
+ get elClasses(): SafeAny;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrButtonComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrButtonComponent, "wr-btn, button[wr-btn], a[wr-btn]", never, { "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "outlined": { "alias": "outlined"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "block": { "alias": "block"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "isDisabledWhenLoading": { "alias": "isDisabledWhenLoading"; "required": false; }; }, {}, never, ["*"], true, never>;
26
+ static ngAcceptInputType_disabled: unknown;
27
+ static ngAcceptInputType_outlined: unknown;
28
+ static ngAcceptInputType_rounded: unknown;
29
+ static ngAcceptInputType_block: unknown;
30
+ static ngAcceptInputType_loading: unknown;
31
+ static ngAcceptInputType_isDisabledWhenLoading: unknown;
32
+ }
33
+
34
+ /**
35
+ * NGWR button group.
36
+ *
37
+ * {@tutorial} [How to use wr-btn-group]{@link http://ngwr.dev/docs/components/button-group}
38
+ */
39
+ declare class WrButtonGroupComponent {
40
+ get classes(): SafeAny;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrButtonGroupComponent, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrButtonGroupComponent, "wr-btn-group", never, {}, {}, never, ["*"], true, never>;
43
+ }
44
+
45
+ export { WrButtonComponent, WrButtonGroupComponent };
package/cdk/index.d.ts CHANGED
@@ -1,5 +1,24 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy, DestroyRef } from '@angular/core';
3
+ import { Subject } from 'rxjs';
4
+
1
5
  /**
2
- * Generated bundle index. Do not edit.
6
+ * @license
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
3
10
  */
4
- /// <amd-module name="ngwr/cdk" />
5
- export * from './public-api';
11
+
12
+ declare abstract class WrAbstractBase implements OnDestroy {
13
+ /**
14
+ * @deprecated use destroyRef$ instead
15
+ * @protected
16
+ */
17
+ protected readonly destroyed$: Subject<void>;
18
+ protected readonly destroyRef$: DestroyRef;
19
+ ngOnDestroy(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrAbstractBase, never>;
21
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WrAbstractBase, never, never, {}, {}, never, never, true, never>;
22
+ }
23
+
24
+ export { WrAbstractBase };
@@ -1,5 +1,40 @@
1
+ import { Maybe, SafeAny } from 'ngwr/cdk/types';
2
+ import { Observable } from 'rxjs';
3
+
1
4
  /**
2
- * Generated bundle index. Do not edit.
5
+ * @license
6
+ *
7
+ * Use of this source code is governed by an MIT-style license that can be
8
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
3
9
  */
4
- /// <amd-module name="ngwr/cdk/rxjs" />
5
- export * from './public-api';
10
+
11
+ declare function isArray<T>(val: Maybe<T>): val is T;
12
+
13
+ /**
14
+ * @license
15
+ *
16
+ * Use of this source code is governed by an MIT-style license that can be
17
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
18
+ */
19
+
20
+ declare function isDefined<T>(value: Maybe<T>): value is T;
21
+
22
+ /**
23
+ * @license
24
+ *
25
+ * Use of this source code is governed by an MIT-style license that can be
26
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
27
+ */
28
+
29
+ declare function isNotEmptyArray<T>(val: Maybe<T>): val is T;
30
+
31
+ /**
32
+ * @license
33
+ *
34
+ * Use of this source code is governed by an MIT-style license that can be
35
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
36
+ */
37
+
38
+ declare function isObservable(obj: SafeAny | Observable<SafeAny>): obj is Observable<SafeAny>;
39
+
40
+ export { isArray, isDefined, isNotEmptyArray, isObservable };
@@ -1,5 +1,27 @@
1
1
  /**
2
- * Generated bundle index. Do not edit.
2
+ * @license
3
+ *
4
+ * Use of this source code is governed by an MIT-style license that can be
5
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
3
6
  */
4
- /// <amd-module name="ngwr/cdk/types" />
5
- export * from './public-api';
7
+ type Maybe<T> = T | undefined | null;
8
+
9
+ /**
10
+ * @license
11
+ *
12
+ * Use of this source code is governed by an MIT-style license that can be
13
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
14
+ */
15
+ type SafeAny = any;
16
+
17
+ /**
18
+ * @license
19
+ *
20
+ * Use of this source code is governed by an MIT-style license that can be
21
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
22
+ */
23
+ declare const wrThemeColors: readonly ["primary", "secondary", "success", "warning", "danger", "light", "medium", "dark"];
24
+ type WrThemeColor = (typeof wrThemeColors)[number];
25
+
26
+ export { wrThemeColors };
27
+ export type { Maybe, SafeAny, WrThemeColor };
@@ -1,5 +1,14 @@
1
1
  /**
2
- * Generated bundle index. Do not edit.
2
+ * @license
3
+ *
4
+ * Use of this source code is governed by an MIT-style license that can be
5
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
3
6
  */
4
- /// <amd-module name="ngwr/cdk/utils" />
5
- export * from './public-api';
7
+ /**
8
+ * Generates random ID
9
+ *
10
+ * @return {string}
11
+ */
12
+ declare function generateRandomId(): string;
13
+
14
+ export { generateRandomId };
@@ -1,5 +1,31 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { WrAbstractBase } from 'ngwr/cdk';
4
+ import { SafeAny } from 'ngwr/cdk/types';
5
+ import { wrIconName } from 'ngwr/icon';
6
+
1
7
  /**
2
- * Generated bundle index. Do not edit.
8
+ * NGWR checkbox component.
9
+ *
10
+ * {@tutorial} [How to use wr-checkbox]{@link http://ngwr.dev/docs/components/checkbox}
3
11
  */
4
- /// <amd-module name="ngwr/checkbox" />
5
- export * from './public-api';
12
+ declare class WrCheckboxComponent extends WrAbstractBase implements ControlValueAccessor {
13
+ id: string;
14
+ icon: wrIconName | null;
15
+ get elClasses(): SafeAny;
16
+ get nativeDisabled(): '' | null;
17
+ protected readonly inputValue: _angular_core.WritableSignal<boolean | null>;
18
+ protected value?: boolean;
19
+ private readonly cdr;
20
+ protected readonly isDisabled: _angular_core.WritableSignal<boolean>;
21
+ onChange: (value: boolean) => void;
22
+ onTouched: () => void;
23
+ registerOnChange(fn: (value: boolean) => void): void;
24
+ registerOnTouched(fn: () => void): void;
25
+ setDisabledState(isDisabled: boolean): void;
26
+ writeValue(value: boolean): void;
27
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrCheckboxComponent, never>;
28
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrCheckboxComponent, "wr-checkbox", never, { "id": { "alias": "id"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, {}, never, ["*"], true, never>;
29
+ }
30
+
31
+ export { WrCheckboxComponent };
package/dialog/index.d.ts CHANGED
@@ -1,5 +1,193 @@
1
+ import { AnimationEvent, AnimationTriggerMetadata } from '@angular/animations';
2
+ import { ComponentType, PositionStrategy, ScrollStrategy, OverlayRef } from '@angular/cdk/overlay';
3
+ import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
4
+ import * as i0 from '@angular/core';
5
+ import { ViewContainerRef, ChangeDetectorRef, ElementRef, EventEmitter, ComponentRef, EmbeddedViewRef, InjectionToken } from '@angular/core';
6
+ import { SafeAny } from 'ngwr/cdk/types';
7
+ import { Subject } from 'rxjs';
8
+
1
9
  /**
2
- * Generated bundle index. Do not edit.
10
+ * @license
11
+ *
12
+ * Use of this source code is governed by an MIT-style license that can be
13
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
3
14
  */
4
- /// <amd-module name="ngwr/dialog" />
5
- export * from './public-api';
15
+
16
+ declare class WrDialogOptions<C = SafeAny> {
17
+ id?: string;
18
+ component?: ComponentType<C>;
19
+ data?: SafeAny;
20
+ hasBackdrop?: boolean;
21
+ backdropClass?: string;
22
+ positionStrategy?: PositionStrategy;
23
+ scrollStrategy?: ScrollStrategy;
24
+ viewContainerRef?: ViewContainerRef;
25
+ }
26
+
27
+ /**
28
+ * @license
29
+ *
30
+ * Use of this source code is governed by an MIT-style license that can be
31
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
32
+ */
33
+
34
+ declare class WrDialogRef<C = SafeAny, R = SafeAny> {
35
+ private overlayRef;
36
+ private options;
37
+ baseInstance: WrDialogBaseDirective;
38
+ readonly id?: string;
39
+ componentInstance: C | null;
40
+ result?: R;
41
+ readonly afterOpened: Subject<void>;
42
+ readonly afterClosed: Subject<R | undefined>;
43
+ private closeTimeout?;
44
+ private readonly destroyRef$;
45
+ constructor(overlayRef: OverlayRef, options: WrDialogOptions, baseInstance: WrDialogBaseDirective);
46
+ close(result?: R): void;
47
+ private _finishDialogClose;
48
+ }
49
+
50
+ /**
51
+ * @license
52
+ *
53
+ * Use of this source code is governed by an MIT-style license that can be
54
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
55
+ */
56
+
57
+ declare class WrDialogBaseDirective extends BasePortalOutlet {
58
+ cdr: ChangeDetectorRef;
59
+ options: WrDialogOptions;
60
+ protected overlayRef: OverlayRef;
61
+ portalOutlet: CdkPortalOutlet;
62
+ dialogElementRef: ElementRef<HTMLDivElement>;
63
+ dialogRef: WrDialogRef;
64
+ containerClick: EventEmitter<void>;
65
+ animationStateChanged: EventEmitter<AnimationEvent>;
66
+ state: 'void' | 'enter' | 'exit';
67
+ constructor(cdr: ChangeDetectorRef, options: WrDialogOptions, overlayRef: OverlayRef);
68
+ onContainerClick(e: MouseEvent): void;
69
+ attachComponentPortal<C>(portal: ComponentPortal<C>): ComponentRef<C>;
70
+ attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
71
+ private setEnterAnimationClass;
72
+ private setExitAnimationClass;
73
+ private setMaskExitAnimationClass;
74
+ private cleanAnimationClass;
75
+ onAnimationDone(event: AnimationEvent): void;
76
+ onAnimationStart(event: AnimationEvent): void;
77
+ startExitAnimation(): void;
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogBaseDirective, never>;
79
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogBaseDirective, never, never, {}, {}, never, never, true, never>;
80
+ }
81
+
82
+ /**
83
+ * @license
84
+ *
85
+ * Use of this source code is governed by an MIT-style license that can be
86
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
87
+ */
88
+
89
+ declare class WrDialogComponent extends WrDialogBaseDirective {
90
+ options: WrDialogOptions;
91
+ portalOutlet: CdkPortalOutlet;
92
+ dialogElementRef: ElementRef<HTMLDivElement>;
93
+ state: 'void' | 'enter' | 'exit';
94
+ onAnimationStart(event: AnimationEvent): void;
95
+ onAnimationDone(event: AnimationEvent): void;
96
+ onContainerClick(e: MouseEvent): void;
97
+ /** Set element classes */
98
+ get elClasses(): SafeAny;
99
+ constructor(cdr: ChangeDetectorRef, options: WrDialogOptions, overlayRef: OverlayRef);
100
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogComponent, never>;
101
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrDialogComponent, "wr-dialog", never, {}, {}, never, never, true, never>;
102
+ }
103
+
104
+ declare class WrDialogModule {
105
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogModule, never>;
106
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WrDialogModule, never, never, never>;
107
+ static ɵinj: i0.ɵɵInjectorDeclaration<WrDialogModule>;
108
+ }
109
+
110
+ /**
111
+ * NGWR dialog service.
112
+ *
113
+ * {@tutorial} [How to use wr-dialog]{@link http://ngwr.dev/docs/components/dialog}
114
+ */
115
+ declare class WrDialogService {
116
+ private readonly overlay;
117
+ private readonly injector;
118
+ private readonly parentModal;
119
+ private openedDialogsAtThisLevel;
120
+ private readonly afterAllClosedAtThisLevel;
121
+ get openedDialogs(): WrDialogRef[];
122
+ get _afterAllClosed(): Subject<void>;
123
+ open<C = SafeAny, R = SafeAny>(options: WrDialogOptions<C>): WrDialogRef<C, R>;
124
+ private _defaultPositionStrategy;
125
+ private _defaultScrollStrategy;
126
+ private _createOverlay;
127
+ private _attachDialogContainer;
128
+ private _attachDialogContent;
129
+ private _removeOpenedModal;
130
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogService, never>;
131
+ static ɵprov: i0.ɵɵInjectableDeclaration<WrDialogService>;
132
+ }
133
+
134
+ /**
135
+ * @license
136
+ *
137
+ * Use of this source code is governed by an MIT-style license that can be
138
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
139
+ */
140
+
141
+ declare const WR_ANIMATION_ZOOM_CLASS_NAME_MAP: {
142
+ enter: string;
143
+ enterActive: string;
144
+ leave: string;
145
+ leaveActive: string;
146
+ };
147
+ declare const WR_ANIMATION_FADE_CLASS_NAME_MAP: {
148
+ enter: string;
149
+ enterActive: string;
150
+ leave: string;
151
+ leaveActive: string;
152
+ };
153
+ declare const wrDialogAnimations: {
154
+ readonly dialogComponent: AnimationTriggerMetadata;
155
+ };
156
+
157
+ declare class WrDialogCloseDirective {
158
+ dialogRef: WrDialogRef;
159
+ _onButtonClick(event: MouseEvent): void;
160
+ constructor(dialogRef: WrDialogRef);
161
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogCloseDirective, [{ optional: true; }]>;
162
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogCloseDirective, "[wrDialogClose]", never, {}, {}, never, never, true, never>;
163
+ }
164
+
165
+ declare class WrDialogContentDirective {
166
+ class: string;
167
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogContentDirective, never>;
168
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogContentDirective, "[wrDialogContent]", never, {}, {}, never, never, true, never>;
169
+ }
170
+
171
+ /**
172
+ * @license
173
+ *
174
+ * Use of this source code is governed by an MIT-style license that can be
175
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
176
+ */
177
+
178
+ declare const WR_DIALOG_DATA: InjectionToken<any>;
179
+
180
+ declare class WrDialogFooterDirective {
181
+ position: 'start' | 'center' | 'end';
182
+ get elClasses(): SafeAny;
183
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogFooterDirective, never>;
184
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogFooterDirective, "[wrDialogFooter]", never, { "position": { "alias": "position"; "required": false; }; }, {}, never, never, true, never>;
185
+ }
186
+
187
+ declare class WrDialogTitleDirective {
188
+ class: string;
189
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogTitleDirective, never>;
190
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogTitleDirective, "[wrDialogTitle]", never, {}, {}, never, never, true, never>;
191
+ }
192
+
193
+ export { WR_ANIMATION_FADE_CLASS_NAME_MAP, WR_ANIMATION_ZOOM_CLASS_NAME_MAP, WR_DIALOG_DATA, WrDialogBaseDirective, WrDialogCloseDirective, WrDialogComponent, WrDialogContentDirective, WrDialogFooterDirective, WrDialogModule, WrDialogOptions, WrDialogRef, WrDialogService, WrDialogTitleDirective, wrDialogAnimations };
@@ -1,5 +1,16 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ngwr/divider" />
5
- export * from './public-api';
1
+ import { WrThemeColor, SafeAny } from 'ngwr/cdk/types';
2
+ import * as i0 from '@angular/core';
3
+
4
+ declare class WrDividerComponent {
5
+ color: WrThemeColor | null;
6
+ type: 'solid' | 'dashed' | 'dotted';
7
+ width: number;
8
+ get elClasses(): SafeAny;
9
+ get elStyles(): SafeAny;
10
+ role: string;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDividerComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrDividerComponent, "wr-divider", never, { "color": { "alias": "color"; "required": false; }; "type": { "alias": "type"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, {}, never, never, true, never>;
13
+ static ngAcceptInputType_width: unknown;
14
+ }
15
+
16
+ export { WrDividerComponent };
@@ -0,0 +1,68 @@
1
+ import { ConnectedPosition } from '@angular/cdk/overlay';
2
+ import * as i0 from '@angular/core';
3
+ import { TemplateRef, OnDestroy } from '@angular/core';
4
+ import { wrIconName } from 'ngwr/icon';
5
+
6
+ /**
7
+ * @license
8
+ *
9
+ * Use of this source code is governed by an MIT-style license that can be
10
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
11
+ */
12
+
13
+ type WrDropdownTrigger = 'click' | 'hover';
14
+ declare const WR_DROPDOWN_POSITIONS: Record<string, ConnectedPosition[]>;
15
+
16
+ /**
17
+ * @license
18
+ *
19
+ * Use of this source code is governed by an MIT-style license that can be
20
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
21
+ */
22
+
23
+ declare class WrDropdownMenuComponent {
24
+ get hostClasses(): Record<string, string>;
25
+ contentTpl: TemplateRef<void>;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDropdownMenuComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrDropdownMenuComponent, "wr-dropdown-menu", ["wrDropdownMenu"], {}, {}, never, ["*"], true, never>;
28
+ }
29
+
30
+ declare class WrDropdownDirective implements OnDestroy {
31
+ dropdownMenu: i0.InputSignal<WrDropdownMenuComponent | undefined>;
32
+ trigger: i0.InputSignal<WrDropdownTrigger>;
33
+ position: i0.InputSignal<string>;
34
+ private readonly isOpen;
35
+ private overlayRef?;
36
+ private clickTimeStamp;
37
+ private readonly overlay;
38
+ private readonly elementRef;
39
+ private readonly viewContainerRef;
40
+ private readonly scrollStrategyOptions;
41
+ private readonly destroyRef;
42
+ get hostClasses(): Record<string, boolean>;
43
+ constructor();
44
+ ngOnDestroy(): void;
45
+ protected onClick(event: MouseEvent): void;
46
+ protected onMouseEnter(): void;
47
+ private open;
48
+ private setupClickEvents;
49
+ private setupHoverEvents;
50
+ private close;
51
+ private destroyOverlay;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDropdownDirective, never>;
53
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WrDropdownDirective, "[wrDropdown]", never, { "dropdownMenu": { "alias": "dropdownMenu"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
54
+ }
55
+
56
+ declare class WrDropdownMenuItemComponent {
57
+ icon: i0.InputSignal<wrIconName | null>;
58
+ disabled: i0.InputSignalWithTransform<boolean, unknown>;
59
+ get hostClasses(): Record<string, boolean>;
60
+ attrRole: string;
61
+ tabindex: string;
62
+ protected onClick(event: MouseEvent): void;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<WrDropdownMenuItemComponent, never>;
64
+ static ɵcmp: i0.ɵɵComponentDeclaration<WrDropdownMenuItemComponent, "wr-dropdown-menu-item", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
65
+ }
66
+
67
+ export { WR_DROPDOWN_POSITIONS, WrDropdownDirective, WrDropdownMenuComponent, WrDropdownMenuItemComponent };
68
+ export type { WrDropdownTrigger };
@@ -0,0 +1,91 @@
1
+ @forward "./vars";
2
+
3
+ .wr-dropdown {
4
+ &-trigger {
5
+ cursor: pointer;
6
+ }
7
+
8
+ &-menu {
9
+ display: flex;
10
+ flex-direction: column;
11
+ min-width: var(--wr-dropdown-min-width);
12
+ padding: var(--wr-dropdown-padding);
13
+ box-shadow: var(--wr-dropdown-shadow);
14
+ background: var(--wr-dropdown-bg);
15
+ border: 1px solid var(--wr-dropdown-border-color);
16
+ border-radius: var(--wr-dropdown-border-radius);
17
+ }
18
+
19
+ &--top, &--topRight, &--topLeft {
20
+ padding-bottom: 4px;
21
+ }
22
+
23
+ &--bottom, &--bottomLeft, &--bottomRight {
24
+ padding-top: 4px;
25
+ }
26
+
27
+ &--left {
28
+ padding-right: 4px;
29
+ }
30
+
31
+ &--right {
32
+ padding-left: 4px;
33
+ }
34
+ }
35
+
36
+ .wr-dropdown-item {
37
+ position: relative;
38
+ display: flex;
39
+ align-items: center;
40
+ width: 100%;
41
+ height: var(--wr-dropdown-item-height);
42
+ padding: var(--wr-dropdown-item-padding);
43
+ background: none;
44
+ border: none;
45
+ cursor: pointer;
46
+ user-select: none;
47
+ color: var(--wr-dropdown-item-color);
48
+ text-align: left;
49
+ font: inherit;
50
+ white-space: nowrap;
51
+ transition: all var(--wr-transition-base);
52
+
53
+ &:not(&--disabled) {
54
+ &:hover {
55
+ background-color: var(--wr-dropdown-item-hover-bg);
56
+ }
57
+
58
+ &:focus {
59
+ background-color: var(--wr-dropdown-item-hover-bg);
60
+ outline: none;
61
+ }
62
+
63
+ &:active {
64
+ background-color: var(--wr-dropdown-item-active-bg);
65
+ }
66
+ }
67
+
68
+ &__content {
69
+ display: flex;
70
+ align-items: center;
71
+ width: 100%;
72
+ font-size: var(--wr-dropdown-item-font-size);
73
+ gap: var(--wr-dropdown-item-gap);
74
+ }
75
+
76
+ &__icon {
77
+ --wr-icon-size: var(--wr-dropdown-item-icon-size);
78
+ }
79
+
80
+ &__label {
81
+ flex: 1;
82
+ text-overflow: ellipsis;
83
+ overflow: hidden;
84
+ }
85
+
86
+ &--disabled {
87
+ cursor: not-allowed;
88
+ color: var(--wr-dropdown-item-disabled-color);
89
+ pointer-events: none;
90
+ }
91
+ }