@daffodil/design 0.81.1 → 0.83.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 (258) hide show
  1. package/accordion/README.md +44 -29
  2. package/accordion/accordion/accordion/accordion.component.d.ts +3 -0
  3. package/accordion/accordion/accordion-item/accordion-item.component.d.ts +23 -12
  4. package/accordion/accordion/accordion-item-title/accordion-item-title.directive.d.ts +3 -0
  5. package/accordion/accordion.d.ts +5 -0
  6. package/accordion/examples/disabled-accordion/disabled-accordion.component.d.ts +5 -0
  7. package/accordion/examples/initially-expanded-accordion/initially-expanded-accordion.component.d.ts +5 -0
  8. package/accordion/examples/public_api.d.ts +2 -0
  9. package/accordion/src/accordion-theme.scss +28 -6
  10. package/article/README.md +4 -3
  11. package/article/article.d.ts +3 -0
  12. package/article/src/article-theme.scss +128 -51
  13. package/breadcrumb/README.md +38 -28
  14. package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +15 -2
  15. package/breadcrumb/breadcrumb-item/breadcrumb-item.directive.d.ts +18 -4
  16. package/breadcrumb/breadcrumb.d.ts +3 -0
  17. package/breadcrumb/examples/iterated-breadcrumb/iterated-breadcrumb.component.d.ts +6 -0
  18. package/breadcrumb/public_api.d.ts +2 -2
  19. package/button/README.md +43 -23
  20. package/button/button/basic/button.component.d.ts +5 -1
  21. package/button/button/button-base.directive.d.ts +11 -3
  22. package/button/button/button-sizable.directive.d.ts +1 -1
  23. package/button/button/raised/raised.component.d.ts +2 -0
  24. package/button/button/stroked/stroked.component.d.ts +5 -1
  25. package/button/button.d.ts +4 -2
  26. package/button/button.module.d.ts +1 -2
  27. package/button/examples/elevated-button/elevated-button.component.d.ts +6 -0
  28. package/button/examples/examples.d.ts +2 -1
  29. package/button/examples/public_api.d.ts +1 -0
  30. package/button/public_api.d.ts +0 -1
  31. package/button/src/button/basic/button-theme.scss +185 -80
  32. package/button/src/button/button-base.scss +41 -16
  33. package/button/src/button/flat/flat-theme.scss +144 -85
  34. package/button/src/button/icon/icon-theme.scss +183 -79
  35. package/button/src/button/raised/raised-theme.scss +2 -7
  36. package/button/src/button/stroked/stroked-theme.scss +128 -94
  37. package/button/src/button/underline/underline-theme.scss +112 -44
  38. package/callout/README.md +4 -3
  39. package/callout/callout.d.ts +3 -0
  40. package/card/README.md +6 -3
  41. package/card/card/basic/basic.component.d.ts +7 -0
  42. package/card/card/raised/raised.component.d.ts +7 -0
  43. package/card/card/stroked/stroked.component.d.ts +7 -0
  44. package/card/card-base.directive.d.ts +25 -0
  45. package/card/card.d.ts +18 -1
  46. package/card/card.module.d.ts +10 -8
  47. package/card/examples/card-theming/card-theming.component.d.ts +2 -1
  48. package/card/examples/public_api.d.ts +1 -1
  49. package/card/public_api.d.ts +6 -1
  50. package/card/src/card/raised/raised-theme.scss +30 -0
  51. package/card/src/card/stroked/stroked-theme.scss +135 -0
  52. package/card/src/card-base-theme.scss +197 -0
  53. package/card/src/card-base.scss +134 -0
  54. package/container/README.md +5 -3
  55. package/container/container.d.ts +3 -0
  56. package/core/colorable/colorable.d.ts +20 -14
  57. package/core/colorable/colorable.directive.d.ts +9 -6
  58. package/fesm2022/daffodil-design-accordion-examples.mjs +28 -4
  59. package/fesm2022/daffodil-design-accordion-examples.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-accordion.mjs +56 -29
  61. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-article-examples.mjs +30 -30
  63. package/fesm2022/daffodil-design-article.mjs +14 -11
  64. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  65. package/fesm2022/daffodil-design-breadcrumb-examples.mjs +24 -4
  66. package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +1 -1
  67. package/fesm2022/daffodil-design-breadcrumb.mjs +78 -40
  68. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  69. package/fesm2022/daffodil-design-button-examples.mjs +55 -33
  70. package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
  71. package/fesm2022/daffodil-design-button.mjs +79 -69
  72. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  73. package/fesm2022/daffodil-design-callout-examples.mjs +12 -12
  74. package/fesm2022/daffodil-design-callout-examples.mjs.map +1 -1
  75. package/fesm2022/daffodil-design-callout.mjs +25 -22
  76. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  77. package/fesm2022/daffodil-design-card-examples.mjs +35 -31
  78. package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
  79. package/fesm2022/daffodil-design-card.mjs +140 -86
  80. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  81. package/fesm2022/daffodil-design-checkbox-examples.mjs +6 -6
  82. package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
  83. package/fesm2022/daffodil-design-container-examples.mjs +3 -3
  84. package/fesm2022/daffodil-design-container.mjs +10 -7
  85. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-hero-examples.mjs +12 -12
  87. package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-hero.mjs +25 -22
  89. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  90. package/fesm2022/daffodil-design-image-examples.mjs +9 -9
  91. package/fesm2022/daffodil-design-image.mjs +36 -19
  92. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  93. package/fesm2022/daffodil-design-input-examples.mjs +12 -12
  94. package/fesm2022/daffodil-design-link-set.mjs +19 -16
  95. package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
  96. package/fesm2022/daffodil-design-list-examples.mjs +12 -12
  97. package/fesm2022/daffodil-design-list.mjs +13 -10
  98. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  99. package/fesm2022/daffodil-design-loading-icon-examples.mjs +4 -4
  100. package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +1 -1
  101. package/fesm2022/daffodil-design-loading-icon.mjs +11 -8
  102. package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
  103. package/fesm2022/daffodil-design-media-gallery-examples.mjs +62 -13
  104. package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +1 -1
  105. package/fesm2022/daffodil-design-media-gallery.mjs +204 -250
  106. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  107. package/fesm2022/daffodil-design-menu-examples.mjs +6 -6
  108. package/fesm2022/daffodil-design-menu-examples.mjs.map +1 -1
  109. package/fesm2022/daffodil-design-menu.mjs +16 -16
  110. package/fesm2022/daffodil-design-modal-examples.mjs +7 -7
  111. package/fesm2022/daffodil-design-modal-examples.mjs.map +1 -1
  112. package/fesm2022/daffodil-design-modal.mjs +28 -25
  113. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  114. package/fesm2022/daffodil-design-navbar-examples.mjs +12 -12
  115. package/fesm2022/daffodil-design-navbar-examples.mjs.map +1 -1
  116. package/fesm2022/daffodil-design-navbar.mjs +10 -7
  117. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  118. package/fesm2022/daffodil-design-notification-examples.mjs +17 -16
  119. package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
  120. package/fesm2022/daffodil-design-notification.mjs +23 -20
  121. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  122. package/fesm2022/daffodil-design-paginator-examples.mjs +6 -6
  123. package/fesm2022/daffodil-design-paginator.mjs +13 -7
  124. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  125. package/fesm2022/daffodil-design-progress-bar-examples.mjs +10 -10
  126. package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
  127. package/fesm2022/daffodil-design-progress-bar.mjs +13 -13
  128. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  129. package/fesm2022/daffodil-design-quantity-field-examples.mjs +12 -12
  130. package/fesm2022/daffodil-design-radio-examples.mjs +3 -3
  131. package/fesm2022/daffodil-design-sidebar-examples.mjs +14 -14
  132. package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
  133. package/fesm2022/daffodil-design-sidebar.mjs +150 -61
  134. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  135. package/fesm2022/daffodil-design-switch-examples.mjs +15 -15
  136. package/fesm2022/daffodil-design-switch-examples.mjs.map +1 -1
  137. package/fesm2022/daffodil-design-switch.mjs +38 -10
  138. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  139. package/fesm2022/daffodil-design-tabs-examples.mjs +23 -17
  140. package/fesm2022/daffodil-design-tabs-examples.mjs.map +1 -1
  141. package/fesm2022/daffodil-design-tabs.mjs +67 -35
  142. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  143. package/fesm2022/daffodil-design-text-snippet-examples.mjs +3 -3
  144. package/fesm2022/daffodil-design-text-snippet.mjs +4 -5
  145. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  146. package/fesm2022/daffodil-design-toast-examples.mjs +40 -15
  147. package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
  148. package/fesm2022/daffodil-design-toast.mjs +296 -239
  149. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  150. package/fesm2022/daffodil-design-tree-examples.mjs +6 -6
  151. package/fesm2022/daffodil-design-tree.mjs +15 -12
  152. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  153. package/fesm2022/daffodil-design-youtube-player.mjs +104 -0
  154. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -0
  155. package/fesm2022/daffodil-design.mjs +167 -155
  156. package/fesm2022/daffodil-design.mjs.map +1 -1
  157. package/hero/README.md +4 -3
  158. package/hero/hero.d.ts +3 -0
  159. package/image/README.md +4 -3
  160. package/image/image/image.component.d.ts +22 -1
  161. package/image/image.d.ts +3 -0
  162. package/link-set/README.md +4 -3
  163. package/link-set/link-set.d.ts +3 -0
  164. package/list/README.md +4 -3
  165. package/list/list.d.ts +3 -0
  166. package/loading-icon/README.md +10 -7
  167. package/loading-icon/loading-icon.d.ts +3 -0
  168. package/loading-icon/src/loading-icon-theme.scss +66 -38
  169. package/media-gallery/README.md +19 -10
  170. package/media-gallery/examples/iterated-media-gallery/iterated-media-gallery.component.d.ts +13 -0
  171. package/media-gallery/examples/media-gallery-with-video/media-gallery-with-video.component.d.ts +5 -0
  172. package/media-gallery/examples/public_api.d.ts +2 -0
  173. package/media-gallery/helpers/media-gallery-registration.interface.d.ts +1 -1
  174. package/media-gallery/media-gallery/media-gallery.component.d.ts +89 -11
  175. package/media-gallery/media-gallery.d.ts +4 -2
  176. package/media-gallery/media-gallery.module.d.ts +1 -2
  177. package/media-gallery/public_api.d.ts +3 -4
  178. package/media-gallery/src/media-gallery-theme.scss +30 -4
  179. package/media-gallery/thumbnail/thumbnail.directive.d.ts +45 -22
  180. package/menu/README.md +1 -2
  181. package/modal/README.md +3 -2
  182. package/modal/modal.d.ts +3 -0
  183. package/navbar/README.md +3 -2
  184. package/navbar/navbar.d.ts +3 -0
  185. package/notification/README.md +5 -4
  186. package/notification/notification.d.ts +3 -0
  187. package/notification/src/notification-theme.scss +62 -23
  188. package/package.json +1 -1
  189. package/paginator/README.md +3 -2
  190. package/paginator/paginator/paginator.component.d.ts +3 -0
  191. package/paginator/paginator.d.ts +3 -0
  192. package/progress-bar/README.md +5 -6
  193. package/progress-bar/progress-bar.component.d.ts +0 -3
  194. package/progress-bar/progress-bar.d.ts +3 -0
  195. package/progress-bar/src/progress-bar-theme.scss +17 -8
  196. package/scss/theme.scss +36 -17
  197. package/scss/theming/_configure-theme.scss +2 -0
  198. package/scss/theming/_index.scss +1 -0
  199. package/scss/theming/_light-dark.scss +45 -0
  200. package/sidebar/README.md +20 -21
  201. package/sidebar/helper/sidebar-mode.d.ts +9 -15
  202. package/sidebar/public_api.d.ts +10 -11
  203. package/sidebar/sidebar/sidebar.component.d.ts +22 -7
  204. package/sidebar/sidebar-footer/sidebar-footer.component.d.ts +11 -0
  205. package/sidebar/sidebar-header/sidebar-header-title/sidebar-header-title.directive.d.ts +8 -0
  206. package/sidebar/sidebar-header/sidebar-header.component.d.ts +19 -1
  207. package/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +36 -15
  208. package/sidebar/sidebar-viewport-backdrop/sidebar-viewport-backdrop.component.d.ts +17 -0
  209. package/sidebar/sidebar.d.ts +4 -2
  210. package/sidebar/sidebar.module.d.ts +1 -2
  211. package/switch/README.md +3 -2
  212. package/switch/src/switch-theme.scss +29 -10
  213. package/switch/switch/switch.component.d.ts +31 -6
  214. package/switch/switch.d.ts +3 -0
  215. package/tabs/README.md +33 -3
  216. package/tabs/src/tabs-theme.scss +31 -13
  217. package/tabs/tabs/tab/tab.component.d.ts +1 -1
  218. package/tabs/tabs/tab-label/tab-label.component.d.ts +6 -0
  219. package/tabs/tabs/tab-panel/tab-panel.component.d.ts +8 -0
  220. package/tabs/tabs/tabs.component.d.ts +21 -4
  221. package/tabs/tabs.d.ts +8 -2
  222. package/text-snippet/README.md +19 -1
  223. package/toast/README.md +21 -151
  224. package/toast/examples/dismissible-toast/dismissible-toast.component.d.ts +11 -0
  225. package/toast/examples/public_api.d.ts +2 -1
  226. package/toast/interfaces/toast-action.d.ts +22 -11
  227. package/toast/interfaces/toast-action.type.d.ts +10 -0
  228. package/toast/interfaces/toast.d.ts +11 -5
  229. package/toast/options/daff-toast-options.d.ts +2 -1
  230. package/toast/public_api.d.ts +2 -6
  231. package/toast/service/position.service.d.ts +9 -1
  232. package/toast/service/toast.service.d.ts +63 -0
  233. package/toast/src/toast-theme.scss +80 -33
  234. package/toast/toast/toast-config.d.ts +24 -1
  235. package/toast/toast/toast-provider.d.ts +16 -0
  236. package/toast/toast/toast.component.d.ts +20 -1
  237. package/toast/toast-actions/toast-actions.directive.d.ts +3 -0
  238. package/toast/toast-message/toast-message.directive.d.ts +3 -0
  239. package/toast/toast-title/toast-title.directive.d.ts +3 -0
  240. package/tree/README.md +6 -10
  241. package/tree/src/tree-theme.scss +39 -13
  242. package/tree/tree.d.ts +3 -0
  243. package/youtube-player/index.d.ts +1 -0
  244. package/youtube-player/public_api.d.ts +3 -0
  245. package/youtube-player/safe-url.pipe.d.ts +10 -0
  246. package/youtube-player/youtube-player.component.d.ts +23 -0
  247. package/youtube-player/youtube-player.d.ts +6 -0
  248. package/card/card/card.component.d.ts +0 -48
  249. package/card/src/card-theme-variants/basic-card.scss +0 -6
  250. package/card/src/card-theme-variants/linkable-card.scss +0 -16
  251. package/card/src/card-theme-variants/stroked-card.scss +0 -3
  252. package/card/src/card-theme.scss +0 -170
  253. package/media-gallery/media-renderer/media-renderer.component.d.ts +0 -29
  254. package/media-gallery/registry/media-gallery.registry.d.ts +0 -34
  255. package/media-gallery/thumbnail/thumbnail-compat.token.d.ts +0 -1
  256. package/media-gallery/thumbnail/thumbnail-registration.interface.d.ts +0 -9
  257. package/scss/theming/prebuilt/internal-theme.scss +0 -13
  258. package/toast/toast.module.d.ts +0 -19
