@daffodil/design 0.68.0 → 0.68.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/esm2022/article/article/article.component.mjs +2 -2
  2. package/esm2022/article/examples/article-headings/article-headings.component.mjs +3 -4
  3. package/esm2022/loading-icon/examples/loading-icon-color/loading-icon-color.component.mjs +3 -3
  4. package/esm2022/loading-icon/loading-icon/loading-icon.component.mjs +3 -3
  5. package/esm2022/modal/service/modal.service.mjs +2 -3
  6. package/esm2022/toast/daffodil-design-toast.mjs +5 -0
  7. package/esm2022/toast/examples/daffodil-design-toast-examples.mjs +5 -0
  8. package/esm2022/toast/examples/default-toast/default-toast.component.mjs +38 -0
  9. package/esm2022/toast/examples/default-toast/default-toast.module.mjs +36 -0
  10. package/esm2022/toast/examples/index.mjs +2 -0
  11. package/esm2022/toast/examples/public_api.mjs +15 -0
  12. package/esm2022/toast/examples/toast-positions/toast-positions.component.mjs +42 -0
  13. package/esm2022/toast/examples/toast-positions/toast-positions.module.mjs +57 -0
  14. package/esm2022/toast/examples/toast-status/toast-status.component.mjs +45 -0
  15. package/esm2022/toast/examples/toast-status/toast-status.module.mjs +40 -0
  16. package/esm2022/toast/examples/toast-with-custom-duration/toast-with-custom-duration.component.mjs +26 -0
  17. package/esm2022/toast/examples/toast-with-custom-duration/toast-with-custom-duration.module.mjs +32 -0
  18. package/esm2022/toast/index.mjs +2 -0
  19. package/esm2022/toast/interfaces/toast-action.mjs +2 -0
  20. package/esm2022/toast/interfaces/toast.mjs +2 -0
  21. package/esm2022/toast/options/daff-toast-options.mjs +16 -0
  22. package/esm2022/toast/public_api.mjs +9 -0
  23. package/esm2022/toast/service/changes-focus.mjs +2 -0
  24. package/esm2022/toast/service/position-strategy.mjs +29 -0
  25. package/esm2022/toast/service/position.service.mjs +33 -0
  26. package/esm2022/toast/service/toast.service.mjs +116 -0
  27. package/esm2022/toast/toast/toast-config.mjs +2 -0
  28. package/esm2022/toast/toast/toast-template.component.mjs +262 -0
  29. package/esm2022/toast/toast/toast.component.mjs +82 -0
  30. package/esm2022/toast/toast-actions/toast-actions.directive.mjs +19 -0
  31. package/esm2022/toast/toast-message/toast-message.directive.mjs +19 -0
  32. package/esm2022/toast/toast-title/toast-title.directive.mjs +19 -0
  33. package/esm2022/toast/toast.module.mjs +70 -0
  34. package/fesm2022/daffodil-design-article-examples.mjs +2 -2
  35. package/fesm2022/daffodil-design-article-examples.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-article.mjs +2 -2
  37. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-loading-icon-examples.mjs +2 -2
  39. package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-loading-icon.mjs +2 -2
  41. package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
  42. package/fesm2022/daffodil-design-modal.mjs +1 -2
  43. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-toast-examples.mjs +287 -0
  45. package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -0
  46. package/fesm2022/daffodil-design-toast.mjs +625 -0
  47. package/fesm2022/daffodil-design-toast.mjs.map +1 -0
  48. package/loading-icon/src/loading-icon-theme.scss +24 -8
  49. package/navbar/README.md +1 -1
  50. package/package.json +1 -1
  51. package/scss/theme.scss +2 -0
  52. package/toast/README.md +115 -0
  53. package/toast/examples/default-toast/default-toast.component.d.ts +15 -0
  54. package/toast/examples/default-toast/default-toast.module.d.ts +11 -0
  55. package/toast/examples/index.d.ts +1 -0
  56. package/toast/examples/public_api.d.ts +2 -0
  57. package/toast/examples/toast-positions/toast-positions.component.d.ts +17 -0
  58. package/toast/examples/toast-positions/toast-positions.module.d.ts +12 -0
  59. package/toast/examples/toast-status/toast-status.component.d.ts +14 -0
  60. package/toast/examples/toast-status/toast-status.module.d.ts +12 -0
  61. package/toast/examples/toast-with-custom-duration/toast-with-custom-duration.component.d.ts +10 -0
  62. package/toast/examples/toast-with-custom-duration/toast-with-custom-duration.module.d.ts +10 -0
  63. package/toast/index.d.ts +1 -0
  64. package/toast/interfaces/toast-action.d.ts +38 -0
  65. package/toast/interfaces/toast.d.ts +20 -0
  66. package/toast/options/daff-toast-options.d.ts +15 -0
  67. package/toast/public_api.d.ts +11 -0
  68. package/toast/service/changes-focus.d.ts +2 -0
  69. package/toast/service/position-strategy.d.ts +3 -0
  70. package/toast/service/position.service.d.ts +15 -0
  71. package/toast/service/toast.service.d.ts +29 -0
  72. package/toast/src/toast-theme.scss +63 -0
  73. package/toast/toast/toast-config.d.ts +7 -0
  74. package/toast/toast/toast-template.component.d.ts +20 -0
  75. package/toast/toast/toast.component.d.ts +52 -0
  76. package/toast/toast-actions/toast-actions.directive.d.ts +6 -0
  77. package/toast/toast-message/toast-message.directive.d.ts +6 -0
  78. package/toast/toast-title/toast-title.directive.d.ts +6 -0
  79. package/toast/toast.module.d.ts +17 -0
