@daffodil/design 0.82.0 → 0.84.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 (176) hide show
  1. package/accordion/src/accordion-theme.scss +28 -6
  2. package/article/src/article-theme.scss +118 -64
  3. package/atoms/form/checkbox/cva/checkbox-cva.directive.d.ts +3 -0
  4. package/atoms/form/error-message/error-message.component.d.ts +4 -1
  5. package/atoms/form/error-message/error-message.module.d.ts +4 -1
  6. package/atoms/form/form-field/form-field/form-field.component.d.ts +23 -29
  7. package/atoms/form/form-field/form-field-control.d.ts +18 -4
  8. package/atoms/form/form-field/form-field-state.d.ts +7 -0
  9. package/atoms/form/form-field/form-field.d.ts +10 -0
  10. package/atoms/form/form-field/form-field.module.d.ts +6 -4
  11. package/atoms/form/form-field/public_api.d.ts +2 -1
  12. package/atoms/form/form-label/form-label.directive.d.ts +4 -1
  13. package/atoms/form/form-label/form-label.module.d.ts +4 -1
  14. package/atoms/form/hint/hint.component.d.ts +9 -0
  15. package/atoms/form/hint/public_api.d.ts +1 -0
  16. package/atoms/form/input/input.component.d.ts +15 -19
  17. package/atoms/form/input/input.module.d.ts +4 -2
  18. package/atoms/form/native-select/native-select.component.d.ts +5 -1
  19. package/atoms/form/quantity-field/quantity-field.component.d.ts +2 -1
  20. package/atoms/form/quantity-field/quantity-field.module.d.ts +3 -3
  21. package/atoms/form/quantity-field/quantity-input/quantity-input.component.d.ts +3 -0
  22. package/atoms/form/radio/cva/radio-cva.directive.d.ts +3 -0
  23. package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +3 -0
  24. package/breadcrumb/src/breadcrumb-theme.scss +12 -3
  25. package/button/button/button-base.directive.d.ts +6 -23
  26. package/button/src/button/basic/button-theme.scss +17 -40
  27. package/button/src/button/button-base.scss +32 -5
  28. package/button/src/button/flat/flat-theme.scss +4 -38
  29. package/button/src/button/icon/icon-theme.scss +157 -79
  30. package/button/src/button/raised/raised-theme.scss +2 -2
  31. package/button/src/button/stroked/stroked-theme.scss +7 -39
  32. package/button/src/button/underline/underline-theme.scss +4 -18
  33. package/callout/src/callout-theme.scss +27 -10
  34. package/card/card/basic/basic.component.d.ts +3 -0
  35. package/card/card/raised/raised.component.d.ts +3 -0
  36. package/card/card/stroked/stroked.component.d.ts +3 -0
  37. package/card/examples/card-theming/card-theming.component.d.ts +2 -1
  38. package/card/examples/public_api.d.ts +1 -1
  39. package/card/src/card/stroked/stroked-theme.scss +102 -13
  40. package/card/src/card-base-theme.scss +126 -55
  41. package/checkbox/examples/basic-checkbox/basic-checkbox.component.d.ts +3 -0
  42. package/checkbox/examples/checkbox-set/checkbox-set.component.d.ts +3 -0
  43. package/core/article-encapsulated/article-encapsulated.directive.d.ts +3 -0
  44. package/core/colorable/colorable.directive.d.ts +8 -0
  45. package/core/manage-container-layout/manage-container-layout.directive.d.ts +3 -0
  46. package/core/openable/openable.directive.d.ts +3 -0
  47. package/core/prefix-suffix/prefix-suffix.module.d.ts +1 -1
  48. package/core/prefix-suffix/prefix.directive.d.ts +4 -1
  49. package/core/prefix-suffix/public_api.d.ts +0 -4
  50. package/core/prefix-suffix/suffix.directive.d.ts +4 -1
  51. package/core/sizable/sizable.directive.d.ts +8 -0
  52. package/core/statusable/statusable.directive.d.ts +2 -0
  53. package/core/text-alignable/text-alignable.directive.d.ts +6 -1
  54. package/fesm2022/daffodil-design-accordion.mjs +2 -2
  55. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-breadcrumb.mjs +5 -2
  57. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-button-examples.mjs +21 -17
  59. package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-button.mjs +25 -32
  61. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-card-examples.mjs +14 -12
  63. package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-card.mjs +9 -0
  65. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-checkbox-examples.mjs +6 -0
  67. package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-image.mjs +2 -2
  69. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-input-examples.mjs +45 -22
  71. package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-media-gallery.mjs +57 -18
  73. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-menu.mjs +23 -10
  75. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  76. package/fesm2022/daffodil-design-modal.mjs +33 -0
  77. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-navbar.mjs +2 -2
  79. package/fesm2022/daffodil-design-notification-examples.mjs +8 -12
  80. package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
  81. package/fesm2022/daffodil-design-notification.mjs +32 -5
  82. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  83. package/fesm2022/daffodil-design-paginator.mjs +2 -2
  84. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  85. package/fesm2022/daffodil-design-progress-bar-examples.mjs +2 -2
  86. package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
  87. package/fesm2022/daffodil-design-progress-bar.mjs +18 -3
  88. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  89. package/fesm2022/daffodil-design-quantity-field-examples.mjs +9 -9
  90. package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +1 -1
  91. package/fesm2022/daffodil-design-sidebar.mjs +3 -8
  92. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  93. package/fesm2022/daffodil-design-switch-examples.mjs +6 -6
  94. package/fesm2022/daffodil-design-switch-examples.mjs.map +1 -1
  95. package/fesm2022/daffodil-design-switch.mjs +35 -11
  96. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  97. package/fesm2022/daffodil-design-tabs.mjs +27 -8
  98. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  99. package/fesm2022/daffodil-design-toast-examples.mjs +6 -0
  100. package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
  101. package/fesm2022/daffodil-design-toast.mjs +17 -18
  102. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  103. package/fesm2022/daffodil-design-tree.mjs +21 -7
  104. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  105. package/fesm2022/daffodil-design-youtube-player.mjs +3 -0
  106. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  107. package/fesm2022/daffodil-design.mjs +301 -224
  108. package/fesm2022/daffodil-design.mjs.map +1 -1
  109. package/hero/src/hero-theme.scss +27 -10
  110. package/input/examples/examples.d.ts +2 -2
  111. package/input/examples/input-disabled/input-disabled.component.d.ts +2 -0
  112. package/input/examples/input-hint/input-hint.component.d.ts +5 -0
  113. package/input/examples/input-with-form-field/input-with-form-field.component.d.ts +2 -0
  114. package/list/list/list.component.d.ts +1 -1
  115. package/list/src/list-theme.scss +16 -20
  116. package/media-gallery/README.md +3 -3
  117. package/media-gallery/media-gallery/media-gallery.component.d.ts +21 -5
  118. package/media-gallery/public_api.d.ts +3 -3
  119. package/media-gallery/thumbnail/thumbnail.directive.d.ts +23 -6
  120. package/menu/menu/menu.component.d.ts +15 -0
  121. package/menu/menu-activator/menu-activator.component.d.ts +3 -0
  122. package/menu/src/menu-theme.scss +29 -10
  123. package/modal/modal/modal.component.d.ts +21 -0
  124. package/modal/modal-actions/modal-actions.component.d.ts +3 -0
  125. package/modal/modal-close/modal-close.directive.d.ts +3 -0
  126. package/modal/modal-content/modal-content.component.d.ts +3 -0
  127. package/modal/modal-title/modal-title.directive.d.ts +3 -0
  128. package/navbar/src/navbar-theme.scss +8 -3
  129. package/notification/README.md +11 -12
  130. package/notification/notification/notification.component.d.ts +17 -2
  131. package/notification/notification-actions/notification-actions.directive.d.ts +3 -0
  132. package/notification/notification-message/notification-message.directive.d.ts +3 -0
  133. package/notification/notification-subtitle/notification-subtitle.directive.d.ts +3 -0
  134. package/notification/notification-title/notification-title.directive.d.ts +3 -0
  135. package/notification/notification.d.ts +2 -2
  136. package/notification/src/notification-theme.scss +62 -23
  137. package/package.json +1 -1
  138. package/paginator/src/paginator-theme.scss +22 -17
  139. package/progress-bar/README.md +2 -4
  140. package/progress-bar/progress-bar-label/progress-bar-label.directive.d.ts +3 -0
  141. package/progress-bar/progress-bar.component.d.ts +15 -3
  142. package/progress-bar/src/progress-bar-theme.scss +17 -8
  143. package/public_api.d.ts +1 -0
  144. package/scss/state/skeleton/_mixins.scss +19 -9
  145. package/scss/theme.scss +2 -0
  146. package/sidebar/public_api.d.ts +10 -11
  147. package/sidebar/sidebar.d.ts +1 -2
  148. package/sidebar/sidebar.module.d.ts +1 -2
  149. package/src/atoms/form/error-message/error-message-theme.scss +4 -1
  150. package/src/atoms/form/form-field/form-field/form-field-theme.scss +22 -10
  151. package/src/atoms/form/hint/hint-theme.scss +17 -0
  152. package/src/atoms/form/input/input-theme.scss +1 -5
  153. package/switch/src/switch-theme.scss +29 -10
  154. package/switch/switch/switch.component.d.ts +31 -6
  155. package/switch/switch.d.ts +2 -2
  156. package/tabs/src/tabs-theme.scss +31 -13
  157. package/tabs/tabs/tab-activator/tab-activator.component.d.ts +15 -0
  158. package/tabs/tabs/tab-label/tab-label.component.d.ts +2 -5
  159. package/tabs/tabs/tabs.component.d.ts +3 -0
  160. package/toast/examples/default-toast/default-toast.component.d.ts +3 -0
  161. package/toast/examples/toast-positions/toast-positions.component.d.ts +3 -0
  162. package/toast/src/toast-theme.scss +80 -33
  163. package/toast/toast/toast-template.component.d.ts +3 -1
  164. package/toast/toast/toast.component.d.ts +3 -5
  165. package/tree/interfaces/tree-data.d.ts +15 -0
  166. package/tree/interfaces/tree-render-mode.d.ts +2 -2
  167. package/tree/src/tree-theme.scss +39 -13
  168. package/tree/tree/tree-notifier.service.d.ts +3 -3
  169. package/tree/tree/tree.component.d.ts +13 -3
  170. package/tree/tree-item/tree-item.directive.d.ts +6 -0
  171. package/youtube-player/youtube-player.component.d.ts +3 -0
  172. package/core/prefix-suffix/prefixable/prefixable-interface.d.ts +0 -7
  173. package/core/prefix-suffix/prefixable/prefixable.d.ts +0 -11
  174. package/core/prefix-suffix/suffixable/suffixable-interface.d.ts +0 -7
  175. package/core/prefix-suffix/suffixable/suffixable.d.ts +0 -11
  176. package/input/examples/basic-input/basic-input.component.d.ts +0 -5
