@daffodil/design 0.85.0 → 0.86.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.
Files changed (60) hide show
  1. package/atoms/form/error-message/error-message.component.d.ts +6 -0
  2. package/atoms/form/form-field/form-field/form-field.component.d.ts +83 -13
  3. package/atoms/form/form-field/form-field-control.d.ts +2 -0
  4. package/atoms/form/form-field/form-field.d.ts +2 -1
  5. package/atoms/form/form-field/label/label.directive.d.ts +5 -0
  6. package/atoms/form/form-field/public_api.d.ts +1 -0
  7. package/atoms/form/form-label/form-label.directive.d.ts +3 -0
  8. package/atoms/form/hint/hint.component.d.ts +1 -1
  9. package/button/README.md +3 -3
  10. package/button/button/button-base.directive.d.ts +1 -2
  11. package/button/src/button/button-base.scss +0 -18
  12. package/core/compactable/compactable.directive.d.ts +3 -0
  13. package/core/openable/openable.directive.d.ts +1 -1
  14. package/core/selectable/selectable.directive.d.ts +3 -1
  15. package/core/sizable/sizable.directive.d.ts +2 -2
  16. package/core/skeletonable/public_api.d.ts +0 -1
  17. package/core/skeletonable/skeletonable.directive.d.ts +3 -0
  18. package/core/text-alignable/text-alignable.directive.d.ts +9 -5
  19. package/fesm2022/daffodil-design-article.mjs +2 -2
  20. package/fesm2022/daffodil-design-breadcrumb.mjs +2 -2
  21. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-button-examples.mjs +12 -12
  23. package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-button.mjs +15 -39
  25. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-image.mjs +2 -2
  27. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-input-examples.mjs +10 -10
  29. package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-input.mjs +48 -5
  31. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-media-gallery.mjs +2 -2
  33. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-quantity-field-examples.mjs +4 -4
  35. package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-toast-examples.mjs +0 -59
  37. package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-toast.mjs +52 -40
  39. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  40. package/fesm2022/daffodil-design.mjs +228 -98
  41. package/fesm2022/daffodil-design.mjs.map +1 -1
  42. package/input/input.component.d.ts +21 -5
  43. package/package.json +1 -1
  44. package/scss/state/skeleton/_mixins.scss +4 -1
  45. package/scss/theming/contrast/luminance/luminance.scss +3 -3
  46. package/src/atoms/form/form-field/form-field/form-field-theme.scss +7 -2
  47. package/toast/README.md +21 -1
  48. package/toast/examples/public_api.d.ts +1 -2
  49. package/toast/helpers/toast-position.d.ts +8 -0
  50. package/toast/interfaces/toast-options.d.ts +19 -0
  51. package/toast/interfaces/toast.d.ts +1 -1
  52. package/toast/public_api.d.ts +2 -2
  53. package/toast/service/position-strategy.d.ts +1 -1
  54. package/toast/service/position.service.d.ts +1 -1
  55. package/toast/service/toast.service.d.ts +1 -1
  56. package/toast/toast/toast-provider.d.ts +16 -4
  57. package/toast/toast/toast-template.component.d.ts +1 -1
  58. package/core/skeletonable/skeletonable.d.ts +0 -6
  59. package/toast/examples/toast-positions/toast-positions.component.d.ts +0 -20
  60. package/toast/options/daff-toast-options.d.ts +0 -14