@@ -0,0 +1,15 @@
1
+ import { BreakpointObserver } from '@angular/cdk/layout';
2
+ import { DaffToastOptions, DaffToastPosition } from '../options/daff-toast-options';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DaffToastPositionService {
5
+ private options;
6
+ private mediaQuery;
7
+ constructor(options: DaffToastOptions, mediaQuery: BreakpointObserver);
8
+ private _config;
9
+ private _position;
10
+ get config(): DaffToastPosition;
11
+ set config(val: DaffToastPosition);
12
+ setPosition(position: DaffToastPosition): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastPositionService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffToastPositionService>;
15
+ }
@@ -0,0 +1,29 @@
1
+ import { BreakpointObserver } from '@angular/cdk/layout';
2
+ import { Overlay } from '@angular/cdk/overlay';
3
+ import { OnDestroy } from '@angular/core';
4
+ import { DaffFocusStackService } from '@daffodil/design';
5
+ import { DaffToastPositionService } from './position.service';
6
+ import { DaffToast, DaffToastData } from '../interfaces/toast';
7
+ import { DaffToastOptions } from '../options/daff-toast-options';
8
+ import { DaffToastConfiguration } from '../toast/toast-config';
9
+ import * as i0 from "@angular/core";
10
+ export declare class DaffToastService implements OnDestroy {
11
+ private overlay;
12
+ private options;
13
+ private _parentToast;
14
+ private mediaQuery;
15
+ private toastPosition;
16
+ private focusStack;
17
+ private _sub;
18
+ private _toasts;
19
+ private _overlayRef?;
20
+ private _template?;
21
+ constructor(overlay: Overlay, options: DaffToastOptions, _parentToast: DaffToastService, mediaQuery: BreakpointObserver, toastPosition: DaffToastPositionService, focusStack: DaffFocusStackService);
22
+ ngOnDestroy(): void;
23
+ private _attachToastTemplate;
24
+ private _createOverlayRef;
25
+ open(toast: DaffToastData, configuration?: Partial<DaffToastConfiguration>): DaffToast;
26
+ close(toast: DaffToast): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastService, [null, null, { optional: true; skipSelf: true; }, null, null, null]>;
28
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffToastService>;
29
+ }
@@ -0,0 +1,63 @@
1
+ @use 'sass:map';
2
+ @use '../../scss/core';
3
+ @use '../../scss/theming';
4
+
5
+ @mixin daff-toast-theme($theme) {
6
+ $primary: map.get($theme, primary);
7
+ $secondary: map.get($theme, secondary);
8
+ $tertiary: map.get($theme, tertiary);
9
+ $neutral: core.daff-map-deep-get($theme, 'core.neutral');
10
+ $base: core.daff-map-deep-get($theme, 'core.base');
11
+ $base-contrast: core.daff-map-deep-get($theme, 'core.base-contrast');
12
+ $white: core.daff-map-deep-get($theme, 'core.white');
13
+ $black: core.daff-map-deep-get($theme, 'core.black');
14
+
15
+ .daff-toast {
16
+ background: theming.daff-illuminate($base, $neutral, 1);
17
+ box-shadow: 0 -16px 24px -4px rgba($black, 0.04), 0 8px 24px -4px rgba($black, 0.10);
18
+ color: theming.daff-text-contrast($base);
19
+
20
+ &:before {
21
+ background: theming.daff-illuminate($base, $neutral, 4);
22
+ }
23
+
24
+ &.daff-success {
25
+ background: theming.daff-color(theming.$daff-green, 10);
26
+ color: $black;
27
+
28
+ .daff-prefix {
29
+ color: theming.daff-color(theming.$daff-green, 60);
30
+ }
31
+
32
+ &:before {
33
+ background: theming.daff-color(theming.$daff-green, 60);
34
+ }
35
+ }
36
+
37
+ &.daff-warn {
38
+ background: theming.daff-color(theming.$daff-bronze, 10);
39
+ color: $black;
40
+
41
+ .daff-prefix {
42
+ color: theming.daff-color(theming.$daff-bronze, 60);
43
+ }
44
+
45
+ &:before {
46
+ background: theming.daff-color(theming.$daff-bronze, 60);
47
+ }
48
+ }
49
+
50
+ &.daff-error {
51
+ background: theming.daff-color(theming.$daff-red, 10);
52
+ color: $black;
53
+
54
+ .daff-prefix {
55
+ color: theming.daff-color(theming.$daff-red, 60);
56
+ }
57
+
58
+ &:before {
59
+ background: theming.daff-color(theming.$daff-red, 60);
60
+ }
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,7 @@
1
+ export interface DaffToastConfiguration {
2
+ /**
3
+ * The duration (in milliseconds) that a toast is visible before it's dismissed.
4
+ */
5
+ duration?: number;
6
+ }
7
+ export declare const daffDefaultToastConfiguration: DaffToastConfiguration;
@@ -0,0 +1,20 @@
1
+ import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
+ import { DaffToast } from '../interfaces/toast';
3
+ import { DaffToastOptions } from '../options/daff-toast-options';
4
+ import { DaffToastPositionService } from '../service/position.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class DaffToastTemplateComponent {
7
+ private cd;
8
+ private options;
9
+ private toastPosition;
10
+ faTimes: import("@fortawesome/fontawesome-common-types").IconDefinition;
11
+ private _items;
12
+ constructor(cd: ChangeDetectorRef, options: DaffToastOptions, toastPosition: DaffToastPositionService);
13
+ closeToast: EventEmitter<void>;
14
+ onCloseToast(event: Event): void;
15
+ get slideAnimation(): any;
16
+ get items(): DaffToast[];
17
+ set items(value: DaffToast[]);
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastTemplateComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffToastTemplateComponent, "ng-component", never, { "items": { "alias": "items"; "required": false; }; }, { "closeToast": "closeToast"; }, never, never, false, never>;
20
+ }
@@ -0,0 +1,52 @@
1
+ import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
2
+ import { ElementRef, Renderer2, AfterViewInit, AfterContentInit, OnDestroy } from '@angular/core';
3
+ import { DaffFocusStackService, DaffPrefixable, DaffPrefixDirective, DaffStatusable } from '@daffodil/design';
4
+ import { DaffToast } from '../interfaces/toast';
5
+ import { DaffToastActionsDirective } from '../toast-actions/toast-actions.directive';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * An _elementRef is needed for the core mixins
9
+ */
10
+ declare class DaffToastBase {
11
+ _elementRef: ElementRef;
12
+ _renderer: Renderer2;
13
+ constructor(_elementRef: ElementRef, _renderer: Renderer2);
14
+ }
15
+ declare const _daffToastBase: (new (...args: any[]) => {
16
+ _elementRef: ElementRef<any>;
17
+ _renderer: Renderer2;
18
+ }) & (new (...args: any[]) => {
19
+ _status: import("@daffodil/design").DaffStatus;
20
+ status: import("@daffodil/design").DaffStatus;
21
+ _elementRef: ElementRef<any>;
22
+ _renderer: Renderer2;
23
+ }) & typeof DaffToastBase;
24
+ /**
25
+ * DaffToastComponent provides a way to display and
26
+ * communicate information for user actions or system updates.
27
+ */
28
+ export declare class DaffToastComponent extends _daffToastBase implements DaffPrefixable, DaffStatusable, AfterContentInit, AfterViewInit, OnDestroy {
29
+ private elementRef;
30
+ private renderer;
31
+ private _focusTrapFactory;
32
+ private _focusStack;
33
+ /** @docs-private */
34
+ class: boolean;
35
+ /** @docs-private */
36
+ role: string;
37
+ _actions: DaffToastActionsDirective;
38
+ _prefix: DaffPrefixDirective;
39
+ toast: DaffToast;
40
+ /**
41
+ * @docs-private
42
+ */
43
+ onEscape(): void;
44
+ private _focusTrap;
45
+ constructor(elementRef: ElementRef, renderer: Renderer2, _focusTrapFactory: ConfigurableFocusTrapFactory, _focusStack: DaffFocusStackService);
46
+ ngAfterContentInit(): void;
47
+ ngAfterViewInit(): void;
48
+ ngOnDestroy(): void;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastComponent, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffToastComponent, "daff-toast", never, { "status": { "alias": "status"; "required": false; }; "toast": { "alias": "toast"; "required": false; }; }, {}, ["_actions", "_prefix"], ["[daffPrefix]", "[daffToastTitle]", "[daffToastMessage]", "[daffToastActions]", "*"], false, never>;
51
+ }
52
+ export {};
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DaffToastActionsDirective {
3
+ class: boolean;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastActionsDirective, never>;
5
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DaffToastActionsDirective, "[daffToastActions]", never, {}, {}, never, never, false, never>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DaffToastMessageDirective {
3
+ class: boolean;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastMessageDirective, never>;
5
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DaffToastMessageDirective, "[daffToastMessage]", never, {}, {}, never, never, false, never>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DaffToastTitleDirective {
3
+ class: boolean;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastTitleDirective, never>;
5
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DaffToastTitleDirective, "[daffToastTitle]", never, {}, {}, never, never, false, never>;
6
+ }
@@ -0,0 +1,17 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./toast/toast.component";
3
+ import * as i2 from "./toast-actions/toast-actions.directive";
4
+ import * as i3 from "./toast-title/toast-title.directive";
5
+ import * as i4 from "./toast-message/toast-message.directive";
6
+ import * as i5 from "./toast/toast-template.component";
7
+ import * as i6 from "@angular/common";
8
+ import * as i7 from "@daffodil/design";
9
+ import * as i8 from "@daffodil/design/button";
10
+ import * as i9 from "@fortawesome/angular-fontawesome";
11
+ import * as i10 from "@angular/cdk/portal";
12
+ import * as i11 from "@angular/cdk/overlay";
13
+ export declare class DaffToastModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffToastModule, [typeof i1.DaffToastComponent, typeof i2.DaffToastActionsDirective, typeof i3.DaffToastTitleDirective, typeof i4.DaffToastMessageDirective, typeof i5.DaffToastTemplateComponent], [typeof i6.CommonModule, typeof i7.DaffPrefixSuffixModule, typeof i8.DaffButtonModule, typeof i9.FontAwesomeModule, typeof i10.PortalModule, typeof i11.OverlayModule], [typeof i1.DaffToastComponent, typeof i2.DaffToastActionsDirective, typeof i3.DaffToastTitleDirective, typeof i4.DaffToastMessageDirective, typeof i7.DaffPrefixSuffixModule]>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffToastModule>;
17
+ }