@@ -0,0 +1,11 @@
1
+ import { DaffToastService } from '@daffodil/design/toast';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DismissibleToastComponent {
4
+ private toastService;
5
+ private toast;
6
+ constructor(toastService: DaffToastService);
7
+ open(): void;
8
+ private count;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<DismissibleToastComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<DismissibleToastComponent, "dismissible-toast", never, {}, {}, never, never, true, never>;
11
+ }
@@ -1,5 +1,6 @@
1
1
  import { DefaultToastComponent } from './default-toast/default-toast.component';
2
+ import { DismissibleToastComponent } from './dismissible-toast/dismissible-toast.component';
2
3
  import { ToastPositionsComponent } from './toast-positions/toast-positions.component';
3
4
  import { ToastStatusComponent } from './toast-status/toast-status.component';
4
5
  import { ToastWithCustomDurationComponent } from './toast-with-custom-duration/toast-with-custom-duration.component';
5
- export declare const TOAST_EXAMPLES: (typeof DefaultToastComponent | typeof ToastPositionsComponent | typeof ToastStatusComponent | typeof ToastWithCustomDurationComponent)[];
6
+ export declare const TOAST_EXAMPLES: (typeof DefaultToastComponent | typeof DismissibleToastComponent | typeof ToastPositionsComponent | typeof ToastStatusComponent | typeof ToastWithCustomDurationComponent)[];
@@ -1,34 +1,45 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { DaffPalette, DaffStatus } from '@daffodil/design';
3
+ import { DaffToastActionButtonSize, DaffToastActionButtonType } from './toast-action.type';
3
4
  /**
4
- * An interface for properties of actions, specifically the DaffButtonComponent, placed inside of the toast.
5
+ * The configurations for an action button rendered inside a toast
6
+ * displayed using the {@link DaffButtonComponent}.
5
7
  */