@@ -1,31 +1,47 @@
1
- import { ElementRef, OnInit } from '@angular/core';
1
+ import { ElementRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { NgControl } from '@angular/forms';
3
- import { DaffFormFieldControl } from '@daffodil/design';
3
+ import { DaffFormFieldComponent, DaffFormFieldControl } from '@daffodil/design';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * DaffInputComponent provides the same functionality as a native `<input>` and contains custom styling and functionality.
7
7
  */
8
- export declare class DaffInputComponent extends DaffFormFieldControl<string> implements DaffFormFieldControl<string>, OnInit {
8
+ export declare class DaffInputComponent extends DaffFormFieldControl<string> implements DaffFormFieldControl<string>, OnInit, OnChanges {
9
9
  /** @docs-private */
10
10
  ngControl: NgControl;
11
11
  private _elementRef;
12
+ private formField;
12
13
  /** @docs-private */
13
14
  class: boolean;
14
15
  /** @docs-private */
15
16
  controlType: string;
17
+ /** @docs-private */
16
18
  focused: boolean;
17
19
  /** @docs-private */
18
20
  focus(): void;
21
+ private _id;
22
+ /**
23
+ * @docs-private
24
+ */
25
+ get internalId(): string;
26
+ /**
27
+ * @docs-private
28
+ */
29
+ get ariaDescribedBy(): string;
19
30
  /** @docs-private */
20
31
  blur(): void;
21
32
  constructor(
22
33
  /** @docs-private */
23
- ngControl: NgControl, _elementRef: ElementRef<HTMLInputElement>);
34
+ ngControl: NgControl, _elementRef: ElementRef<HTMLInputElement>, formField: DaffFormFieldComponent);
35
+ /**
36
+ * @docs-private
37
+ */
38
+ ngOnChanges(changes: SimpleChanges): void;
24
39
  /** @docs-private */
25
40
  ngOnInit(): void;
26
41
  /** @docs-private */
27
42
  onFocus(): void;
43
+ /** @docs-private */
28
44
  get value(): string;
29
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffInputComponent, [{ optional: true; self: true; }, null]>;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffInputComponent, [{ optional: true; self: true; }, null, null]>;
30
46
  static ɵcmp: i0.ɵɵComponentDeclaration<DaffInputComponent, "input[daff-input]", never, {}, {}, never, ["*"], true, never>;
31
47
  }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@daffodil/design","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/design"]}}},"version":"0.85.0","author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","description":"A consistent, sane api driver that works with different ecommerce systems.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"peerDependencies":{"@angular/animations":"^19.0.0","@angular/common":"^19.0.0","@angular/core":"^19.0.0","@angular/forms":"^19.0.0","@angular/cdk":"^19.0.0","@daffodil/core":"0.85.0","@fortawesome/angular-fontawesome":"^1.0.0","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","modern-normalize":"^3.0.1","rxjs":"7.8.1"},"optionalDependencies":{"@faker-js/faker":"^9.8.0"},"exports":{"./scss/global":{"sass":"./scss/global.scss"},"./scss/theme":{"sass":"./scss/theme.scss"},"./scss/utilities":{"sass":"./scss/utilities.scss"},"./scss/typography":{"sass":"./scss/typography/_index.scss"},"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-design.mjs"},"./accordion":{"types":"./accordion/index.d.ts","default":"./fesm2022/daffodil-design-accordion.mjs"},"./article":{"types":"./article/index.d.ts","default":"./fesm2022/daffodil-design-article.mjs"},"./breadcrumb":{"types":"./breadcrumb/index.d.ts","default":"./fesm2022/daffodil-design-breadcrumb.mjs"},"./button":{"types":"./button/index.d.ts","default":"./fesm2022/daffodil-design-button.mjs"},"./callout":{"types":"./callout/index.d.ts","default":"./fesm2022/daffodil-design-callout.mjs"},"./card":{"types":"./card/index.d.ts","default":"./fesm2022/daffodil-design-card.mjs"},"./container":{"types":"./container/index.d.ts","default":"./fesm2022/daffodil-design-container.mjs"},"./hero":{"types":"./hero/index.d.ts","default":"./fesm2022/daffodil-design-hero.mjs"},"./image":{"types":"./image/index.d.ts","default":"./fesm2022/daffodil-design-image.mjs"},"./input":{"types":"./input/index.d.ts","default":"./fesm2022/daffodil-design-input.mjs"},"./link-set":{"types":"./link-set/index.d.ts","default":"./fesm2022/daffodil-design-link-set.mjs"},"./list":{"types":"./list/index.d.ts","default":"./fesm2022/daffodil-design-list.mjs"},"./loading-icon":{"types":"./loading-icon/index.d.ts","default":"./fesm2022/daffodil-design-loading-icon.mjs"},"./media-gallery":{"types":"./media-gallery/index.d.ts","default":"./fesm2022/daffodil-design-media-gallery.mjs"},"./menu":{"types":"./menu/index.d.ts","default":"./fesm2022/daffodil-design-menu.mjs"},"./modal":{"types":"./modal/index.d.ts","default":"./fesm2022/daffodil-design-modal.mjs"},"./navbar":{"types":"./navbar/index.d.ts","default":"./fesm2022/daffodil-design-navbar.mjs"},"./notification":{"types":"./notification/index.d.ts","default":"./fesm2022/daffodil-design-notification.mjs"},"./paginator":{"types":"./paginator/index.d.ts","default":"./fesm2022/daffodil-design-paginator.mjs"},"./progress-bar":{"types":"./progress-bar/index.d.ts","default":"./fesm2022/daffodil-design-progress-bar.mjs"},"./quantity-field":{"types":"./quantity-field/index.d.ts","default":"./fesm2022/daffodil-design-quantity-field.mjs"},"./sidebar":{"types":"./sidebar/index.d.ts","default":"./fesm2022/daffodil-design-sidebar.mjs"},"./switch":{"types":"./switch/index.d.ts","default":"./fesm2022/daffodil-design-switch.mjs"},"./tabs":{"types":"./tabs/index.d.ts","default":"./fesm2022/daffodil-design-tabs.mjs"},"./text-snippet":{"types":"./text-snippet/index.d.ts","default":"./fesm2022/daffodil-design-text-snippet.mjs"},"./toast":{"types":"./toast/index.d.ts","default":"./fesm2022/daffodil-design-toast.mjs"},"./tree":{"types":"./tree/index.d.ts","default":"./fesm2022/daffodil-design-tree.mjs"},"./youtube-player":{"types":"./youtube-player/index.d.ts","default":"./fesm2022/daffodil-design-youtube-player.mjs"},"./accordion/examples":{"types":"./accordion/examples/index.d.ts","default":"./fesm2022/daffodil-design-accordion-examples.mjs"},"./article/examples":{"types":"./article/examples/index.d.ts","default":"./fesm2022/daffodil-design-article-examples.mjs"},"./breadcrumb/examples":{"types":"./breadcrumb/examples/index.d.ts","default":"./fesm2022/daffodil-design-breadcrumb-examples.mjs"},"./button/examples":{"types":"./button/examples/index.d.ts","default":"./fesm2022/daffodil-design-button-examples.mjs"},"./callout/examples":{"types":"./callout/examples/index.d.ts","default":"./fesm2022/daffodil-design-callout-examples.mjs"},"./card/examples":{"types":"./card/examples/index.d.ts","default":"./fesm2022/daffodil-design-card-examples.mjs"},"./checkbox/examples":{"types":"./checkbox/examples/index.d.ts","default":"./fesm2022/daffodil-design-checkbox-examples.mjs"},"./container/examples":{"types":"./container/examples/index.d.ts","default":"./fesm2022/daffodil-design-container-examples.mjs"},"./hero/examples":{"types":"./hero/examples/index.d.ts","default":"./fesm2022/daffodil-design-hero-examples.mjs"},"./image/examples":{"types":"./image/examples/index.d.ts","default":"./fesm2022/daffodil-design-image-examples.mjs"},"./input/examples":{"types":"./input/examples/index.d.ts","default":"./fesm2022/daffodil-design-input-examples.mjs"},"./list/examples":{"types":"./list/examples/index.d.ts","default":"./fesm2022/daffodil-design-list-examples.mjs"},"./loading-icon/examples":{"types":"./loading-icon/examples/index.d.ts","default":"./fesm2022/daffodil-design-loading-icon-examples.mjs"},"./media-gallery/examples":{"types":"./media-gallery/examples/index.d.ts","default":"./fesm2022/daffodil-design-media-gallery-examples.mjs"},"./menu/examples":{"types":"./menu/examples/index.d.ts","default":"./fesm2022/daffodil-design-menu-examples.mjs"},"./modal/examples":{"types":"./modal/examples/index.d.ts","default":"./fesm2022/daffodil-design-modal-examples.mjs"},"./navbar/examples":{"types":"./navbar/examples/index.d.ts","default":"./fesm2022/daffodil-design-navbar-examples.mjs"},"./notification/examples":{"types":"./notification/examples/index.d.ts","default":"./fesm2022/daffodil-design-notification-examples.mjs"},"./paginator/examples":{"types":"./paginator/examples/index.d.ts","default":"./fesm2022/daffodil-design-paginator-examples.mjs"},"./progress-bar/examples":{"types":"./progress-bar/examples/index.d.ts","default":"./fesm2022/daffodil-design-progress-bar-examples.mjs"},"./quantity-field/examples":{"types":"./quantity-field/examples/index.d.ts","default":"./fesm2022/daffodil-design-quantity-field-examples.mjs"},"./radio/examples":{"types":"./radio/examples/index.d.ts","default":"./fesm2022/daffodil-design-radio-examples.mjs"},"./sidebar/examples":{"types":"./sidebar/examples/index.d.ts","default":"./fesm2022/daffodil-design-sidebar-examples.mjs"},"./switch/examples":{"types":"./switch/examples/index.d.ts","default":"./fesm2022/daffodil-design-switch-examples.mjs"},"./tabs/examples":{"types":"./tabs/examples/index.d.ts","default":"./fesm2022/daffodil-design-tabs-examples.mjs"},"./text-snippet/examples":{"types":"./text-snippet/examples/index.d.ts","default":"./fesm2022/daffodil-design-text-snippet-examples.mjs"},"./toast/examples":{"types":"./toast/examples/index.d.ts","default":"./fesm2022/daffodil-design-toast-examples.mjs"},"./tree/examples":{"types":"./tree/examples/index.d.ts","default":"./fesm2022/daffodil-design-tree-examples.mjs"}},"module":"fesm2022/daffodil-design.mjs","typings":"index.d.ts","sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