@@ -4,12 +4,9 @@ import * as i0 from "@angular/core";
4
4
  /**
5
5
  * The switch component provides a way to toggle between two settings.
6
6
  *
7
- * @example
8
- *
9
7
  * ```html
10
- * <daff-switch [checked]="checked" loading="loading" [error]="true" [labelPosition]="top">
11
- * Label
12
- * <daff-error-message>Error message</daff-error-message>
8
+ * <daff-switch>
9
+ * Label
13
10
  * </daff-switch>
14
11
  * ```
15
12
  */
@@ -19,8 +16,17 @@ export declare class DaffSwitchComponent {
19
16
  */
20
17
  get disabled(): any;
21
18
  set disabled(value: any);
19
+ /**
20
+ * @docs-private
21
+ */
22
22
  get disabledAttribute(): boolean;
23
+ /**
24
+ * @docs-private
25
+ */
23
26
  get ariaDisabled(): boolean;
27
+ /**
28
+ * @docs-private
29
+ */
24
30
  get classes(): string;
25
31
  /**
26
32
  * Whether the switch is loading.
@@ -31,13 +37,16 @@ export declare class DaffSwitchComponent {
31
37
  */
32
38
  checked: boolean;
33
39
  /**
34
- * The position of the label relative to the switch. Defaults to 'daff-left'.
40
+ * The position of the label relative to the switch.
35
41
  */
36
42
  labelPosition: DaffLabelPosition;
37
43
  /**
38
44
  * Whether the switch shows an error.
39
45
  */
40
46
  error: boolean;
47
+ /**
48
+ * @docs-private
49
+ */
41
50
  _disabled: boolean;
42
51
  handleKeydown(event: KeyboardEvent): void;
43
52
  /**
@@ -48,8 +57,24 @@ export declare class DaffSwitchComponent {
48
57
  * aria-label for the switch.
49
58
  */
50
59
  ariaLabel: string;
60
+ /**
61
+ * A unique id for the switch.
62
+ *
63
+ * The `id` is automatically generated by linking the prefix 'daff-switch-' with an incrementing number. This value can be customized by passing a different `id` value via the component's `id` input.
64
+ *
65
+ * @example Using the `id` property
66
+ * ```html
67
+ * <daff-switch [id]="'custom-id'"></daff-switch>
68
+ * ```
69
+ */
51
70
  id: string;
71
+ /**
72
+ * Output event triggered when the switch has been toggled.
73
+ */
52
74
  toggled: EventEmitter<boolean>;
75
+ /**
76
+ * @docs-private
77
+ */
53
78
  onToggle(): void;
54
79
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffSwitchComponent, never>;
55
80
  static ɵcmp: i0.ɵɵComponentDeclaration<DaffSwitchComponent, "daff-switch", never, { "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "error": { "alias": "error"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "toggled": "toggled"; }, never, ["*", "daff-error-message"], true, never>;
@@ -1,6 +1,6 @@
1
- import { DaffErrorMessageModule } from '@daffodil/design';
1
+ import { DaffErrorMessageComponent } from '@daffodil/design';
2
2
  import { DaffSwitchComponent } from './switch/switch.component';
3
3
  /**
4
4
  * @docs-private
5
5
  */
6
- export declare const DAFF_SWITCH_COMPONENTS: readonly [typeof DaffSwitchComponent, typeof DaffErrorMessageModule];
6
+ export declare const DAFF_SWITCH_COMPONENTS: readonly [typeof DaffSwitchComponent, typeof DaffErrorMessageComponent];
@@ -4,27 +4,45 @@
4
4
 
5
5
  @mixin daff-tabs-theme($theme) {
6
6
  $primary: core.daff-map-get($theme, primary);
7
- $secondary: core.daff-map-get($theme, secondary);
8
- $tertiary: core.daff-map-get($theme, tertiary);
9
7
  $neutral: core.daff-map-get($theme, 'core', 'neutral');
10
- $base: core.daff-map-get($theme, 'core', 'base');
11
8
  $base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
12
- $white: core.daff-map-get($theme, 'core', 'white');
13
- $black: core.daff-map-get($theme, 'core', 'black');
9
+ $type: core.daff-map-get($theme, 'core', 'type');
14
10
 
15
- .daff-tabs {
16
- &__tab-list {
17
- &::after {
18
- background: theming.daff-illuminate($base, $neutral, 2);
11
+ @include theming.light($type) {
12
+ .daff-tabs {
13
+ &__tab-list {
14
+ &::after {
15
+ background: theming.daff-color($neutral, 20);
16
+ }
17
+ }
18
+ }
19
+
20
+ .daff-tab-activator {
21
+ border-bottom: 2px solid theming.daff-color($neutral, 20);
22
+ color: $base-contrast;
23
+
24
+ &.daff-selected {
25
+ border-bottom: 2px solid theming.daff-color($primary);
19
26
  }
20
27
  }
21
28
  }
22
29
 
23
- .daff-tab-activator {
24
- border-bottom: 2px solid theming.daff-illuminate($base, $neutral, 2);
30
+ @include theming.dark($type) {
31
+ .daff-tabs {
32
+ &__tab-list {
33
+ &::after {
34
+ background: theming.daff-color($neutral, 80);
35
+ }
36
+ }
37
+ }
25
38
 
26
- &.daff-selected {
27
- border-bottom: 2px solid theming.daff-color($primary);
39
+ .daff-tab-activator {
40
+ border-bottom: 2px solid theming.daff-color($neutral, 80);
41
+ color: $base-contrast;
42
+
43
+ &.daff-selected {
44
+ border-bottom: 2px solid theming.daff-color($primary);
45
+ }
28
46
  }
29
47
  }
30
48
  }
@@ -12,15 +12,27 @@ export declare class DaffTabActivatorComponent implements OnInit {
12
12
  /**
13
13
  * Sets the `role` to tab.
14
14
  */
15
+ /**
16
+ * @docs-private
17
+ */
15
18
  role: string;
16
19
  /**
17
20
  * Sets `aria-selected` to true if the component is selected and false if it's not selected.
18
21
  */
22
+ /**
23
+ * @docs-private
24
+ */
19
25
  get ariaSelected(): boolean;
20
26
  /**
21
27
  * Sets `tabindex` to `0` if the component is selected and `-1` if it's not selected.
22
28
  */
29
+ /**
30
+ * @docs-private
31
+ */
23
32
  get tabIndex(): "0" | "-1";
33
+ /**
34
+ * @docs-private
35
+ */
24
36
  ariaControls: string;
25
37
  constructor(el: ElementRef, selectableDirective: DaffSelectableDirective);
26
38
  /**
@@ -28,6 +40,9 @@ export declare class DaffTabActivatorComponent implements OnInit {
28
40
  */
29
41
  tabActivatorId: string;
30
42
  panelId: string;
43
+ /**
44
+ * @docs-private
45
+ */
31
46
  ngOnInit(): void;
32
47
  /**
33
48
  * Sets focus to the native element of the component
@@ -1,4 +1,4 @@
1
- import { DaffPrefixDirective, DaffSuffixDirective, DaffPrefixable, DaffSuffixable } from '@daffodil/design';
1
+ import { DaffPrefixDirective, DaffSuffixDirective } from '@daffodil/design';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * DaffTabLabelComponent is used to display the label of a tab panel. Labels may optionally contain a `daffPrefix` or `daffSuffix` to add icons or badges.
@@ -12,10 +12,7 @@ import * as i0 from "@angular/core";
12
12
  * </daff-tab-Label>
13
13
  * ```
14
14
  */
15
- export declare class DaffTabLabelComponent implements DaffPrefixable, DaffSuffixable {
16
- /**
17
- * @docs-private
18
- */
15
+ export declare class DaffTabLabelComponent {
19
16
  _prefix: DaffPrefixDirective;
20
17
  /**
21
18
  * @docs-private
@@ -52,6 +52,9 @@ export declare class DaffTabsComponent implements AfterContentInit, OnInit {
52
52
  /**
53
53
  * aria-label for the tab.
54
54
  */
55
+ /**
56
+ * @docs-private
57
+ */
55
58
  private externalAriaLabel;
56
59
  /**
57
60
  * @docs-private
@@ -8,6 +8,9 @@ export declare class DefaultToastComponent implements OnInit {
8
8
  update: EventEmitter<DaffToastAction>;
9
9
  closeToast: EventEmitter<DaffToastAction>;
10
10
  open(): void;
11
+ /**
12
+ * @docs-private
13
+ */
11
14
  ngOnInit(): void;
12
15
  private count;
13
16
  static ɵfac: i0.ɵɵFactoryDeclaration<DefaultToastComponent, never>;
@@ -11,6 +11,9 @@ export declare class ToastPositionsComponent implements OnInit {
11
11
  private count;
12
12
  horizontalControl: FormControl;
13
13
  verticalControl: FormControl;
14
+ /**
15
+ * @docs-private
16
+ */
14
17
  ngOnInit(): void;
15
18
  static ɵfac: i0.ɵɵFactoryDeclaration<ToastPositionsComponent, never>;
16
19
  static ɵcmp: i0.ɵɵComponentDeclaration<ToastPositionsComponent, "toast-positions", never, {}, {}, never, never, true, never>;
@@ -3,64 +3,111 @@
3
3
  @use '../../scss/theming';
4
4
 
5
5
  @mixin daff-toast-theme($theme) {
6
- $primary: core.daff-map-get($theme, primary);
7
- $secondary: core.daff-map-get($theme, secondary);
8
- $tertiary: core.daff-map-get($theme, tertiary);
9
6
  $info: core.daff-map-get($theme, informational);
10
7
  $warn: core.daff-map-get($theme, warn);
11
8
  $critical: core.daff-map-get($theme, critical);
12
9
  $success: core.daff-map-get($theme, success);
13
10
  $neutral: core.daff-map-get($theme, 'core', 'neutral');
14
11
  $base: core.daff-map-get($theme, 'core', 'base');
15
- $base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
16
- $white: core.daff-map-get($theme, 'core', 'white');
17
12
  $black: core.daff-map-get($theme, 'core', 'black');
13
+ $white: core.daff-map-get($theme, 'core', 'white');
14
+ $type: core.daff-map-get($theme, 'core', 'type');
18
15
 
19
16
  .daff-toast {
20
- background: theming.daff-illuminate($base, $neutral, 1);
21
- box-shadow: 0 -16px 24px -4px rgba($black, 0.04), 0 8px 24px -4px rgba($black, 0.1);
22
- color: theming.daff-text-contrast($base);
17
+ @include theming.light($type) {
18
+ background: theming.daff-color($neutral, 10);
19
+ box-shadow: 0 -16px 24px -4px rgba($black, 0.04),
20
+ 0 8px 24px -4px rgba($black, 0.1);
21
+ color: theming.daff-text-contrast($base);
23
22
 
24
- &::before {
25
- background: theming.daff-illuminate($base, $neutral, 4);
26
- }
23
+ &::before {
24
+ background: theming.daff-color($neutral, 40);
25
+ }
26
+
27
+ &.daff-success {
28
+ background: theming.daff-color($success, 10);
29
+ color: $black;
27
30
 
28
- &.daff-success {
29
- background: theming.daff-color($success, 10);
30
- color: $black;
31
+ .daff-prefix {
32
+ color: theming.daff-color($success);
33
+ }
31
34
 
32
- .daff-prefix {
33
- color: theming.daff-color($success);
35
+ &::before {
36
+ background: theming.daff-color($success);
37
+ }
34
38
  }
35
39
 
36
- &::before {
37
- background: theming.daff-color($success);
40
+ &.daff-warn {
41
+ background: theming.daff-color($warn, 10);
42
+ color: $black;
43
+
44
+ .daff-prefix {
45
+ color: theming.daff-color($warn);
46
+ }
47
+
48
+ &::before {
49
+ background: theming.daff-color($warn);
50
+ }
38
51
  }
39
- }
40
52
 
41
- &.daff-warn {
42
- background: theming.daff-color($warn, 10);
43
- color: $black;
53
+ &.daff-critical {
54
+ background: theming.daff-color($critical, 10);
55
+ color: $black;
56
+
57
+ .daff-prefix {
58
+ color: theming.daff-color($critical);
59
+ }
44
60
 
45
- .daff-prefix {
46
- color: theming.daff-color($warn);
61
+ &::before {
62
+ background: theming.daff-color($critical);
63
+ }
47
64
  }
65
+ }
66
+
67
+ @include theming.dark($type) {
68
+ background: theming.daff-color($neutral, 90);
69
+ box-shadow: 0 -16px 24px -4px rgba($black, 0.04),
70
+ 0 8px 24px -4px rgba($black, 0.1);
71
+ color: theming.daff-text-contrast($base);
48
72
 
49
73
  &::before {
50
- background: theming.daff-color($warn);
74
+ background: theming.daff-color($neutral, 30);
51
75
  }
52
- }
53
76
 
54
- &.daff-critical {
55
- background: theming.daff-color($critical, 10);
56
- color: $black;
77
+ &.daff-success {
78
+ background: theming.daff-color($success, 90);
57
79
 
58
- .daff-prefix {
59
- color: theming.daff-color($critical);
80
+ .daff-prefix {
81
+ color: theming.daff-color($success, 30);
82
+ }
83
+
84
+ &::before {
85
+ background: theming.daff-color($success, 30);
86
+ }
60
87
  }
61
88
 
62
- &::before {
63
- background: theming.daff-color($critical);
89
+ &.daff-warn {
90
+ background: theming.daff-color($warn, 90);
91
+
92
+ .daff-prefix {
93
+ color: theming.daff-color($warn, 30);
94
+ }
95
+
96
+ &::before {
97
+ background: theming.daff-color($warn, 30);
98
+ }
99
+ }
100
+
101
+ &.daff-critical {
102
+ background: theming.daff-color($critical, 90);
103
+
104
+ .daff-prefix {
105
+ color: theming.daff-color($critical, 30);
106
+ }
107
+
108
+ &::before {
109
+ background: theming.daff-color($critical, 30);
110
+ }
64
111
  }
65
112
  }
66
113
  }
@@ -1,13 +1,15 @@
1
1
  import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
2
  import { DaffToast } from '../interfaces/toast';
3
+ import { DaffToastOptions } from '../options/daff-toast-options';
3
4
  import { DaffToastPositionService } from '../service/position.service';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class DaffToastTemplateComponent {
6
7
  private cd;
8
+ private options;
7
9
  private toastPosition;
8
10
  faTimes: import("@fortawesome/fontawesome-common-types").IconDefinition;
9
11
  private _items;
10
- constructor(cd: ChangeDetectorRef, toastPosition: DaffToastPositionService);
12
+ constructor(cd: ChangeDetectorRef, options: DaffToastOptions, toastPosition: DaffToastPositionService);
11
13
  closeToast: EventEmitter<void>;
12
14
  onCloseToast(event: Event): void;
13
15
  get slideAnimation(): any;
@@ -1,6 +1,6 @@
1
1
  import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
2
2
  import { ElementRef, AfterViewInit, AfterContentInit, OnDestroy } from '@angular/core';
3
- import { DaffFocusStackService, DaffPrefixable, DaffPrefixDirective } from '@daffodil/design';
3
+ import { DaffFocusStackService, DaffPrefixDirective } from '@daffodil/design';
4
4
  import { DaffToast } from '../interfaces/toast';
5
5
  import { DaffToastActionsDirective } from '../toast-actions/toast-actions.directive';
6
6
  import * as i0 from "@angular/core";
@@ -11,13 +11,11 @@ import * as i1 from "@daffodil/design";
11
11
  * DaffToastComponent provides a way to display and
12
12
  * communicate information for user actions or system updates.
13
13
  */
14
- export declare class DaffToastComponent implements DaffPrefixable, AfterContentInit, AfterViewInit, OnDestroy {
14
+ export declare class DaffToastComponent implements AfterContentInit, AfterViewInit, OnDestroy {
15
15
  private _elementRef;
16
16
  private _focusTrapFactory;
17
17
  private _focusStack;
18
- /**
19
- * @docs-private
20
- */
18
+ /** @docs-private */
21
19
  class: boolean;
22
20
  /**
23
21
  * @docs-private
@@ -5,9 +5,24 @@
5
5
  * There may be other important data that needs to be available at render time.
6
6
  */
7
7
  export interface DaffTreeData<T> {
8
+ /**
9
+ * The label displayed for a tree node.
10
+ */
8
11
  title: string;
12
+ /**
13
+ * A URL associated with a tree node, which can be used for navigation or linking.
14
+ */
9
15
  url: string;
16
+ /**
17
+ * A unique ID for a tree node.
18
+ */
10
19
  id: string;
20
+ /**
21
+ * An array of child nodes, each of which is also a `DaffTreeData` item.
22
+ */
11
23
  items: DaffTreeData<T>[];
24
+ /**
25
+ * Additional data associated with a tree node.
26
+ */
12
27
  data: T;
13
28
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Represents the mode of rendering for nodes in a tree UI.
3
- * - 'in-dom': Closed nodes are present in the Document Object Model (DOM).
4
- * - 'not-in-dom': Closed nodes are not present in the Document Object Model (DOM).
3
+ * - `in-dom`: Closed nodes are present in the Document Object Model (DOM).
4
+ * - `not-in-dom`: Closed nodes are not present in the Document Object Model (DOM).
5
5
  */
6
6
  export type DaffTreeRenderMode = 'in-dom' | 'not-in-dom';
@@ -11,27 +11,53 @@
11
11
  $white: core.daff-map-get($theme, 'core', 'white');
12
12
  $black: core.daff-map-get($theme, 'core', 'black');
13
13
  $neutral: core.daff-map-get($theme, 'core', 'neutral');
14
+ $type: core.daff-map-get($theme, 'core', 'type');
14
15
 
16
+ // stylelint-disable selector-class-pattern
15
17
  .daff-tree-item {
16
18
  $root: &;
17
- background-color: $base;
18
- color: theming.daff-illuminate($base-contrast, $neutral, 2);
19
19
 
20
- &:hover {
21
- background-color: theming.daff-illuminate($base, $neutral, 2);
22
- }
20
+ @include theming.light($type) {
21
+ background-color: $base;
22
+ color: theming.daff-color($neutral, 90);
23
+
24
+ &:hover {
25
+ background-color: theming.daff-color($neutral, 20);
26
+ }
27
+
28
+ &::after {
29
+ border-color: $base;
30
+ }
31
+
32
+ &.selected {
33
+ background-color: theming.daff-color($neutral, 20);
34
+ color: $base-contrast;
23
35
 
24
- &::after {
25
- border-color: currentColor;
36
+ &::before {
37
+ background-color: theming.daff-color($primary);
38
+ }
39
+ }
26
40
  }
27
41
 
28
- // stylelint-disable selector-class-pattern
29
- &.selected {
30
- background-color: theming.daff-illuminate($base, $neutral, 2);
31
- color: $base-contrast;
42
+ @include theming.dark($type) {
43
+ background-color: $base;
44
+ color: theming.daff-color($neutral, 20);
45
+
46
+ &:hover {
47
+ background-color: theming.daff-color($neutral, 90);
48
+ }
49
+
50
+ &::after {
51
+ border-color: $base;
52
+ }
53
+
54
+ &.selected {
55
+ background-color: theming.daff-color($neutral, 90);
56
+ color: $base-contrast;
32
57
 
33
- &::before {
34
- background-color: theming.daff-color($primary);
58
+ &::before {
59
+ background-color: theming.daff-color($primary);
60
+ }
35
61
  }
36
62
  }
37
63
  }
@@ -1,10 +1,10 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  /**
3
- * This service is used by tree-items to notify their parent
4
- * that the tree has to be re-computed.
3
+ * This service is used by tree items to notify their parent
4
+ * that the tree has to be recomputed.
5
5
  *
6
6
  * This service is a multiton associated with each tree instance.
7
- * It follows the same lifecycle has the tree it is associated with.
7
+ * It follows the same lifecycle as the tree it is associated with.
8
8
  */
9
9
  export declare class DaffTreeNotifierService implements OnDestroy {
10
10
  /**
@@ -6,7 +6,7 @@ import { DaffTreeFlatNode } from '../utils/flatten-tree';
6
6
  import * as i0 from "@angular/core";
7
7
  import * as i1 from "@daffodil/design";
8
8
  /**
9
- * The `DaffTreeComponent` allows you to render tree structures as interactable ui.
9
+ * The `DaffTreeComponent` allows you to render tree structures as interactable UI.
10
10
  *
11
11
  * @example Basic use of the tree component
12
12
  * ```html
@@ -35,7 +35,7 @@ export declare class DaffTreeComponent implements OnInit, OnChanges {
35
35
  /**
36
36
  * The rendering mode for nodes in the tree.
37
37
  *
38
- * Default value is 'in-dom', which means nodes are present in the DOM.
38
+ * Default value is `in-dom`, which means nodes are present in the DOM.
39
39
  *
40
40
  * Generally, `not-in-dom` is faster as there are less DOM elements to render,
41
41
  * but there may be use-cases (like SEO) where having the tree in the DOM
@@ -47,7 +47,9 @@ export declare class DaffTreeComponent implements OnInit, OnChanges {
47
47
  */
48
48
  private _tree;
49
49
  /**
50
- * The flattened tree data. You can iterate through this if you want to inspect
50
+ * @docs-private
51
+ *
52
+ * The flattened tree data. For debugging purposes, you can iterate through this if you want to inspect
51
53
  * the resulting array structure we computed to render the tree.
52
54
  */
53
55
  flatTree: DaffTreeFlatNode[];
@@ -67,9 +69,17 @@ export declare class DaffTreeComponent implements OnInit, OnChanges {
67
69
  * @docs-private
68
70
  */
69
71
  treeItemTemplate: TemplateRef<any>;
72
+ /**
73
+ * @docs-private
74
+ */
70
75
  constructor(notifier: DaffTreeNotifierService);
76
+ /**
77
+ * @docs-private
78
+ */
71
79
  ngOnChanges(changes: SimpleChanges): void;
72
80
  /**
81
+ * @docs-private
82
+ *
73
83
  * The track-by function used to reduce tree-item re-renders
74
84
  */
75
85
  trackByTreeElement(index: number, el: any): any;
@@ -50,16 +50,22 @@ export declare class DaffTreeItemDirective {
50
50
  */
51
51
  ariaExpanded: string;
52
52
  /**
53
+ * @docs-private
54
+ *
53
55
  * A css variable indicating the depth of the tree.
54
56
  * You can use this to style your templates if you want to
55
57
  * use different designs at different depths.
56
58
  */
57
59
  depth: number;
58
60
  /**
61
+ * @docs-private
62
+ *
59
63
  * The CSS class indicating whether or not the tree is `selected`.
60
64
  */
61
65
  get selectedClass(): boolean;
62
66
  /**
67
+ * @docs-private
68
+ *
63
69
  * The CSS class indicating whether or not the tree is `open`.
64
70
  */
65
71
  openClass: boolean;
@@ -17,6 +17,9 @@ export declare class DaffYoutubePlayerComponent implements OnInit {
17
17
  */
18
18
  ngOnInit(): void;
19
19
  get _aspectRatio(): SafeStyle;
20
+ /**
21
+ * @docs-private
22
+ */
20
23
  get maxWidth(): string;
21
24
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffYoutubePlayerComponent, never>;
22
25
  static ɵcmp: i0.ɵɵComponentDeclaration<DaffYoutubePlayerComponent, "daff-youtube-player", never, { "src": { "alias": "src"; "required": false; }; "title": { "alias": "title"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; }, {}, never, never, true, never>;
@@ -1,7 +0,0 @@
1
- import { DaffPrefixDirective } from '../prefix.directive';
2
- /**
3
- * An interface enforcing that a component has the ability to interact with a given DaffPrefixDirective.
4
- */
5
- export interface DaffPrefixable {
6
- _prefix: DaffPrefixDirective;
7
- }
@@ -1,11 +0,0 @@
1
- import { Constructor } from '../../../core/public_api';
2
- import { DaffPrefixDirective } from '../prefix.directive';
3
- /**
4
- * A mixin for giving a component the ability to place content before another piece of content.
5
- */
6
- export declare function daffPrefixableMixin<T extends Constructor>(Base: T): {
7
- new (...args: any[]): {
8
- [x: string]: any;
9
- _prefix: DaffPrefixDirective;
10
- };
11
- } & T;
@@ -1,7 +0,0 @@
1
- import { DaffSuffixDirective } from '../suffix.directive';
2
- /**
3
- * An interface enforcing that a component has the ability to interact with a given DaffSuffixDirective.
4
- */
5
- export interface DaffSuffixable {
6
- _suffix: DaffSuffixDirective;
7
- }
@@ -1,11 +0,0 @@
1
- import { Constructor } from '../../../core/public_api';
2
- import { DaffSuffixDirective } from '../suffix.directive';
3
- /**
4
- * A mixin for giving a component the ability to place content after another piece of content.
5
- */
6
- export declare function daffSuffixableMixin<T extends Constructor>(Base: T): {
7
- new (...args: any[]): {
8
- [x: string]: any;
9
- _suffix: DaffSuffixDirective;
10
- };
11
- } & T;
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class BasicInputComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<BasicInputComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<BasicInputComponent, "basic-input", never, {}, {}, never, never, true, never>;
5
- }