6
8
  export interface DaffToastAction {
7
9
  /**
8
- * The types of buttons available to be used, as defined in the {@link DaffButtonComponent}.
10
+ * The type of button.
11
+ *
12
+ * Matches one of the predefined types supported by {@link DaffButtonComponent}.
9
13
  */
10
- type?: 'raised' | 'underline' | 'stroked' | 'flat' | undefined;
14
+ type?: DaffToastActionButtonType;
11
15
  /**
12
- * The text for the button
16
+ * The text displayed on the button.
13
17
  */
14
18
  content: string;
15
19
  /**
16
- * The size of the button, as defined in the {@link DaffButtonComponent}.
20
+ * The size of the button.
21
+ *
22
+ * Matches one of the predefined sizes supported by {@link DaffButtonComponent}.
17
23
  */
18
- size?: 'sm' | 'md' | 'lg' | undefined;
24
+ size?: DaffToastActionButtonSize;
19
25
  /**
20
- * The color of the button, as defined in the {@link DaffButtonComponent}.
21
- * Color and status should not be used simultaneously.
26
+ * The color of the button.
27
+ *
28
+ * Do not use both `color` and `status` simultaneously.
22
29
  */
23
30
  color?: DaffPalette;
24
31
  /**
25
- * The status of the button, as defined in the {@link DaffButtonComponent}.
26
- * Color and status should not be used simultaneously.
32
+ * The button status.
33
+ *
34
+ * Do not use both `color` and `status` simultaneously.
27
35
  */
28
36
  status?: DaffStatus;
37
+ /**
38
+ * Data associated with the action.
39
+ */
29
40
  data?: Record<string, any>;
30
41
  /**
31
- * Sets an EventEmitter on a DaffToastAction
42
+ * An event emitter that fires when the action is triggered.
32
43
  */
33
44
  eventEmitter?: EventEmitter<DaffToastAction>;
34
45
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The available button styles that can be used in {@link DaffToastAction}.
3
+ * These correspond to the types supported by {@link DaffButtonComponent}.
4
+ */
5
+ export type DaffToastActionButtonType = 'raised' | 'underline' | 'stroked' | 'flat' | undefined;
6
+ /**
7
+ * The available button sizes that can be used in {@link DaffToastAction}.
8
+ * These correspond to the types supported by {@link DaffButtonComponent}.
9
+ */
10
+ export type DaffToastActionButtonSize = 'sm' | 'md' | 'lg' | undefined;
@@ -3,18 +3,24 @@ import { DaffStatus } from '@daffodil/design';
3
3
  import { DaffToastAction } from './toast-action';
4
4
  /** Possible data that can be shown on a toast */
5
5
  export interface DaffToastData {
6
- /** A title that provides a quick oveview of the toast */
6
+ /** A title that provides a quick oveview of the toast. */
7
7
  title: string;
8
- /** A short message used to provide additional details about the toast */
8
+ /** A short message used to provide additional details about the toast. */
9
9
  message?: string;
10
- /** Sets a status on the toast */
10
+ /** Sets a status on the toast. */
11
11
  status?: DaffStatus;
12
- /** Used to display actions in the toast */
12
+ /** Used to display actions in the toast. */
13
13
  actions?: DaffToastAction[];
14
- /** Whether or not the toast is dismissible */
14
+ /** Whether or not the toast is dismissible. */
15
15
  dismissible?: boolean;
16
16
  }
17
17
  export interface DaffToast extends DaffToastData {
18
+ /**
19
+ * Closes the toast.
20
+ */
18
21
  dismiss: () => void;
22
+ /**
23
+ * The observable that emits when the toast is closed.
24
+ */
19
25
  dismissalStream: Observable<void | number>;
20
26
  }
@@ -10,4 +10,5 @@ export interface DaffToastOptions {
10
10
  useParent: boolean;
11
11
  }
12
12
  export declare const daffToastDefaultOptions: DaffToastOptions;
13
- export declare const DAFF_TOAST_OPTIONS: import("@angular/core").InjectionToken<DaffToastOptions>, provideDaffToastOptions: <R extends DaffToastOptions = DaffToastOptions>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
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>;
@@ -1,12 +1,8 @@
1
1
  export { DaffToastPositionService } from './service/position.service';
2
- export { DaffToastModule } from './toast.module';
3
2
  export { DaffToastService } from './service/toast.service';
4
3
  export { DaffToastConfiguration } from './toast/toast-config';
5
4
  export { DaffToast, DaffToastData, } from './interfaces/toast';
6
5
  export { DaffToastAction } from './interfaces/toast-action';
7
6
  export { DAFF_TOAST_OPTIONS, provideDaffToastOptions, } from './options/daff-toast-options';
8
- export * from './toast/toast.component';
9
- export * from './toast-actions/toast-actions.directive';
10
- export * from './toast-title/toast-title.directive';
11
- export * from './toast-message/toast-message.directive';
12
- export * from './toast/toast-provider';
7
+ export { provideDaffToast } from './toast/toast-provider';
8
+ export { DaffToastActionButtonSize, DaffToastActionButtonType, } from './interfaces/toast-action.type';
@@ -7,8 +7,16 @@ export declare class DaffToastPositionService {
7
7
  constructor(options: DaffToastOptions, mediaQuery: BreakpointObserver);
8
8
  private _config;
9
9
  private _position;
10
+ /**
11
+ * Reads the current position of the toast. Defaults to bottom center on mobile devices.
12
+ */
10
13
  get config(): DaffToastPosition;
11
- set config(val: DaffToastPosition);
14
+ private set config(value);
15
+ /**
16
+ * Changes the position of the toast.
17
+ *
18
+ * @param position The position of the toast.
19
+ */
12
20
  setPosition(position: DaffToastPosition): void;
13
21
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastPositionService, never>;
14
22
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffToastPositionService>;
@@ -7,6 +7,55 @@ import { DaffToast, DaffToastData } from '../interfaces/toast';
7
7
  import { DaffToastOptions } from '../options/daff-toast-options';
8
8
  import { DaffToastConfiguration } from '../toast/toast-config';
9
9
  import * as i0 from "@angular/core";
10
+ /**
11
+ * Service to display toasts.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import {
16
+ * ChangeDetectionStrategy,
17
+ * Component,
18
+ * EventEmitter,
19
+ * OnInit,
20
+ * } from '@angular/core';
21
+ *
22
+ * import {
23
+ * DaffToast,
24
+ * DaffToastAction,
25
+ * DaffToastService,
26
+ * } from '@daffodil/design/toast';
27
+ *
28
+ * @Component({
29
+ * selector: 'default-toast',
30
+ * templateUrl: './default-toast.component.html',
31
+ * styles: [],
32
+ * changeDetection: ChangeDetectionStrategy.OnPush,
33
+ * })
34
+ * export class DefaultToastComponent implements OnInit {
35
+ * private toast: DaffToast;
36
+ *
37
+ * constructor(private toastService: DaffToastService) {}
38
+ *
39
+ * closeToast = new EventEmitter<DaffToastAction>();
40
+ *
41
+ * open() {
42
+ * this.toast = this.toastService.open({
43
+ * title: 'Update Available',
44
+ * message: 'A new version of this page is available.',
45
+ * actions: [
46
+ * { content: 'Remind me later', type: 'flat', size: 'sm', eventEmitter: this.closeToast },
47
+ * ],
48
+ * });
49
+ * }
50
+ *
51
+ * ngOnInit() {
52
+ * this.closeToast.subscribe(() => {
53
+ * this.toastService.close(this.toast);
54
+ * });
55
+ * }
56
+ * }
57
+ * ```
58
+ */
10
59
  export declare class DaffToastService implements OnDestroy {
11
60
  private overlay;
12
61
  private options;
@@ -20,10 +69,24 @@ export declare class DaffToastService implements OnDestroy {
20
69
  private _overlayRef?;
21
70
  private _template?;
22
71
  constructor(overlay: Overlay, options: DaffToastOptions, _parentToast: DaffToastService, mediaQuery: BreakpointObserver, toastPosition: DaffToastPositionService, focusStack: DaffFocusStackService, injector: Injector);
72
+ /**
73
+ * @docs-private
74
+ */
23
75
  ngOnDestroy(): void;
24
76
  private _attachToastTemplate;
25
77
  private _createOverlayRef;
78
+ /**
79
+ * Opens the toast.
80
+ *
81
+ * @param toast Data that can be shown on a toast.
82
+ * @param configuration Additional configuration options such as duration. The default duration is set to 5000ms.
83
+ */
26
84
  open(toast: DaffToastData, configuration?: Partial<DaffToastConfiguration>): DaffToast;
85
+ /**
86
+ * Closes the toast.
87
+ *
88
+ * @param toast The instance of toast that you wish to close.
89
+ */
27
90
  close(toast: DaffToast): void;
28
91
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastService, [null, null, { optional: true; skipSelf: true; }, null, null, null, null]>;
29
92
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffToastService>;
@@ -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,6 +1,29 @@
1
1
  export interface DaffToastConfiguration {
2
2
  /**
3
- * The duration (in milliseconds) that a toast is visible before it's dismissed.
3
+ * The duration (in milliseconds) for which a toast remains visible before dismissal.
4
+ *
5
+ * While you can set a duration for toasts with actions, it's generally not recommended,
6
+ * as users should have ample time to interact with them.
7
+ *
8
+ * @usage
9
+ * ```
10
+ * export class CustomComponent {
11
+ * private toast: DaffToast;
12
+ *
13
+ * constructor(private toastService: DaffToastService) {}
14
+ *
15
+ * open() {
16
+ * this.toast = this.toastService.open({
17
+ * title: 'Update Complete',
18
+ * message: 'This page has been updated to the newest version.',
19
+ * status: 'success',
20
+ * },
21
+ * {
22
+ * duration: 7000,
23
+ * });
24
+ * }
25
+ * }
26
+ * ```
4
27
  */
5
28
  duration?: number;
6
29
  }
@@ -1,2 +1,18 @@
1
1
  import { Provider } from '@angular/core';
2
+ /**
3
+ * Registers the `DaffToastService` and `DaffToastPositionService` for displaying a toast. This provider ensures
4
+ * toasts function correctly within your application.
5
+ *
6
+ * ```ts
7
+ * import { provideDaffToast } from '@daffodil/design/toast';
8
+ *
9
+ * @NgModule({
10
+ * providers: [
11
+ * provideDaffToast(),
12
+ * ]
13
+ * )}
14
+ *
15
+ * export class AppModule {}
16
+ * ```
17
+ */
2
18
  export declare const provideDaffToast: () => Provider[];
@@ -6,6 +6,8 @@ import { DaffToastActionsDirective } from '../toast-actions/toast-actions.direct
6
6
  import * as i0 from "@angular/core";
7
7
  import * as i1 from "@daffodil/design";
8
8
  /**
9
+ * @docs-private
10
+ *
9
11
  * DaffToastComponent provides a way to display and
10
12
  * communicate information for user actions or system updates.
11
13
  */
@@ -13,9 +15,17 @@ export declare class DaffToastComponent implements DaffPrefixable, AfterContentI
13
15
  private _elementRef;
14
16
  private _focusTrapFactory;
15
17
  private _focusStack;
16
- /** @docs-private */
18
+ /**
19
+ * @docs-private
20
+ */
17
21
  class: boolean;
22
+ /**
23
+ * @docs-private
24
+ */
18
25
  _actions: DaffToastActionsDirective;
26
+ /**
27
+ * @docs-private
28
+ */
19
29
  _prefix: DaffPrefixDirective;
20
30
  toast: DaffToast;
21
31
  /**
@@ -24,8 +34,17 @@ export declare class DaffToastComponent implements DaffPrefixable, AfterContentI
24
34
  onEscape(): void;
25
35
  private _focusTrap;
26
36
  constructor(_elementRef: ElementRef, _focusTrapFactory: ConfigurableFocusTrapFactory, _focusStack: DaffFocusStackService);
37
+ /**
38
+ * @docs-private
39
+ */
27
40
  ngAfterContentInit(): void;
41
+ /**
42
+ * @docs-private
43
+ */
28
44
  ngAfterViewInit(): void;
45
+ /**
46
+ * @docs-private
47
+ */
29
48
  ngOnDestroy(): void;
30
49
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastComponent, never>;
31
50
  static ɵcmp: i0.ɵɵComponentDeclaration<DaffToastComponent, "daff-toast", never, { "toast": { "alias": "toast"; "required": false; }; }, {}, ["_actions", "_prefix"], ["[daffPrefix]", "[daffToastTitle]", "[daffToastMessage]", "[daffToastActions]", "*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DaffStatusableDirective; inputs: { "status": "status"; }; outputs: {}; }]>;
@@ -1,5 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class DaffToastActionsDirective {
3
+ /**
4
+ * @docs-private
5
+ */
3
6
  class: boolean;
4
7
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastActionsDirective, never>;
5
8
  static ɵdir: i0.ɵɵDirectiveDeclaration<DaffToastActionsDirective, "[daffToastActions]", never, {}, {}, never, never, true, never>;
@@ -1,5 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class DaffToastMessageDirective {
3
+ /**
4
+ * @docs-private
5
+ */
3
6
  class: boolean;
4
7
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastMessageDirective, never>;
5
8
  static ɵdir: i0.ɵɵDirectiveDeclaration<DaffToastMessageDirective, "[daffToastMessage]", never, {}, {}, never, never, true, never>;
@@ -1,5 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class DaffToastTitleDirective {
3
+ /**
4
+ * @docs-private
5
+ */
3
6
  class: boolean;
4
7
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffToastTitleDirective, never>;
5
8
  static ɵdir: i0.ɵɵDirectiveDeclaration<DaffToastTitleDirective, "[daffToastTitle]", never, {}, {}, never, never, true, never>;
package/tree/README.md CHANGED
@@ -2,23 +2,26 @@
2
2
  Trees are used to visualize hierarchial information. They are often used to display navigational structures like nested lists of links.
3
3
 
4
4
  ## Overview
5
-
6
5
  The `DaffTreeComponent` renders a tree structure. Typically, this is a structure of `<a>` and `<button>` elements that allow users to either navigate to a page, or explore the tree to find an item inside the tree that they want to navigate to.
7
6
 
8
7
  Instead of defining a recursive tree structure of components, which is often prohibitively slow when rendering large trees, the `DaffTreeComponent` renders a flattened tree, using padding to indicate the nesting level of the tree elements.
9
8
 
10
9
  Generally, tree usage consists of taking existing tree data, converting it to the `DaffTreeData` format, setting the `tree` input on the `DaffTreeComponent`, and providing templates for the cases where the tree element has children or not.
11
10
 
11
+ <design-land-example-viewer-container example="basic-tree">
12
+ </design-land-example-viewer-container>
13
+
12
14
  ## Usage
13
15
 
14
16
  ### Within a standalone component
15
17
  To use sidebar in a standalone component, import `DAFF_TREE_COMPONENTS` directly into your custom component:
16
18
 
17
19
  ```ts
20
+ import { DAFF_TREE_COMPONENTS } from '@daffodil/design/tree';
21
+
18
22
  @Component({
19
23
  selector: 'custom-component',
20
24
  templateUrl: './custom-component.component.html',
21
- standalone: true,
22
25
  imports: [
23
26
  DAFF_TREE_COMPONENTS,
24
27
  ],
@@ -31,8 +34,8 @@ To use sidebar in a module, import `DaffTreeModule` into your custom module:
31
34
 
32
35
  ```ts
33
36
  import { NgModule } from '@angular/core';
34
-
35
37
  import { DaffTreeModule } from '@daffodil/design/tree';
38
+ import { CustomComponent } from './custom.component';
36
39
 
37
40
  @NgModule({
38
41
  declarations: [
@@ -65,13 +68,6 @@ Currently, we support two kind of templates: `daffTreeItemWithChildrenTpl` and `
65
68
  </ng-template>
66
69
  ```
67
70
 
68
- ## Usage
69
-
70
- ### Basic Tree
71
-
72
- <design-land-example-viewer-container example="basic-tree">
73
- </design-land-example-viewer-container>
74
-
75
71
  ## Accessibility
76
72
 
77
73
  The `DaffTreeComponent` follows the specification for a [disclosure navigation menu](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/) instead of a [tree view](https://www.w3.org/WAI/ARIA/apg/patterns/treeview/).
@@ -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
  }
package/tree/tree.d.ts CHANGED
@@ -1,3 +1,6 @@
1
1
  import { DaffTreeComponent } from './tree/tree.component';
2
2
  import { DaffTreeItemDirective } from './tree-item/tree-item.directive';
3
+ /**
4
+ * @docs-private
5
+ */
3
6
  export declare const DAFF_TREE_COMPONENTS: readonly [typeof DaffTreeComponent, typeof DaffTreeItemDirective];
@@ -0,0 +1 @@
1
+ export * from './public_api';
@@ -0,0 +1,3 @@
1
+ export { DaffYoutubePlayerComponent } from './youtube-player.component';
2
+ export { DaffYoutubeSafePipe } from './safe-url.pipe';
3
+ export { DAFF_YOUTUBE_PLAYER_COMPONENTS } from './youtube-player';
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DaffYoutubeSafePipe implements PipeTransform {
5
+ private domSanitizer;
6
+ constructor(domSanitizer: DomSanitizer);
7
+ transform(url: string): SafeUrl;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffYoutubeSafePipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<DaffYoutubeSafePipe, "daffYoutubeSafe", true>;
10
+ }