1
+ {"name":"@daffodil/design","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/design"]}}},"version":"0.86.0","author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","description":"A consistent, sane api driver that works with different ecommerce systems.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"peerDependencies":{"@angular/animations":"^19.0.0","@angular/common":"^19.0.0","@angular/core":"^19.0.0","@angular/forms":"^19.0.0","@angular/cdk":"^19.0.0","@daffodil/core":"0.86.0","@fortawesome/angular-fontawesome":"^1.0.0","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","modern-normalize":"^3.0.1","rxjs":"7.8.1"},"optionalDependencies":{"@faker-js/faker":"^9.8.0"},"exports":{"./scss/global":{"sass":"./scss/global.scss"},"./scss/theme":{"sass":"./scss/theme.scss"},"./scss/utilities":{"sass":"./scss/utilities.scss"},"./scss/typography":{"sass":"./scss/typography/_index.scss"},"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-design.mjs"},"./accordion":{"types":"./accordion/index.d.ts","default":"./fesm2022/daffodil-design-accordion.mjs"},"./article":{"types":"./article/index.d.ts","default":"./fesm2022/daffodil-design-article.mjs"},"./breadcrumb":{"types":"./breadcrumb/index.d.ts","default":"./fesm2022/daffodil-design-breadcrumb.mjs"},"./button":{"types":"./button/index.d.ts","default":"./fesm2022/daffodil-design-button.mjs"},"./callout":{"types":"./callout/index.d.ts","default":"./fesm2022/daffodil-design-callout.mjs"},"./card":{"types":"./card/index.d.ts","default":"./fesm2022/daffodil-design-card.mjs"},"./container":{"types":"./container/index.d.ts","default":"./fesm2022/daffodil-design-container.mjs"},"./hero":{"types":"./hero/index.d.ts","default":"./fesm2022/daffodil-design-hero.mjs"},"./image":{"types":"./image/index.d.ts","default":"./fesm2022/daffodil-design-image.mjs"},"./input":{"types":"./input/index.d.ts","default":"./fesm2022/daffodil-design-input.mjs"},"./link-set":{"types":"./link-set/index.d.ts","default":"./fesm2022/daffodil-design-link-set.mjs"},"./list":{"types":"./list/index.d.ts","default":"./fesm2022/daffodil-design-list.mjs"},"./loading-icon":{"types":"./loading-icon/index.d.ts","default":"./fesm2022/daffodil-design-loading-icon.mjs"},"./media-gallery":{"types":"./media-gallery/index.d.ts","default":"./fesm2022/daffodil-design-media-gallery.mjs"},"./menu":{"types":"./menu/index.d.ts","default":"./fesm2022/daffodil-design-menu.mjs"},"./modal":{"types":"./modal/index.d.ts","default":"./fesm2022/daffodil-design-modal.mjs"},"./navbar":{"types":"./navbar/index.d.ts","default":"./fesm2022/daffodil-design-navbar.mjs"},"./notification":{"types":"./notification/index.d.ts","default":"./fesm2022/daffodil-design-notification.mjs"},"./paginator":{"types":"./paginator/index.d.ts","default":"./fesm2022/daffodil-design-paginator.mjs"},"./progress-bar":{"types":"./progress-bar/index.d.ts","default":"./fesm2022/daffodil-design-progress-bar.mjs"},"./quantity-field":{"types":"./quantity-field/index.d.ts","default":"./fesm2022/daffodil-design-quantity-field.mjs"},"./sidebar":{"types":"./sidebar/index.d.ts","default":"./fesm2022/daffodil-design-sidebar.mjs"},"./switch":{"types":"./switch/index.d.ts","default":"./fesm2022/daffodil-design-switch.mjs"},"./tabs":{"types":"./tabs/index.d.ts","default":"./fesm2022/daffodil-design-tabs.mjs"},"./text-snippet":{"types":"./text-snippet/index.d.ts","default":"./fesm2022/daffodil-design-text-snippet.mjs"},"./toast":{"types":"./toast/index.d.ts","default":"./fesm2022/daffodil-design-toast.mjs"},"./tree":{"types":"./tree/index.d.ts","default":"./fesm2022/daffodil-design-tree.mjs"},"./youtube-player":{"types":"./youtube-player/index.d.ts","default":"./fesm2022/daffodil-design-youtube-player.mjs"},"./accordion/examples":{"types":"./accordion/examples/index.d.ts","default":"./fesm2022/daffodil-design-accordion-examples.mjs"},"./article/examples":{"types":"./article/examples/index.d.ts","default":"./fesm2022/daffodil-design-article-examples.mjs"},"./breadcrumb/examples":{"types":"./breadcrumb/examples/index.d.ts","default":"./fesm2022/daffodil-design-breadcrumb-examples.mjs"},"./button/examples":{"types":"./button/examples/index.d.ts","default":"./fesm2022/daffodil-design-button-examples.mjs"},"./callout/examples":{"types":"./callout/examples/index.d.ts","default":"./fesm2022/daffodil-design-callout-examples.mjs"},"./card/examples":{"types":"./card/examples/index.d.ts","default":"./fesm2022/daffodil-design-card-examples.mjs"},"./checkbox/examples":{"types":"./checkbox/examples/index.d.ts","default":"./fesm2022/daffodil-design-checkbox-examples.mjs"},"./container/examples":{"types":"./container/examples/index.d.ts","default":"./fesm2022/daffodil-design-container-examples.mjs"},"./hero/examples":{"types":"./hero/examples/index.d.ts","default":"./fesm2022/daffodil-design-hero-examples.mjs"},"./image/examples":{"types":"./image/examples/index.d.ts","default":"./fesm2022/daffodil-design-image-examples.mjs"},"./input/examples":{"types":"./input/examples/index.d.ts","default":"./fesm2022/daffodil-design-input-examples.mjs"},"./list/examples":{"types":"./list/examples/index.d.ts","default":"./fesm2022/daffodil-design-list-examples.mjs"},"./loading-icon/examples":{"types":"./loading-icon/examples/index.d.ts","default":"./fesm2022/daffodil-design-loading-icon-examples.mjs"},"./media-gallery/examples":{"types":"./media-gallery/examples/index.d.ts","default":"./fesm2022/daffodil-design-media-gallery-examples.mjs"},"./menu/examples":{"types":"./menu/examples/index.d.ts","default":"./fesm2022/daffodil-design-menu-examples.mjs"},"./modal/examples":{"types":"./modal/examples/index.d.ts","default":"./fesm2022/daffodil-design-modal-examples.mjs"},"./navbar/examples":{"types":"./navbar/examples/index.d.ts","default":"./fesm2022/daffodil-design-navbar-examples.mjs"},"./notification/examples":{"types":"./notification/examples/index.d.ts","default":"./fesm2022/daffodil-design-notification-examples.mjs"},"./paginator/examples":{"types":"./paginator/examples/index.d.ts","default":"./fesm2022/daffodil-design-paginator-examples.mjs"},"./progress-bar/examples":{"types":"./progress-bar/examples/index.d.ts","default":"./fesm2022/daffodil-design-progress-bar-examples.mjs"},"./quantity-field/examples":{"types":"./quantity-field/examples/index.d.ts","default":"./fesm2022/daffodil-design-quantity-field-examples.mjs"},"./radio/examples":{"types":"./radio/examples/index.d.ts","default":"./fesm2022/daffodil-design-radio-examples.mjs"},"./sidebar/examples":{"types":"./sidebar/examples/index.d.ts","default":"./fesm2022/daffodil-design-sidebar-examples.mjs"},"./switch/examples":{"types":"./switch/examples/index.d.ts","default":"./fesm2022/daffodil-design-switch-examples.mjs"},"./tabs/examples":{"types":"./tabs/examples/index.d.ts","default":"./fesm2022/daffodil-design-tabs-examples.mjs"},"./text-snippet/examples":{"types":"./text-snippet/examples/index.d.ts","default":"./fesm2022/daffodil-design-text-snippet-examples.mjs"},"./toast/examples":{"types":"./toast/examples/index.d.ts","default":"./fesm2022/daffodil-design-toast-examples.mjs"},"./tree/examples":{"types":"./tree/examples/index.d.ts","default":"./fesm2022/daffodil-design-tree-examples.mjs"}},"module":"fesm2022/daffodil-design.mjs","typings":"index.d.ts","sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
@@ -22,9 +22,12 @@
22
22
  }
