@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
package/hero/README.md CHANGED
@@ -7,13 +7,14 @@ Heros are the first thing users see on a page and are designed to catch their at
7
7
  ## Usage
8
8
 
9
9
  ### Within a standalone component
10
- To use hero in a standalone component, import it directly into your custom component:
10
+ To use hero in a standalone component, import `DAFF_HERO_COMPONENTS` directly into your custom component:
11
11
 
12
12
  ```ts
13
+ import { DAFF_HERO_COMPONENTS } from '@daffodil/design/hero';
14
+
13
15
  @Component({
14
16
  selector: 'custom-component',
15
17
  templateUrl: './custom-component.component.html',
16
- standalone: true,
17
18
  imports: [
18
19
  DAFF_HERO_COMPONENTS,
19
20
  ],
@@ -26,8 +27,8 @@ To use hero in a module, import `DaffHeroModule` into your custom module:
26
27
 
27
28
  ```ts
28
29
  import { NgModule } from '@angular/core';
29
-
30
30
  import { DaffHeroModule } from '@daffodil/design/hero';
31
+ import { CustomComponent } from './custom.component';
31
32
 
32
33
  @NgModule({
33
34
  declarations: [
package/hero/hero.d.ts CHANGED
@@ -4,4 +4,7 @@ import { DaffHeroIconDirective } from './hero-icon/hero-icon.directive';
4
4
  import { DaffHeroSubtitleDirective } from './hero-subtitle/hero-subtitle.directive';
5
5
  import { DaffHeroTaglineDirective } from './hero-tagline/hero-tagline.directive';
6
6
  import { DaffHeroTitleDirective } from './hero-title/hero-title.directive';
7
+ /**
8
+ * @docs-private
9
+ */
7
10
  export declare const DAFF_HERO_COMPONENTS: readonly [typeof DaffHeroComponent, typeof DaffHeroIconDirective, typeof DaffHeroTaglineDirective, typeof DaffHeroTitleDirective, typeof DaffHeroSubtitleDirective, typeof DaffHeroBodyDirective];
package/image/README.md CHANGED
@@ -14,13 +14,14 @@ The `src`, `width`, `height`, and `alt` attributes must be defined. An error wil
14
14
  ## Usage
15
15
 
16
16
  ### Within a standalone component
17
- To use image in a standalone component, import it directly into your custom component:
17
+ To use image in a standalone component, import `DAFF_IMAGE_COMPONENTS` directly into your custom component:
18
18
 
19
19
  ```ts
20
+ import { DAFF_IMAGE_COMPONENTS } from '@daffodil/design/image';
21
+
20
22
  @Component({
21
23
  selector: 'custom-component',
22
24
  templateUrl: './custom-component.component.html',
23
- standalone: true,
24
25
  imports: [
25
26
  DAFF_IMAGE_COMPONENTS,
26
27
  ],
@@ -33,8 +34,8 @@ To use image in a module, import `DaffImageModule` into your custom module:
33
34
 
34
35
  ```ts
35
36
  import { NgModule } from '@angular/core';
36
-
37
37
  import { DaffImageModule } from '@daffodil/design/image';
38
+ import { CustomComponent } from './custom.component';
38
39
 
39
40
  @NgModule({
40
41
  declarations: [
@@ -1,21 +1,36 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
- import { DomSanitizer } from '@angular/platform-browser';
2
+ import { DomSanitizer, SafeStyle } from '@angular/platform-browser';
3
3
  import * as i0 from "@angular/core";
4
4
  import * as i1 from "@daffodil/design";
5
5
  export declare class DaffImageComponent implements OnInit {
6
6
  private sanitizer;
7
7
  private _src;
8
+ /**
9
+ * The URL of the image.
10
+ */
8
11
  get src(): string;
9
12
  set src(value: string);
10
13
  private _alt;
14
+ /**
15
+ * The alternate text for the image.
16
+ */
11
17
  get alt(): string;
12
18
  set alt(value: string);
13
19
  private _width;
20
+ /**
21
+ * The width of the image.
22
+ */
14
23
  get width(): number;
15
24
  set width(value: number);
16
25
  private _height;
26
+ /**
27
+ * The height of the image.
28
+ */
17
29
  get height(): number;
18
30
  set height(value: number);
31
+ /**
32
+ * Emits when the image has loaded.
33
+ */
19
34
  load: EventEmitter<void>;
20
35
  /**
21
36
  * @docs-private
@@ -26,6 +41,12 @@ export declare class DaffImageComponent implements OnInit {
26
41
  * @docs-private
27
42
  */
28
43
  get _paddingTop(): any;
44
+ /**
45
+ * @docs-private
46
+ *
47
+ * The aspect ratio of an image, based on the width and height set by the user.
48
+ */
49
+ get _aspectRatio(): SafeStyle;
29
50
  /**
30
51
  * @docs-private
31
52
  */
package/image/image.d.ts CHANGED
@@ -1,2 +1,5 @@
1
1
  import { DaffImageComponent } from './image/image.component';
2
+ /**
3
+ * @docs-private
4
+ */
2
5
  export declare const DAFF_IMAGE_COMPONENTS: readonly [typeof DaffImageComponent];
@@ -4,13 +4,14 @@ Link set is a component for displaying two or more link set items.
4
4
  ## Usage
5
5
 
6
6
  ### Within a standalone component
7
- To use link set in a standalone component, import it directly into your custom component:
7
+ To use link set in a standalone component, import `DAFF_LINK_SET_COMPONENTS` directly into your custom component:
8
8
 
9
9
  ```ts
10
+ import { DAFF_LINK_SET_COMPONENTS } from '@daffodil/design/link-set';
11
+
10
12
  @Component({
11
13
  selector: 'custom-component',
12
14
  templateUrl: './custom-component.component.html',
13
- standalone: true,
14
15
  imports: [
15
16
  DAFF_LINK_SET_COMPONENTS,
16
17
  ],
@@ -23,8 +24,8 @@ To use link set in a module, import `DaffLinkSetModule` into your custom module:
23
24
 
24
25
  ```ts
25
26
  import { NgModule } from '@angular/core';
26
-
27
27
  import { DaffLinkSetModule } from '@daffodil/design/link-set';
28
+ import { CustomComponent } from './custom.component';
28
29
 
29
30
  @NgModule({
30
31
  declarations: [
@@ -2,4 +2,7 @@ import { DaffLinkSetComponent } from './link-set/link-set.component';
2
2
  import { DaffLinkSetHeadingDirective } from './link-set-heading/link-set-heading.directive';
3
3
  import { DaffLinkSetItemComponent } from './link-set-item/link-set-item.component';
4
4
  import { DaffLinkSetSubheadingDirective } from './link-set-subheading/link-set-subheading.directive';
5
+ /**
6
+ * @docs-private
7
+ */
5
8
  export declare const DAFF_LINK_SET_COMPONENTS: readonly [typeof DaffLinkSetComponent, typeof DaffLinkSetHeadingDirective, typeof DaffLinkSetSubheadingDirective, typeof DaffLinkSetItemComponent];
package/list/README.md CHANGED
@@ -4,13 +4,14 @@ List is a flexible component that can be used to display a series of content. It
4
4
  ## Usage
5
5
 
6
6
  ### Within a standalone component
7
- To use list in a standalone component, import it directly into your custom component:
7
+ To use list in a standalone component, import `DAFF_LIST_COMPONENTS` directly into your custom component:
8
8
 
9
9
  ```ts
10
+ import { DAFF_LIST_COMPONENTS } from '@daffodil/design/list';
11
+
10
12
  @Component({
11
13
  selector: 'custom-component',
12
14
  templateUrl: './custom-component.component.html',
13
- standalone: true,
14
15
  imports: [
15
16
  DAFF_LIST_COMPONENTS,
16
17
  ],
@@ -23,8 +24,8 @@ To use list in a module, import `DaffListModule` into your custom module:
23
24
 
24
25
  ```ts
25
26
  import { NgModule } from '@angular/core';
26
-
27
27
  import { DaffListModule } from '@daffodil/design/list';
28
+ import { CustomComponent } from './custom.component';
28
29
 
29
30
  @NgModule({
30
31
  declarations: [
package/list/list.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  import { DaffPrefixSuffixModule } from '@daffodil/design';
2
2
  import { DaffListComponent } from './list/list.component';
3
3
  import { DaffListItemComponent } from './list-item/list-item.component';
4
+ /**
5
+ * @docs-private
6
+ */
4
7
  export declare const DAFF_LIST_COMPONENTS: readonly [typeof DaffListComponent, typeof DaffListItemComponent, typeof DaffPrefixSuffixModule];
@@ -7,13 +7,14 @@ Loading icons are used to indicate to users that an event is ocurring and is sti
7
7
  ## Usage
8
8
 
9
9
  ### Within a standalone component
10
- To use loading icon in a standalone component, import it directly into your custom component:
10
+ To use loading icon in a standalone component, import `DAFF_LOADING_ICON_COMPONENTS` directly into your custom component:
11
11
 
12
12
  ```ts
13
+ import { DAFF_LOADING_ICON_COMPONENTS } from '@daffodil/design/loading-icon';
14
+
13
15
  @Component({
14
16
  selector: 'custom-component',
15
17
  templateUrl: './custom-component.component.html',
16
- standalone: true,
17
18
  imports: [
18
19
  DAFF_LOADING_ICON_COMPONENTS,
19
20
  ],
@@ -26,8 +27,8 @@ To use loading icon in a module, import `DaffLoadingIconModule` into your custom
26
27
 
27
28
  ```ts
28
29
  import { NgModule } from '@angular/core';
29
-
30
30
  import { DaffLoadingIconModule } from '@daffodil/design/loading-icon';
31
+ import { CustomComponent } from './custom.component';
31
32
 
32
33
  @NgModule({
33
34
  declarations: [
@@ -45,12 +46,14 @@ export class CustomComponentModule { }
45
46
 
46
47
  > This method is deprecated. It's recommended to update all custom components to standalone.
47
48
 
48
- ## Theming
49
- The loading icon color is defined by using the `color` property. By default, the color is set to `primary`. This can be changed to one of the supported colors.
49
+ ## Colors
50
+ Use the `color` property to change the color of a loading icon. The default color is gray.
50
51
 
51
- Supported colors: `primary | secondary | tertiary | black | white | theme | theme-contrast`
52
+ > `theme` and `white` should be used on a darker background in order to have sufficient contrast.
52
53
 
53
54
  <design-land-example-viewer-container example="loading-icon-color"></design-land-example-viewer-container>
54
55
 
55
56
  ## Accessibility
56
- Loading icons should be given meaningful labels by using `aria-label` or `aria-labelledby`. Additionally, if a loading icon is used to indicate a process in progress, using [aria-live](https://www.w3.org/TR/wai-aria-1.0/states_and_properties#aria-live) and [aria-busy](https://www.w3.org/TR/wai-aria-1.0/states_and_properties#aria-busy") should be strongly considered.
57
+ Loading icons should be given meaningful labels by using `aria-label` or `aria-labelledby`.
58
+
59
+ If a loading icon is used to indicate a process in progress, using [aria-live](https://www.w3.org/TR/wai-aria-1.0/states_and_properties#aria-live) and [aria-busy](https://www.w3.org/TR/wai-aria-1.0/states_and_properties#aria-busy") should be strongly considered.
@@ -1,2 +1,5 @@
1
1
  import { DaffLoadingIconComponent } from './loading-icon/loading-icon.component';
2
+ /**
3
+ * @docs-private
4
+ */
2
5
  export declare const DAFF_LOADING_ICON_COMPONENTS: readonly [typeof DaffLoadingIconComponent];
@@ -2,6 +2,26 @@
2
2
  @use '../../scss/core';
3
3
  @use '../../scss/theming';
4
4
 
5
+ @mixin daff-loading-icon-light-variant($loader-color) {
6
+ .daff-loading-icon__loader {
7
+ stroke: $loader-color;
8
+ }
9
+
10
+ .daff-loading-icon__bg {
11
+ stroke: rgba($loader-color, 0.1);
12
+ }
13
+ }
14
+
15
+ @mixin daff-loading-icon-dark-variant($loader-color) {
16
+ .daff-loading-icon__loader {
17
+ stroke: $loader-color;
18
+ }
19
+
20
+ .daff-loading-icon__bg {
21
+ stroke: rgba($loader-color, 0.3);
22
+ }
23
+ }
24
+
5
25
  @mixin daff-loading-icon-theme($theme) {
6
26
  $primary: core.daff-map-get($theme, primary);
7
27
  $secondary: core.daff-map-get($theme, secondary);
@@ -10,67 +30,75 @@
10
30
  $base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
11
31
  $white: core.daff-map-get($theme, 'core', 'white');
12
32
  $black: core.daff-map-get($theme, 'core', 'black');
33
+ $neutral: core.daff-map-get($theme, 'core', 'neutral');
34
+ $type: core.daff-map-get($theme, 'core', 'type');
13
35
 
14
36
  .daff-loading-icon {
15
- &__loader {
16
- stroke: currentColor;
17
- }
37
+ @include theming.light($type) {
38
+ @include daff-loading-icon-light-variant(
39
+ theming.daff-color($neutral, 60)
40
+ );
18
41
 
19
- &__bg {
20
- stroke: rgba($black, 0.08);
21
- }
42
+ &.daff-primary {
43
+ @include daff-loading-icon-light-variant(theming.daff-color($primary));
44
+ }
22
45
 
23
- &.daff-primary {
24
- .daff-loading-icon__loader {
25
- stroke: theming.daff-color($primary);
46
+ &.daff-secondary {
47
+ @include daff-loading-icon-light-variant(
48
+ theming.daff-color($secondary)
49
+ );
26
50
  }
27
51
 
28
- .daff-loading-icon__bg {
29
- stroke: rgba(theming.daff-color($primary), 0.08);
52
+ &.daff-tertiary {
53
+ @include daff-loading-icon-light-variant(theming.daff-color($tertiary));
30
54
  }
31
- }
32
55
 
33
- &.daff-secondary {
34
- .daff-loading-icon__loader {
35
- stroke: theming.daff-color($secondary);
56
+ &.daff-theme {
57
+ @include daff-loading-icon-light-variant($base);
36
58
  }
37
59
 
38
- .daff-loading-icon__bg {
39
- stroke: rgba(theming.daff-color($secondary), 0.08);
60
+ &.daff-theme-contrast {
61
+ @include daff-loading-icon-light-variant($base-contrast);
40
62
  }
41
- }
42
63
 
43
- &.daff-tertiary {
44
- .daff-loading-icon__loader {
45
- stroke: theming.daff-color($tertiary);
64
+ &.daff-black {
65
+ @include daff-loading-icon-light-variant($black);
46
66
  }
47
67
 
48
- .daff-loading-icon__bg {
49
- stroke: rgba(theming.daff-color($tertiary), 0.08);
68
+ &.daff-white {
69
+ @include daff-loading-icon-light-variant($white);
50
70
  }
51
71
  }
52
72
 
53
- &.daff-theme {
54
- .daff-loading-icon__loader {
55
- stroke: $base;
73
+ @include theming.dark($type) {
74
+ @include daff-loading-icon-dark-variant(theming.daff-color($neutral, 40));
75
+
76
+ &.daff-primary {
77
+ @include daff-loading-icon-dark-variant(theming.daff-color($primary));
56
78
  }
57
- }
58
79
 
59
- &.daff-theme-contrast {
60
- .daff-loading-icon__loader {
61
- stroke: $base-contrast;
80
+ &.daff-secondary {
81
+ @include daff-loading-icon-dark-variant(theming.daff-color($secondary));
62
82
  }
63
- }
64
83
 
65
- &.daff-black {
66
- .daff-loading-icon__loader {
67
- stroke: $black;
84
+ &.daff-tertiary {
85
+ @include daff-loading-icon-dark-variant(theming.daff-color($tertiary));
86
+ }
87
+
88
+ &.daff-theme {
89
+ @include daff-loading-icon-dark-variant($base);
90
+ }
91
+
92
+ &.daff-theme-contrast {
93
+ @include daff-loading-icon-dark-variant($base-contrast);
94
+ }
95
+
96
+ &.daff-black {
97
+ @include daff-loading-icon-dark-variant($black);
68
98
  }
69
- }
70
99
 
71
- &.daff-white {
72
- .daff-loading-icon__loader {
73
- stroke: $white;
100
+ &.daff-white {
101
+ @include daff-loading-icon-dark-variant($white);
74
102
  }
75
103
  }
76
104
  }
@@ -1,4 +1,4 @@
1
- # Media Gallery
1
+ # Media gallery
2
2
  Media gallery is used to display a group of thumbnails in a gallery format.
3
3
 
4
4
  ## Overview
@@ -7,13 +7,14 @@ Media galleries are useful to showcase multiple images related to a single produ
7
7
  ## Usage
8
8
 
9
9
  ### Within a standalone component
10
- To use media gallery in a standalone component, import it directly into your custom component:
10
+ To use media gallery in a standalone component, import `DAFF_MEDIA_GALLERY_COMPONENTS` directly into your custom component:
11
11
 
12
12
  ```ts
13
+ import { DAFF_MEDIA_GALLERY_COMPONENTS } from '@daffodil/design/media-gallery';
14
+
13
15
  @Component({
14
16
  selector: 'custom-component',
15
17
  templateUrl: './custom-component.component.html',
16
- standalone: true,
17
18
  imports: [
18
19
  DAFF_MEDIA_GALLERY_COMPONENTS,
19
20
  ],
@@ -26,8 +27,8 @@ To use media gallery in a module, import `DaffMediaGalleryModule` into your cust
26
27
 
27
28
  ```ts
28
29
  import { NgModule } from '@angular/core';
29
-
30
30
  import { DaffMediaGalleryModule } from '@daffodil/design/media-gallery';
31
+ import { CustomComponent } from './custom.component';
31
32
 
32
33
  @NgModule({
33
34
  declarations: [
@@ -46,18 +47,26 @@ export class CustomComponentModule { }
46
47
  > This method is deprecated. It's recommended to update all custom components to standalone.
47
48
 
48
49
  ## Thumbnail
49
- `[daffThumbnail]` should be used as a directive with `<daff-image>`. [View Image Documentation](/libs/design/image/README.md)
50
+ `[daffThumbnail]` is a **structural** directive that can be used with any component that you would like to render inside your media gallery. You can set a value for the image for your element like:
51
+
52
+ ```html
53
+ <daff-media-gallery>
54
+ <ng-template daffThumbnail thumbnailSrc="/thumbnail-path.jpg" label="Your description">
55
+ <daff-image src="/image-path.jpg" alt="Your description" width="100" height="100"></daff-image>
56
+ </ng-template>
57
+ </daff-media-gallery>
58
+ ```
50
59
 
51
- It should never be used as a standalone component. The first thumbnail is selected by default and dynamically rendered as the primary image by utilizing the `<daff-media-renderer>` component. The selected thumbnail can be controlled by the enduser, and the position of the list of thumbnails is dependent on the screen size.
60
+ It should never be used as a standalone component. The first thumbnail is selected by default and dynamically rendered as the primary image. The selected thumbnail can be controlled by the user, and the position of the list of thumbnails is dependent on the screen size.
52
61
 
53
62
  <design-land-example-viewer-container example="basic-media-gallery"></design-land-example-viewer-container>
54
63
 
55
- ## Image Aspect Ratio
56
- It's recommended to utilize the same aspect ratio for all images in the same media gallery. Otherwise, the height and width of the media gallery may change with every different aspect ratio presented by the selected thumbnail as show in the example.
64
+ ## Image aspect ratio
65
+ It's recommended to utilize the same aspect ratio for all images in the same media gallery. Otherwise, the height and width of the media gallery may change with every different aspect ratio presented by the selected thumbnail as shown in the example.
57
66
 
58
- The thumbnail dimension is set to `80x80` pixels, so the recommended aspect ratio is `1:1`. However, it is not required since the thumbnail will horizontally and vertically center align images within a thumbnail.
67
+ The thumbnail dimension is set to a square, so the recommended aspect ratio is `1:1`. However, it is not required since the thumbnail will horizontally and vertically center align images within a thumbnail.
59
68
 
60
69
  <design-land-example-viewer-container example="mismatched-sizes-media-gallery"></design-land-example-viewer-container>
61
70
 
62
71
  ## Accessibility
63
- Accessibility considerations for media gallery is handled by the `DaffImageComponent`. The `alt` attribute must be defined in `<daff-image>`. It specifies an alternate text for an image. An error will appear if it's not defined. This is important because it allows screen readers to describe what's in the image for visually impaired people. [View Image Documentation](/libs/design/image/README.md)
72
+ Accessibility considerations for media gallery is handled by the `DaffImageComponent`. The `alt` attribute must be defined in `<daff-image>`. It specifies an alternate text for an image. An error will appear if it's not defined. This is important because it allows screen readers to describe what's in the image for visually impaired people. See [Image](/libs/design/image/README.md) for more information.
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class IteratedMediaGalleryComponent {
3
+ elements: {
4
+ type: string;
5
+ src: string;
6
+ thumbnail: string;
7
+ alt: string;
8
+ width: number;
9
+ height: number;
10
+ }[];
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<IteratedMediaGalleryComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<IteratedMediaGalleryComponent, "iterated-media-gallery", never, {}, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class MediaGalleryWithVideoComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<MediaGalleryWithVideoComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<MediaGalleryWithVideoComponent, "media-gallery-with-video", never, {}, {}, never, never, true, never>;
5
+ }
@@ -2,3 +2,5 @@ export { MEDIA_GALLERY_EXAMPLES } from './examples';
2
2
  export { BasicMediaGalleryComponent } from './basic-media-gallery/basic-media-gallery.component';
3
3
  export { MismatchedSizesMediaGalleryComponent } from './mismatched-sizes-media-gallery/mismatched-sizes-media-gallery.component';
4
4
  export { SkeletonMediaGalleryComponent } from './skeleton-media-gallery/skeleton-media-gallery.component';
5
+ export { IteratedMediaGalleryComponent } from './iterated-media-gallery/iterated-media-gallery.component';
6
+ export { MediaGalleryWithVideoComponent } from './media-gallery-with-video/media-gallery-with-video.component';
@@ -1,3 +1,3 @@
1
1
  export interface DaffMediaGalleryRegistration {
2
- name: string;
2
+ id: string;
3
3
  }
@@ -1,21 +1,99 @@
1
- import { OnInit, OnDestroy } from '@angular/core';
1
+ import { EventEmitter, Signal } from '@angular/core';
2
+ import { DaffSkeletonableDirective } from '@daffodil/design';
2
3
  import { DaffMediaGalleryRegistration } from '../helpers/media-gallery-registration.interface';
3
- import { DaffMediaGalleryRegistry } from '../registry/media-gallery.registry';
4
+ import { DaffThumbnailDirective } from '../thumbnail/thumbnail.directive';
4
5
  import * as i0 from "@angular/core";
5
6
  import * as i1 from "@daffodil/design";
6
- export declare class DaffMediaGalleryComponent implements DaffMediaGalleryRegistration, OnInit, OnDestroy {
7
- private registry;
7
+ /**
8
+ * The `DaffMediaGalleryComonent` is used to display a group of thumbnails in a gallery format.
9
+ *
10
+ * ```html
11
+ * <daff-media-gallery>
12
+ * <ng-template daffThumbnail thumbnailSrc="/thumbnail-path.jpg" label="Your description">
13
+ * <daff-image src="/image-path.jpg" alt="Your description" width="100" height="100"></daff-image>
14
+ * </ng-template>
15
+ * </daff-media-gallery>
16
+ * ```
17
+ */
18
+ export declare class DaffMediaGalleryComponent implements DaffMediaGalleryRegistration {
19
+ private skeletonDirective;
8
20
  /**
21
+ * @docs-private
22
+ */
23
+ role: string;
24
+ /**
25
+ * The internal ID of the gallery.
26
+ */
27
+ private _id;
28
+ /**
29
+ * Custom ID for the media gallery that overrides the auto-generated one. When using this input, it is your responsibility to ensure that the ID is unique.
30
+ */
31
+ get id(): string | undefined | null;
32
+ set id(val: string | undefined | null);
33
+ /**
34
+ * @docs-private
35
+ *
9
36
  * Adds a class for styling the media gallery
10
37
  */
11
- class: boolean;
38
+ private class;
39
+ /**
40
+ * An event indicating that the selected media gallery element has changed.
41
+ */
42
+ elementChange: EventEmitter<number>;
43
+ /**
44
+ * @docs-private
45
+ */
46
+ _thumbnails: Signal<readonly DaffThumbnailDirective[]>;
47
+ /**
48
+ * @docs-private
49
+ */
50
+ private _thumbnailButtons;
51
+ /**
52
+ * @docs-private
53
+ */
54
+ constructor(skeletonDirective: DaffSkeletonableDirective);
55
+ /**
56
+ * @docs-private
57
+ *
58
+ * Whether or not the component its currently displaying its skeleton state.
59
+ */
60
+ get skeleton(): boolean;
61
+ /**
62
+ * @docs-private
63
+ */
64
+ _selectedThumbnail: Signal<DaffThumbnailDirective>;
65
+ private _selectedIndex;
66
+ private focusSelected;
67
+ /**
68
+ * Select a specific entry in the media gallery by its index.
69
+ *
70
+ * @param index The index to set, starting at 0.
71
+ */
72
+ selectIndex(index: number): void;
73
+ /**
74
+ * Navigate to the next element in the list of thumbnails.
75
+ *
76
+ * @param focus Whether to move focus to the newly selected item.
77
+ */
78
+ next(focus?: boolean): void;
79
+ /**
80
+ * Navigate to the previous element in the list of thumbnails.
81
+ *
82
+ * @param focus Whether to move focus to the newly selected item.
83
+ */
84
+ previous(focus?: boolean): void;
85
+ /**
86
+ * Select the first element.
87
+ *
88
+ * @param focus Whether to move focus to the newly selected item.
89
+ */
90
+ selectFirst(focus?: boolean): void;
12
91
  /**
13
- * The name of the gallery
92
+ * Select the last element of the gallery.
93
+ *
94
+ * @param Whether to move focus to the newly selected item.
14
95
  */
15
- name: string;
16
- constructor(registry: DaffMediaGalleryRegistry);
17
- ngOnInit(): void;
18
- ngOnDestroy(): void;
96
+ selectLast(focus?: boolean): void;
19
97
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffMediaGalleryComponent, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<DaffMediaGalleryComponent, "daff-media-gallery", never, { "name": { "alias": "name"; "required": false; }; }, {}, never, ["[daffThumbnail]"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DaffSkeletonableDirective; inputs: { "skeleton": "skeleton"; }; outputs: {}; }]>;
98
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffMediaGalleryComponent, "daff-media-gallery", never, { "id": { "alias": "id"; "required": false; }; }, { "elementChange": "elementChange"; }, ["_thumbnails"], ["*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DaffSkeletonableDirective; inputs: { "skeleton": "skeleton"; }; outputs: {}; }]>;
21
99
  }
@@ -1,4 +1,6 @@
1
1
  import { DaffMediaGalleryComponent } from './media-gallery/media-gallery.component';
2
- import { DaffMediaRendererComponent } from './media-renderer/media-renderer.component';
3
2
  import { DaffThumbnailDirective } from './thumbnail/thumbnail.directive';
4
- export declare const DAFF_MEDIA_GALLERY_COMPONENTS: readonly [typeof DaffMediaGalleryComponent, typeof DaffThumbnailDirective, typeof DaffMediaRendererComponent];
3
+ /**
4
+ * @docs-private
5
+ */
6
+ export declare const DAFF_MEDIA_GALLERY_COMPONENTS: readonly [typeof DaffMediaGalleryComponent, typeof DaffThumbnailDirective];
@@ -2,12 +2,11 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "@angular/common";
3
3
  import * as i2 from "./media-gallery/media-gallery.component";
4
4
  import * as i3 from "./thumbnail/thumbnail.directive";
5
- import * as i4 from "./media-renderer/media-renderer.component";
6
5
  /**
7
6
  * @deprecated in favor of {@link DAFF_MEDIA_GALLERY_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
8
7
  */
9
8
  export declare class DaffMediaGalleryModule {
10
9
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffMediaGalleryModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffMediaGalleryModule, never, [typeof i1.CommonModule, typeof i2.DaffMediaGalleryComponent, typeof i3.DaffThumbnailDirective, typeof i4.DaffMediaRendererComponent], [typeof i2.DaffMediaGalleryComponent, typeof i3.DaffThumbnailDirective]>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffMediaGalleryModule, never, [typeof i1.CommonModule, typeof i2.DaffMediaGalleryComponent, typeof i3.DaffThumbnailDirective], [typeof i2.DaffMediaGalleryComponent, typeof i3.DaffThumbnailDirective]>;
12
11
  static ɵinj: i0.ɵɵInjectorDeclaration<DaffMediaGalleryModule>;
13
12
  }
@@ -1,5 +1,4 @@
1
- export * from './media-gallery/media-gallery.component';
2
- export * from './media-gallery.module';
3
- export * from './thumbnail/thumbnail.directive';
4
- export { daffThumbnailCompatToken } from './thumbnail/thumbnail-compat.token';
1
+ export { DaffMediaGalleryComponent } from './media-gallery/media-gallery.component';
2
+ export { DaffMediaGalleryModule } from './media-gallery.module';
3
+ export { DaffThumbnailDirective } from './thumbnail/thumbnail.directive';
5
4
  export { DAFF_MEDIA_GALLERY_COMPONENTS } from './media-gallery';