@indigina/ui-kit 1.0.77 → 1.0.78

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.
@@ -0,0 +1,2 @@
1
+ export declare class KitToastrModule {
2
+ }
@@ -0,0 +1,26 @@
1
+ import { Renderer2 } from '@angular/core';
2
+ import { ActiveToast, ToastrService } from 'ngx-toastr';
3
+ export declare enum KitToastrType {
4
+ ERROR = "toast-error",
5
+ INFO = "toast-info",
6
+ SUCCESS = "toast-success",
7
+ WARNING = "toast-warning"
8
+ }
9
+ export interface KitToastrConfig {
10
+ type: KitToastrType;
11
+ message: string;
12
+ dismissible?: boolean;
13
+ title?: string;
14
+ }
15
+ export declare type KitToastr = ActiveToast<void>;
16
+ export declare class KitToastrService {
17
+ private toastrService;
18
+ private renderer2;
19
+ constructor(toastrService: ToastrService, renderer2: Renderer2);
20
+ show(config: KitToastrConfig): KitToastr;
21
+ private getConfig;
22
+ private removeOverlayContainerClassIfToastsEmpty;
23
+ private addOverlayContainerClass;
24
+ private removeOverlayContainerClass;
25
+ private getOverlayContainer;
26
+ }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "components",
8
8
  "shared"
9
9
  ],
10
- "version": "1.0.77",
10
+ "version": "1.0.78",
11
11
  "peerDependencies": {
12
12
  "@angular/common": "12.1.5",
13
13
  "@angular/core": "12.1.5"
@@ -32,7 +32,8 @@
32
32
  "@progress/kendo-drawing": "1.10.1",
33
33
  "@progress/kendo-licensing": "1.1.4",
34
34
  "@progress/kendo-theme-default": "4.37.0",
35
- "tslib": "2.3.1"
35
+ "tslib": "2.3.1",
36
+ "ngx-toastr": "12.0.0"
36
37
  },
37
38
  "engines": {
38
39
  "node": ">= 12",
package/public-api.d.ts CHANGED
@@ -42,3 +42,5 @@ export { KitPillComponent } from './lib/components/kit-pill/kit-pill.component';
42
42
  export { KitPillModule } from './lib/components/kit-pill/kit-pill.module';
43
43
  export { KitTooltipDirective, KitTooltipPosition } from './lib/directives/kit-tooltip/kit-tooltip.directive';
44
44
  export { KitTooltipModule } from './lib/directives/kit-tooltip/kit-tooltip.module';
45
+ export { KitToastrModule } from './lib/components/kit-toastr/kit-toastr.module';
46
+ export { KitToastrService, KitToastrConfig, KitToastrType } from './lib/components/kit-toastr/kit-toastr.service';
@@ -0,0 +1,33 @@
1
+ @import "../spacings";
2
+ @import "../colors";
3
+
4
+ $z-index-base: 5000;
5
+
6
+ @mixin overlay-backdrop {
7
+ content: "";
8
+ position: fixed;
9
+ inset: 0;
10
+ background-color: $color-black;
11
+ opacity: 0.8;
12
+ z-index: $z-index-base;
13
+ }
14
+
15
+ .kit-overlay-container {
16
+ position: fixed;
17
+ inset: 0;
18
+
19
+ .toast-container:before {
20
+ @include overlay-backdrop;
21
+ }
22
+
23
+ .kit-toastr {
24
+ margin-top: $spacing-20;
25
+ box-shadow: none;
26
+ z-index: $z-index-base + 1;
27
+
28
+ &:hover:not(.kit-toastr-dismissible) {
29
+ cursor: default;
30
+ box-shadow: none;
31
+ }
32
+ }
33
+ }
@@ -8,7 +8,9 @@
8
8
  @import "~@progress/kendo-theme-default/scss/checkbox";
9
9
  @import "~@progress/kendo-theme-default/scss/switch";
10
10
  @import "~@progress/kendo-theme-default/scss/tooltip";
11
+ @import "~ngx-toastr/toastr";
11
12
 
12
13
  /* styles which need to be included by default into app styles */
13
14
  @import "common";
14
15
  @import "components/tooltip";
16
+ @import "components/toastr";