23
23
  }
24
24
 
25
- @mixin skeleton-screen($width, $height) {
25
+ @mixin skeleton-screen($width, $height, $border-radius: 0) {
26
26
  display: flex;
27
27
  position: relative;
28
+ height: $height;
29
+ width: $width;
30
+ border-radius: $border-radius;
28
31
 
29
32
  &::before {
30
33
  animation-name: loading;
@@ -10,9 +10,9 @@
10
10
  // See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
11
11
 
12
12
  @function daff-luminance($color) {
13
- $red-index: color.red($color) + 1;
14
- $green-index: color.green($color) + 1;
15
- $blue-index: color.blue($color) + 1;
13
+ $red-index: color.channel($color, 'red') + 1;
14
+ $green-index: color.channel($color, 'green') + 1;
15
+ $blue-index: color.channel($color, 'blue') + 1;
16
16
 
17
17
  $red: list.nth(v.$linear-channel-values, $red-index);
18
18
  $green: list.nth(v.$linear-channel-values, $green-index);
@@ -29,7 +29,10 @@
29
29
  .daff-form-field__control {
30
30
  border: 1px solid daff-color($primary);
31
31
  }
32
- .daff-form-label {
32
+
33
+ .daff-form-label,
34
+ label,
35
+ .daff-form-field__label {
33
36
  color: daff-color($primary);
34
37
  }
35
38
  }
@@ -39,7 +42,9 @@
39
42
  border: 1px solid daff-color($critical);
40
43
  }
41
44
 
42
- .daff-form-label {
45
+ .daff-form-label,
46
+ label,
47
+ .daff-form-field__label {
43
48
  color: daff-color($critical);
44
49
  }
45
50
  }
package/toast/README.md CHANGED
@@ -8,7 +8,7 @@ Toasts should be used to display temporary messages about actions or events that
8
8
  <design-land-example-viewer-container example="default-toast"></design-land-example-viewer-container>
9
9
 
10
10
  ## Setting up the component
11
- `provideDaffToast()` must be added as a provider in your application's root component for global use or in a specific feature component for the toast functionality to work properly.
11
+ `provideDaffToast()` must be added as a provider in your application's root component for the toast to work properly.
12
12
 
13
13
  ```ts
14
14
  import { provideDaffToast } from '@daffodil/design/toast';
@@ -47,6 +47,26 @@ You can set the status of a toast when opening it with `DaffToastService`, using
47
47
 
48
48
  <design-land-example-viewer-container example="toast-status"></design-land-example-viewer-container>
49
49
 
50
+ ## Positions
51
+ Toasts are displayed in the top-right corner of the screen by default on desktop devices.
52
+
53
+ You can customize the position of toast notifications by configuring the `position` property in the `provideDaffToast` provider.
54
+
55
+ To customize toast positions, configure the `position` property in the `provideDaffToast` provider of your root component:
56
+
57
+ ```ts
58
+ providers: [
59
+ provideDaffToast({
60
+ position: {
61
+ vertical: 'bottom',
62
+ horizontal: 'right',
63
+ },
64
+ }),
65
+ ],
66
+ ```
67
+
68
+ > Note: On mobile devices, toasts will always appear in the bottom-center position, regardless of configuration settings.
69
+
50
70
  ## Accessibility
51
71
  By default, toasts use a `role="status"` to announce messages. It's the equivalent of `aria-live="polite"`, which does not interrupt a user's current activity and waits until they are idle to make the announcement.
52
72
 
@@ -1,6 +1,5 @@
1
1
  import { DefaultToastComponent } from './default-toast/default-toast.component';
2
2
  import { DismissibleToastComponent } from './dismissible-toast/dismissible-toast.component';
3
- import { ToastPositionsComponent } from './toast-positions/toast-positions.component';
4
3
  import { ToastStatusComponent } from './toast-status/toast-status.component';
5
4
  import { ToastWithCustomDurationComponent } from './toast-with-custom-duration/toast-with-custom-duration.component';
6
- export declare const TOAST_EXAMPLES: (typeof DefaultToastComponent | typeof DismissibleToastComponent | typeof ToastPositionsComponent | typeof ToastStatusComponent | typeof ToastWithCustomDurationComponent)[];
5
+ export declare const TOAST_EXAMPLES: (typeof DefaultToastComponent | typeof DismissibleToastComponent | typeof ToastStatusComponent | typeof ToastWithCustomDurationComponent)[];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The available vertical positions for toasts.
3
+ */
4
+ export type DaffToastVerticalPosition = 'top' | 'bottom';
5
+ /**
6
+ * The available horizontal positions for toasts.
7
+ */
8
+ export type DaffToastHorizontalPosition = 'left' | 'center' | 'right';
@@ -0,0 +1,19 @@
1
+ import { DaffToastHorizontalPosition, DaffToastVerticalPosition } from '../helpers/toast-position';
2
+ export interface DaffToastVerticalPositionInterface {
3
+ vertical: DaffToastVerticalPosition;
4
+ }
5
+ export interface DaffToastHorizontalPositionInterface {
6
+ horizontal: DaffToastHorizontalPosition;
7
+ }
8
+ export type DaffToastPosition = DaffToastVerticalPositionInterface & DaffToastHorizontalPositionInterface;
9
+ export interface DaffToastOptions {
10
+ /**
11
+ * The position of all toasts.
12
+ */
13
+ position: DaffToastPosition;
14
+ /** @docs-private */
15
+ useParent?: boolean;
16
+ }
17
+ export declare const daffToastDefaultOptions: DaffToastOptions;
18
+ export declare const provideDaffToastOptions: <R extends DaffToastOptions = DaffToastOptions>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
19
+ export declare const DAFF_TOAST_OPTIONS: import("@angular/core").InjectionToken<DaffToastOptions>;
@@ -22,5 +22,5 @@ export interface DaffToast extends DaffToastData {
22
22
  /**
23
23
  * The observable that emits when the toast is closed.
24
24
  */
25
- dismissalStream: Observable<void | number>;
25
+ dismissalStream: Observable<void>;
26
26
  }
@@ -1,8 +1,8 @@
1
- export { DaffToastPositionService } from './service/position.service';
2
1
  export { DaffToastService } from './service/toast.service';
3
2
  export { DaffToastConfiguration } from './toast/toast-config';
4
3
  export { DaffToast, DaffToastData, } from './interfaces/toast';
5
4
  export { DaffToastAction } from './interfaces/toast-action';
6
- export { DAFF_TOAST_OPTIONS, provideDaffToastOptions, } from './options/daff-toast-options';
7
5
  export { provideDaffToast } from './toast/toast-provider';
8
6
  export { DaffToastActionButtonSize, DaffToastActionButtonType, } from './interfaces/toast-action.type';
7
+ export { DaffToastOptions, DaffToastPosition, } from './interfaces/toast-options';
8
+ export { DaffToastVerticalPosition, DaffToastHorizontalPosition, } from './helpers/toast-position';
@@ -1,3 +1,3 @@
1
1
  import { PositionStrategy } from '@angular/cdk/overlay';
2
- import { DaffToastPosition } from '../options/daff-toast-options';
2
+ import { DaffToastPosition } from '../interfaces/toast-options';
3
3
  export declare const createPositionStrategy: (position: DaffToastPosition) => PositionStrategy;
@@ -1,5 +1,5 @@
1
1
  import { BreakpointObserver } from '@angular/cdk/layout';
2
- import { DaffToastOptions, DaffToastPosition } from '../options/daff-toast-options';
2
+ import { DaffToastOptions, DaffToastPosition } from '../interfaces/toast-options';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class DaffToastPositionService {
5
5
  private options;
@@ -4,7 +4,7 @@ import { Injector, OnDestroy } from '@angular/core';
4
4
  import { DaffFocusStackService } from '@daffodil/design';
5
5
  import { DaffToastPositionService } from './position.service';
6
6
  import { DaffToast, DaffToastData } from '../interfaces/toast';
7
- import { DaffToastOptions } from '../options/daff-toast-options';
7
+ import { DaffToastOptions } from '../interfaces/toast-options';
8
8
  import { DaffToastConfiguration } from '../toast/toast-config';
9
9
  import * as i0 from "@angular/core";
10
10
  /**
@@ -1,6 +1,7 @@
1
1
  import { Provider } from '@angular/core';
2
+ import { DaffToastOptions } from '../interfaces/toast-options';
2
3
  /**
3
- * Registers the `DaffToastService` and `DaffToastPositionService` for displaying a toast. This provider ensures
4
+ * Registers the `DaffToastService` for displaying a toast. This provider ensures
4
5
  * toasts function correctly within your application.
5
6
  *
6
7
  * ```ts
@@ -8,11 +9,22 @@ import { Provider } from '@angular/core';
8
9
  *
9
10
  * @NgModule({
10
11
  * providers: [
11
- * provideDaffToast(),
12
- * ]
12
+ * provideDaffToast({
13
+ * position: {
14
+ * vertical: 'bottom',
15
+ * horizontal: 'left',
16
+ * },
17
+ * }),
18
+ * ]
13
19
  * )}
14
20
  *
15
21
  * export class AppModule {}
16
22
  * ```
23
+ * @param config Sets the configuration for all toasts.
24
+ * Toasts are displayed in the top-right corner of the screen by default on desktop devices.
25
+ *
26
+ * On mobile devices, toasts will always appear in the bottom-center position,
27
+ * regardless of configuration settings.
28
+ *
17
29
  */
18
- export declare const provideDaffToast: () => Provider[];
30
+ export declare const provideDaffToast: (config?: DaffToastOptions) => Provider[];
@@ -1,6 +1,6 @@
1
1
  import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
2
  import { DaffToast } from '../interfaces/toast';
3
- import { DaffToastOptions } from '../options/daff-toast-options';
3
+ import { DaffToastOptions } from '../interfaces/toast-options';
4
4
  import { DaffToastPositionService } from '../service/position.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class DaffToastTemplateComponent {
@@ -1,6 +0,0 @@
1
- /**
2
- * An interface for giving a component the ability to display a skeleton/loading UI.
3
- */
4
- export interface DaffSkeletonable {
5
- skeleton: boolean;
6
- }
@@ -1,20 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { FormControl } from '@angular/forms';
3
- import { DaffToastService, DaffToastPositionService } from '@daffodil/design/toast';
4
- import * as i0 from "@angular/core";
5
- export declare class ToastPositionsComponent implements OnInit {
6
- private toastService;
7
- private toastPositionService;
8
- private toast;
9
- constructor(toastService: DaffToastService, toastPositionService: DaffToastPositionService);
10
- open(): void;
11
- private count;
12
- horizontalControl: FormControl;
13
- verticalControl: FormControl;
14
- /**
15
- * @docs-private
16
- */
17
- ngOnInit(): void;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<ToastPositionsComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<ToastPositionsComponent, "toast-positions", never, {}, {}, never, never, true, never>;
20
- }
@@ -1,14 +0,0 @@
1
- export interface VerticalPositionTypes {
2
- vertical: 'top' | 'bottom';
3
- }
4
- export interface HorizontalPositionTypes {
5
- horizontal: 'left' | 'center' | 'right';
6
- }
7
- export type DaffToastPosition = VerticalPositionTypes & HorizontalPositionTypes;
8
- export interface DaffToastOptions {
9
- position: DaffToastPosition;
10
- useParent: boolean;
11
- }
12
- export declare const daffToastDefaultOptions: DaffToastOptions;
13
- export declare const provideDaffToastOptions: <R extends DaffToastOptions = DaffToastOptions>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
14
- export declare const DAFF_TOAST_OPTIONS: import("@angular/core").InjectionToken<DaffToastOptions>;