@daffodil/design 0.87.2 → 0.88.1

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 (215) hide show
  1. package/accordion/accordion/accordion-item/accordion-item.component.d.ts +1 -9
  2. package/accordion/accordion/accordion-item-title/accordion-item-title.directive.d.ts +0 -4
  3. package/article/article/article.component.d.ts +0 -8
  4. package/article/article-meta/article-meta.directive.d.ts +0 -4
  5. package/atoms/form/form-field/form-field/form-field.component.d.ts +3 -2
  6. package/atoms/form/form-field/form-field-control.d.ts +3 -1
  7. package/atoms/form/native-select/native-select.component.d.ts +11 -0
  8. package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +0 -4
  9. package/breadcrumb/breadcrumb-item/breadcrumb-item.directive.d.ts +0 -12
  10. package/button/button/basic/button.component.d.ts +0 -4
  11. package/button/button/button-base.directive.d.ts +0 -18
  12. package/button/button/flat/flat.component.d.ts +0 -4
  13. package/button/button/icon/icon.component.d.ts +0 -4
  14. package/button/button/stroked/stroked.component.d.ts +0 -4
  15. package/button/button/underline/underline.component.d.ts +0 -4
  16. package/button/src/button/button-base.scss +3 -3
  17. package/callout/README.md +38 -40
  18. package/callout/callout/callout.component.d.ts +13 -5
  19. package/callout/callout-body/callout-body.directive.d.ts +9 -4
  20. package/callout/callout-icon/callout-icon.directive.d.ts +9 -4
  21. package/callout/callout-subtitle/callout-subtitle.directive.d.ts +8 -4
  22. package/callout/callout-tagline/callout-tagline.directive.d.ts +8 -4
  23. package/callout/callout-title/callout-title.directive.d.ts +8 -4
  24. package/card/README.md +52 -44
  25. package/card/card/basic/basic.component.d.ts +18 -4
  26. package/card/card/raised/raised.component.d.ts +3 -4
  27. package/card/card/stroked/stroked.component.d.ts +18 -4
  28. package/card/card-actions/card-actions.directive.d.ts +8 -4
  29. package/card/card-base.directive.d.ts +8 -16
  30. package/card/card-content/card-content.directive.d.ts +9 -4
  31. package/card/card-icon/card-icon.directive.d.ts +8 -4
  32. package/card/card-image/card-image.directive.d.ts +8 -4
  33. package/card/card-tagline/card-tagline.directive.d.ts +8 -4
  34. package/card/card-title/card-title.directive.d.ts +8 -4
  35. package/card/card.d.ts +1 -0
  36. package/card/examples/elevated-card/elevated-card.component.d.ts +5 -0
  37. package/card/examples/public_api.d.ts +3 -3
  38. package/card/helpers/card-orientation.d.ts +17 -0
  39. package/card/public_api.d.ts +9 -8
  40. package/card/src/card-base-theme.scss +40 -58
  41. package/container/container/container.component.d.ts +0 -4
  42. package/core/public_api.d.ts +1 -0
  43. package/core/sticky/public_api.d.ts +1 -0
  44. package/core/sticky/sticky-tracker.directive.d.ts +23 -0
  45. package/fesm2022/daffodil-design-accordion.mjs +13 -55
  46. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  47. package/fesm2022/daffodil-design-article.mjs +14 -32
  48. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  49. package/fesm2022/daffodil-design-breadcrumb.mjs +15 -38
  50. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  51. package/fesm2022/daffodil-design-button.mjs +41 -108
  52. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  53. package/fesm2022/daffodil-design-callout.mjs +91 -73
  54. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  55. package/fesm2022/daffodil-design-card-examples.mjs +17 -32
  56. package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
  57. package/fesm2022/daffodil-design-card.mjs +167 -145
  58. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  59. package/fesm2022/daffodil-design-container.mjs +7 -13
  60. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  61. package/fesm2022/daffodil-design-form-field-examples.mjs +7 -7
  62. package/fesm2022/daffodil-design-form-field-examples.mjs.map +1 -1
  63. package/fesm2022/daffodil-design-hero-examples.mjs +18 -1
  64. package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
  65. package/fesm2022/daffodil-design-hero.mjs +102 -71
  66. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  67. package/fesm2022/daffodil-design-image.mjs +5 -12
  68. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  69. package/fesm2022/daffodil-design-input-examples.mjs +6 -6
  70. package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
  71. package/fesm2022/daffodil-design-input.mjs +60 -35
  72. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  73. package/fesm2022/daffodil-design-list-examples.mjs +14 -10
  74. package/fesm2022/daffodil-design-list-examples.mjs.map +1 -1
  75. package/fesm2022/daffodil-design-list.mjs +111 -98
  76. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  77. package/fesm2022/daffodil-design-media-gallery.mjs +7 -17
  78. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  79. package/fesm2022/daffodil-design-menu.mjs +26 -63
  80. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  81. package/fesm2022/daffodil-design-modal.mjs +63 -130
  82. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  83. package/fesm2022/daffodil-design-navbar.mjs +7 -20
  84. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  85. package/fesm2022/daffodil-design-notification-examples.mjs +16 -41
  86. package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
  87. package/fesm2022/daffodil-design-notification.mjs +112 -116
  88. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  89. package/fesm2022/daffodil-design-paginator.mjs +8 -21
  90. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  91. package/fesm2022/daffodil-design-progress-bar-examples.mjs +6 -6
  92. package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
  93. package/fesm2022/daffodil-design-progress-bar.mjs +74 -115
  94. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  95. package/fesm2022/daffodil-design-quantity-field.mjs +11 -3
  96. package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
  97. package/fesm2022/daffodil-design-select-examples.mjs +4 -4
  98. package/fesm2022/daffodil-design-select-examples.mjs.map +1 -1
  99. package/fesm2022/daffodil-design-select.mjs +50 -117
  100. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  101. package/fesm2022/daffodil-design-sidebar-examples.mjs +29 -3
  102. package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
  103. package/fesm2022/daffodil-design-sidebar.mjs +39 -78
  104. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  105. package/fesm2022/daffodil-design-sticky-examples.mjs +25 -0
  106. package/fesm2022/daffodil-design-sticky-examples.mjs.map +1 -0
  107. package/fesm2022/daffodil-design-tabs.mjs +54 -131
  108. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  109. package/fesm2022/daffodil-design-text-snippet.mjs +17 -8
  110. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  111. package/fesm2022/daffodil-design-textarea-examples.mjs +3 -3
  112. package/fesm2022/daffodil-design-textarea-examples.mjs.map +1 -1
  113. package/fesm2022/daffodil-design-textarea.mjs +49 -25
  114. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  115. package/fesm2022/daffodil-design-toast.mjs +42 -128
  116. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  117. package/fesm2022/daffodil-design-tree.mjs +26 -70
  118. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  119. package/fesm2022/daffodil-design.mjs +164 -17
  120. package/fesm2022/daffodil-design.mjs.map +1 -1
  121. package/hero/README.md +39 -25
  122. package/hero/examples/basic-hero/basic-hero.component.d.ts +6 -0
  123. package/hero/examples/public_api.d.ts +1 -0
  124. package/hero/hero/hero.component.d.ts +21 -4
  125. package/hero/hero-body/hero-body.directive.d.ts +10 -4
  126. package/hero/hero-icon/hero-icon.directive.d.ts +10 -4
  127. package/hero/hero-subtitle/hero-subtitle.directive.d.ts +8 -4
  128. package/hero/hero-tagline/hero-tagline.directive.d.ts +8 -4
  129. package/hero/hero-title/hero-title.directive.d.ts +8 -4
  130. package/image/image/image.component.d.ts +0 -4
  131. package/input/input.component.d.ts +29 -9
  132. package/list/README.md +43 -13
  133. package/list/examples/multiline-list/multiline-list.component.d.ts +1 -0
  134. package/list/list/list.component.d.ts +12 -24
  135. package/list/list-item/list-item.component.d.ts +13 -20
  136. package/list/list-item-title/list-item-title.directive.d.ts +13 -0
  137. package/list/list.d.ts +8 -2
  138. package/list/list.module.d.ts +4 -3
  139. package/list/nav-list/nav-list.component.d.ts +17 -0
  140. package/list/public_api.d.ts +5 -2
  141. package/list/src/list-base.scss +40 -0
  142. package/list/src/list-theme.scss +5 -0
  143. package/media-gallery/media-gallery/media-gallery.component.d.ts +0 -6
  144. package/menu/menu/menu.component.d.ts +0 -12
  145. package/menu/menu-activator/menu-activator.component.d.ts +4 -5
  146. package/menu/menu-item/menu-item.component.d.ts +0 -10
  147. package/modal/modal/modal.component.d.ts +12 -33
  148. package/modal/modal-actions/modal-actions.component.d.ts +0 -4
  149. package/modal/modal-close/modal-close.directive.d.ts +1 -8
  150. package/modal/modal-content/modal-content.component.d.ts +0 -4
  151. package/modal/modal-header/modal-header.component.d.ts +0 -4
  152. package/modal/modal-title/modal-title.directive.d.ts +0 -11
  153. package/navbar/navbar/navbar.component.d.ts +0 -8
  154. package/navbar/src/navbar-theme.scss +2 -1
  155. package/notification/README.md +39 -24
  156. package/notification/examples/default-notification/default-notification.component.d.ts +0 -2
  157. package/notification/examples/public_api.d.ts +1 -5
  158. package/notification/helpers/notification-orientation.d.ts +17 -0
  159. package/notification/notification/notification.component.d.ts +39 -23
  160. package/notification/notification-actions/notification-actions.directive.d.ts +11 -4
  161. package/notification/notification-message/notification-message.directive.d.ts +9 -4
  162. package/notification/notification-subtitle/notification-subtitle.directive.d.ts +3 -4
  163. package/notification/notification-title/notification-title.directive.d.ts +8 -4
  164. package/notification/public_api.d.ts +6 -5
  165. package/package.json +1 -1
  166. package/paginator/paginator/paginator.component.d.ts +0 -11
  167. package/progress-bar/README.md +31 -8
  168. package/progress-bar/progress-bar-label/progress-bar-label.directive.d.ts +9 -5
  169. package/progress-bar/progress-bar.component.d.ts +39 -35
  170. package/progress-bar/public_api.d.ts +2 -2
  171. package/quantity-field/quantity-field.component.d.ts +10 -0
  172. package/scss/global.scss +0 -1
  173. package/select/select/select.component.d.ts +13 -25
  174. package/select/select.d.ts +1 -2
  175. package/sidebar/README.md +67 -72
  176. package/sidebar/examples/over-and-under-sidebars/over-and-under-sidebars.component.d.ts +0 -1
  177. package/sidebar/examples/sidebar-sides/sidebar-sides.component.d.ts +11 -0
  178. package/sidebar/sidebar/sidebar.component.d.ts +0 -9
  179. package/sidebar/sidebar-footer/sidebar-footer.component.d.ts +0 -4
  180. package/sidebar/sidebar-header/sidebar-header-action/sidebar-header-action.directive.d.ts +3 -0
  181. package/sidebar/sidebar-header/sidebar-header.component.d.ts +0 -4
  182. package/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +0 -17
  183. package/sticky/examples/basic-sticky/basic-sticky.component.d.ts +5 -0
  184. package/sticky/examples/index.d.ts +1 -0
  185. package/sticky/examples/public_api.d.ts +2 -0
  186. package/tabs/README.md +38 -14
  187. package/tabs/tabs/tab/tab.component.d.ts +4 -16
  188. package/tabs/tabs/tab-activator/tab-activator.component.d.ts +6 -27
  189. package/tabs/tabs/tab-label/tab-label.component.d.ts +5 -2
  190. package/tabs/tabs/tab-panel/tab-panel.component.d.ts +7 -24
  191. package/tabs/tabs/tabs.component.d.ts +5 -11
  192. package/text-snippet/README.md +31 -3
  193. package/text-snippet/text-snippet.component.d.ts +17 -2
  194. package/textarea/textarea.component.d.ts +25 -5
  195. package/toast/README.md +47 -21
  196. package/toast/interfaces/toast-action.d.ts +4 -5
  197. package/toast/interfaces/toast-options.d.ts +3 -1
  198. package/toast/interfaces/toast.d.ts +22 -7
  199. package/toast/service/toast.service.d.ts +3 -3
  200. package/toast/toast/toast-config.d.ts +7 -3
  201. package/toast/toast/toast-template.component.d.ts +1 -1
  202. package/toast/toast/toast.component.d.ts +0 -2
  203. package/toast/toast-actions/toast-actions.directive.d.ts +0 -4
  204. package/toast/toast-message/toast-message.directive.d.ts +0 -4
  205. package/toast/toast-title/toast-title.directive.d.ts +0 -4
  206. package/tree/tree/tree.component.d.ts +0 -6
  207. package/tree/tree-item/tree-item.directive.d.ts +7 -35
  208. package/accordion/accordion/animation/accordion-animation-state.d.ts +0 -1
  209. package/accordion/accordion/animation/accordion-animation.d.ts +0 -4
  210. package/card/examples/raised-card/raised-card.component.d.ts +0 -11
  211. package/notification/examples/notification-with-actions/notification-with-actions.component.d.ts +0 -8
  212. package/progress-bar/animation/progress-bar-animation.d.ts +0 -4
  213. package/select/animation/select-animation-state.d.ts +0 -7
  214. package/select/animation/select-animation.d.ts +0 -4
  215. package/select/animation/state.enum.d.ts +0 -4
package/hero/README.md CHANGED
@@ -1,13 +1,15 @@
1
1
  # Hero
2
- Hero is a top level container that is large and captivating. It should only be used once as the first container on any given page.
2
+ Hero is a top level container designed to be large and captivating. It should be used only once per page, typically as the first component to introduce the page’s main purpose or message.
3
3
 
4
4
  ## Overview
5
- Heros are the first thing users see on a page and are designed to catch their attention. It's a flexible and extensible component that includes pre-styled content containers.
5
+ Heroes are the first visual element users see on a page and are intended to make a bold statement. They are flexible and extensible, and include pre-styled content containers for common layouts such as titles, subtitles, taglines, and body content.
6
+
7
+ <design-land-example-viewer-container example="basic-hero"></design-land-example-viewer-container>
6
8
 
7
9
  ## Usage
8
10
 
9
11
  ### Within a standalone component
10
- To use hero in a standalone component, import `DAFF_HERO_COMPONENTS` directly into your custom component:
12
+ To use the hero components, import `DAFF_HERO_COMPONENTS` directly into your custom component:
11
13
 
12
14
  ```ts
13
15
  import { DAFF_HERO_COMPONENTS } from '@daffodil/design/hero';
@@ -46,45 +48,57 @@ export class CustomComponentModule { }
46
48
 
47
49
  > This method is deprecated. It's recommended to update all custom components to standalone.
48
50
 
49
- ## Supported Content Types
50
- A `daff-hero` supports transclusion of any content and includes stylized `icon`, `tagline`, `title`, `subtitle`, and `body` content containers.
51
+ ## Anatomy
52
+ A `<daff-hero>` is composed of the following containers, rendered in the order listed:
51
53
 
52
- ### Icon
53
- `[DaffHeroIcon]` is intended for visual or branding reinforcement. It should not be used for actionable icons.
54
+ **Icon**\
55
+ Used to display a visual or branding element. Use the `[daffHeroIcon]` selector. Avoid using this for interactive or actionable icons.
54
56
 
55
- ### Tagline
56
- Hero taglines are used by adding `[daffHeroTagline]` to a `<p>` tag. It's intended to supplement the title by providing a short, memorable description.
57
+ **Tagline**\
58
+ A short, memorable phrase that complements the title and provides quick context. Use the `[daffHeroTagline]` selector.
57
59
 
58
60
  ### Title
59
- Hero titles are used by adding `[daffHeroTitle]` to a `<h1>` tag.
61
+ The primary heading for the hero. Use the `[daffHeroTitle]` selector along with an `<h1>`.
60
62
 
61
63
  ### Subtitle
62
- Hero subtitles are used by adding `[daffHeroSubtitle]` to a `<h2>` tag.
64
+ A secondary descriptive text displayed beneath the title. Use the `[daffHeroSubtitle]` selector.
63
65
 
64
66
  ### Body
65
- `[daffHeroBody]` is a wrapper container that can be used to place all additional components and content within a `<daff-hero>` and should only be used once. The body container allows for a ton of control and customization because it's not affected by any of hero's properties and only serves as a wrapping and spacing container.
66
-
67
- ## Theming
68
- The default background color of a hero is light gray, but it can be updated to one of the supported colors by using the `color` property.
67
+ A flexible wrapper for additional components or custom layouts. Use the `[daffHeroBody]` selector. It's unstyled except for spacing, allowing for a ton of control and customization. It should only be used once per hero.
68
+
69
+ ```html
70
+ <daff-hero>
71
+ <div daffHeroIcon>
72
+ <img src="assets/summer-sale-icon.svg" alt="Summer sale icon" />
73
+ </div>
74
+ <div daffHeroTagline>Limited Time Offer</div>
75
+ <h1 daffHeroTitle>Summer Collection Sale</h1>
76
+ <p daffHeroSubtitle>Up to 50% off select items through July 31</p>
77
+ <div daffHeroBody>
78
+ <button daff-button color="secondary">Shop the sale</button>
79
+ <button daff-button color="theme">Learn more</button>
80
+ </div>
81
+ </daff-hero>
82
+ ```
69
83
 
70
- Supported colors: `primary | secondary | tertiary | black | white | theme | theme-contrast`
84
+ ## Colors
85
+ Use the `color` property to change the background of a hero.
71
86
 
72
87
  <design-land-example-viewer-container example="hero-theming"></design-land-example-viewer-container>
73
88
 
74
- ## Text Alignment
75
- Align hero-specific text with the `textAlignment` property. `textAlignment` will not cascade the alignment styles down to `[daffHeroBody]` or any additional components or elements that are placed inside of a hero. `textAlignment` is set to `left` by default.
76
-
77
- Supported alignments: `left | center | right`
89
+ ## Text alignment
90
+ Control hero-specific text alignment with the `textAlignment` property. It defaults to `left` and **does not** affect `[daffHeroBody]` content or nested elements.
78
91
 
79
92
  <design-land-example-viewer-container example="hero-text-alignment"></design-land-example-viewer-container>
80
93
 
81
- ## Compact Heroes
82
- Heroes are available in a `compact` mode, which decreases the overall padding of the hero container to suit UIs that require less negative space. To enable the mode, set the `compact` property on `<daff-hero>`.</p>
94
+ ## Compact
95
+ Use the `compact` property on hero to reduce padding and suit UIs with tighter spacing requirements.
83
96
 
84
97
  <design-land-example-viewer-container example="compact-hero"></design-land-example-viewer-container>
85
98
 
86
- ## Gridded Heroes
87
- Heros are flexible enough to support grids within them.
99
+ ## Examples
100
+
101
+ ### Hero with two columns
102
+ Heroes are flexible enough to support custom grid layouts for more complex arrangements:
88
103
 
89
- ### Hero with Two Columns
90
104
  <design-land-example-viewer-container example="hero-with-grid"></design-land-example-viewer-container>
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class BasicHeroComponent {
3
+ faMobile: import("@fortawesome/fontawesome-common-types").IconDefinition;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<BasicHeroComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<BasicHeroComponent, "basic-hero", never, {}, {}, never, never, true, never>;
6
+ }
@@ -2,4 +2,5 @@ export { HeroThemingComponent } from './hero-theming/hero-theming.component';
2
2
  export { HeroTextAlignmentComponent } from './hero-text-alignment/hero-text-alignment.component';
3
3
  export { HeroWithGridComponent } from './hero-with-grid/hero-with-grid.component';
4
4
  export { CompactHeroComponent } from './compact-hero/compact-hero.component';
5
+ export { BasicHeroComponent } from './basic-hero/basic-hero.component';
5
6
  export { HERO_EXAMPLES } from './examples';
@@ -1,13 +1,30 @@
1
1
  import { DaffTextAlignableDirective } from '@daffodil/design';
2
2
  import * as i0 from "@angular/core";
3
3
  import * as i1 from "@daffodil/design";
4
+ /**
5
+ * Hero is a top level container designed to be large and captivating.
6
+ * It should be used only once per page, typically as the first component
7
+ * to introduce the page’s main purpose or message.
8
+ *
9
+ * @example
10
+ * ```html
11
+ * <daff-hero>
12
+ * <div daffHeroIcon>
13
+ * <img src="assets/summer-sale-icon.svg" alt="Summer sale icon" />
14
+ * </div>
15
+ * <div daffHeroTagline>Limited Time Offer</div>
16
+ * <h1 daffHeroTitle>Summer Collection Sale</h1>
17
+ * <p daffHeroSubtitle>Up to 50% off select items through July 31</p>
18
+ * <div daffHeroBody>
19
+ * <button daff-button color="secondary">Shop the sale</button>
20
+ * <button daff-button color="theme">Learn more</button>
21
+ * </div>
22
+ * </daff-hero>
23
+ * ```
24
+ */
4
25
  export declare class DaffHeroComponent {
5
26
  private textAlignable;
6
27
  constructor(textAlignable: DaffTextAlignableDirective);
7
- /**
8
- * @docs-private
9
- */
10
- class: boolean;
11
28
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffHeroComponent, never>;
12
29
  static ɵcmp: i0.ɵɵComponentDeclaration<DaffHeroComponent, "daff-hero", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DaffManageContainerLayoutDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DaffTextAlignableDirective; inputs: { "textAlignment": "textAlignment"; }; outputs: {}; }, { directive: typeof i1.DaffCompactableDirective; inputs: { "compact": "compact"; }; outputs: {}; }, { directive: typeof i1.DaffColorableDirective; inputs: { "color": "color"; }; outputs: {}; }]>;
13
30
  }
@@ -1,9 +1,15 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * Body is a flexible wrapper for additional components or custom layouts.
4
+ * It's unstyled except for spacing, allowing for a ton of control and customization.
5
+ * It should only be used once per hero.
6
+ *
7
+ * @example
8
+ * ```html
9
+ * <div daffHeroBody>Custom content</div>
10
+ * ```
11
+ */
2
12
  export declare class DaffHeroBodyDirective {
3
- /**
4
- * @docs-private
5
- */
6
- class: boolean;
7
13
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffHeroBodyDirective, never>;
8
14
  static ɵdir: i0.ɵɵDirectiveDeclaration<DaffHeroBodyDirective, "[daffHeroBody]", never, {}, {}, never, never, true, never>;
9
15
  }
@@ -1,9 +1,15 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * Icon is used to display a visual or branding element. Avoid using this for interactive or actionable icons.
4
+ *
5
+ * @example
6
+ * ```html
7
+ * <div daffHeroIcon>
8
+ * <img src="assets/summer-sale-icon.svg" alt="Summer sale icon" />
9
+ </div>
10
+ * ```
11
+ */
2
12
  export declare class DaffHeroIconDirective {
3
- /**
4
- * @docs-private
5
- */
6
- class: boolean;
7
13
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffHeroIconDirective, never>;
8
14
  static ɵdir: i0.ɵɵDirectiveDeclaration<DaffHeroIconDirective, "[daffHeroIcon]", never, {}, {}, never, never, true, never>;
9
15
  }
@@ -1,9 +1,13 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * Subtitle is a secondary descriptive text displayed beneath the title.
4
+ *
5
+ * @example
6
+ * ```html
7
+ * <p daffHeroSubtitle>Up to 50% off select items through July 31</p>
8
+ * ```
9
+ */
2
10
  export declare class DaffHeroSubtitleDirective {
3
- /**
4
- * @docs-private
5
- */
6
- class: boolean;
7
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffHeroSubtitleDirective, never>;
8
12
  static ɵdir: i0.ɵɵDirectiveDeclaration<DaffHeroSubtitleDirective, "[daffHeroSubtitle]", never, {}, {}, never, never, true, never>;
9
13
  }
@@ -1,9 +1,13 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * Tagline is a short, memorable phrase that complements the title and provides quick context.
4
+ *
5
+ * @example
6
+ * ```html
7
+ * <div daffHeroTagline>Limited Time Offer</div>
8
+ * ```
9
+ */
2
10
  export declare class DaffHeroTaglineDirective {
3
- /**
4
- * @docs-private
5
- */
6
- class: boolean;
7
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffHeroTaglineDirective, never>;
8
12
  static ɵdir: i0.ɵɵDirectiveDeclaration<DaffHeroTaglineDirective, "[daffHeroTagline]", never, {}, {}, never, never, true, never>;
9
13
  }
@@ -1,9 +1,13 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * Title is the primary heading for the hero.
4
+ *
5
+ * @example
6
+ * ```html
7
+ * <h1 daffHeroTitle>Summer Collection Sale</h1>
8
+ * ```
9
+ */
2
10
  export declare class DaffHeroTitleDirective {
3
- /**
4
- * @docs-private
5
- */
6
- class: boolean;
7
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffHeroTitleDirective, never>;
8
12
  static ɵdir: i0.ɵɵDirectiveDeclaration<DaffHeroTitleDirective, "[daffHeroTitle]", never, {}, {}, never, never, true, never>;
9
13
  }
@@ -47,10 +47,6 @@ export declare class DaffImageComponent implements OnInit {
47
47
  * The aspect ratio of an image, based on the width and height set by the user.
48
48
  */
49
49
  get _aspectRatio(): SafeStyle;
50
- /**
51
- * @docs-private
52
- */
53
- get maxWidth(): string;
54
50
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffImageComponent, never>;
55
51
  static ɵcmp: i0.ɵɵComponentDeclaration<DaffImageComponent, "daff-image", never, { "src": { "alias": "src"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; }, { "load": "load"; }, never, never, true, [{ directive: typeof i1.DaffSkeletonableDirective; inputs: { "skeleton": "skeleton"; }; outputs: {}; }]>;
56
52
  }
@@ -11,23 +11,43 @@ export declare class DaffInputComponent extends DaffFormFieldControl<string> imp
11
11
  private _elementRef;
12
12
  private formField;
13
13
  /** @docs-private */
14
- class: boolean;
15
- /** @docs-private */
16
14
  controlType: string;
17
- /** @docs-private */
15
+ /**
16
+ * @docs-private
17
+ *
18
+ * Implemented as part of DaffFormFieldControl.
19
+ */
18
20
  focused: boolean;
19
- /** @docs-private */
20
- focus(): void;
21
21
  private get _id();
22
+ /**
23
+ * @docs-private
24
+ *
25
+ * Implemented as part of DaffFormFieldControl.
26
+ */
27
+ disabled: boolean;
22
28
  /**
23
29
  * @docs-private
24
30
  */
25
- get internalId(): string;
31
+ get disabledAttribute(): true;
32
+ private _required;
33
+ /**
34
+ * @docs-private
35
+ *
36
+ * Implemented as part of DaffFormFieldControl.
37
+ */
38
+ get required(): boolean;
39
+ set required(value: boolean);
40
+ /**
41
+ * @docs-private
42
+ */
43
+ get requiredAttribute(): true;
26
44
  /**
27
45
  * @docs-private
28
46
  */
29
47
  get ariaDescribedBy(): string;
30
48
  /** @docs-private */
49
+ focus(): void;
50
+ /** @docs-private */
31
51
  blur(): void;
32
52
  constructor(
33
53
  /** @docs-private */
@@ -35,9 +55,9 @@ export declare class DaffInputComponent extends DaffFormFieldControl<string> imp
35
55
  /** @docs-private */
36
56
  ngOnInit(): void;
37
57
  /** @docs-private */
38
- onFocus(): void;
39
- /** @docs-private */
40
58
  get value(): string;
41
59
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffInputComponent, [{ optional: true; self: true; }, null, { optional: true; }]>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<DaffInputComponent, "input[daff-input]", never, {}, {}, never, ["*"], true, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffInputComponent, "input[daff-input]", never, { "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, {}, never, ["*"], true, never>;
61
+ static ngAcceptInputType_disabled: unknown;
62
+ static ngAcceptInputType_required: unknown;
43
63
  }
package/list/README.md CHANGED
@@ -1,10 +1,22 @@
1
1
  # List
2
- List is a flexible component that can be used to display a series of content. It can be modified to support a range of content types.
2
+ List is a stylized container used to vertically group a series of related content.
3
+
4
+ ## Overview
5
+ List supports two main variants:
6
+
7
+ | Attribute | Description |
8
+ | --------- | ----------- |
9
+ | `daff-list` | A standard list used for grouping generic content. |
10
+ | `daff-nav-list` | A navigation list intended for use with anchor elements (`<a>`). |
3
11
 
4
12
  ## Usage
5
13
 
6
14
  ### Within a standalone component
7
- To use list in a standalone component, import `DAFF_LIST_COMPONENTS` directly into your custom component:
15
+ To use list in a standalone component, import each list type directly into your custom component.
16
+
17
+ Available imports:
18
+ - `DAFF_LIST_COMPONENTS`
19
+ - `DAFF_NAV_LIST_COMPONENTS`
8
20
 
9
21
  ```ts
10
22
  import { DAFF_LIST_COMPONENTS } from '@daffodil/design/list';
@@ -43,22 +55,40 @@ export class CustomComponentModule { }
43
55
 
44
56
  > This method is deprecated. It's recommended to update all custom components to standalone.
45
57
 
46
- ## Basic List
47
- A `<daff-list>` consists of multiple `<daff-list-item>`s.
58
+ ## Anatomy
59
+ A list consists of multiple `daff-list-item` elements.
48
60
 
49
- <design-land-example-viewer-container example="basic-list"></design-land-example-viewer-container>
61
+ ```html
62
+ <daff-list>
63
+ <daff-list-item></daff-list-item>
64
+ <daff-list-item></daff-list-item>
65
+ <daff-list-item></daff-list-item>
66
+ </daff-list>
67
+ ```
50
68
 
51
- ## Navigation List
52
- Use `<daff-nav-list>` for navigation lists. `<daff-list-item>` should be directly added to an anchor tag.
69
+ ```html
70
+ <daff-nav-list>
71
+ <a href="/" daff-list-item></a>
72
+ <a href="/" daff-list-item></a>
73
+ <a href="/" daff-list-item></a>
74
+ </daff-nav-list>
75
+ ```
53
76
 
54
- <design-land-example-viewer-container example="nav-list"></design-land-example-viewer-container>
77
+ ### Icon support
78
+ Use the `[daffPrefix]` directive to display a leading visual icon to a list item.
55
79
 
56
- ## Multi-line List
57
- For lists that have multiple lines per item, wrap each line appropriately with a heading or paragraph tag.
80
+ <design-land-example-viewer-container example="icon-list"></design-land-example-viewer-container>
81
+
82
+ ### Multi-line lists
83
+ For list items that contain multiple lines of text, use the `[daffListItemTitle]` directive to identify the primary title. Additional supporting content can be added using `<div>` or `<p>` elements.
58
84
 
59
85
  <design-land-example-viewer-container example="multiline-list"></design-land-example-viewer-container>
60
86
 
61
- ## List with Icons
62
- To add an icon to a list item, use the `daffPrefix` or `daffSuffix` attributes for the appropriate placements.
87
+ ## Accessibility
88
+ By default, list includes appropriate ARIA roles by default to support screen readers and provide an accessible experience.
63
89
 
64
- <design-land-example-viewer-container example="icon-list"></design-land-example-viewer-container>
90
+ - `<daff-list>` is assigned `role="list"` to identify a list of items.
91
+ - `<daff-list-item>` within a `<daff-list>` is assigned `role="listitem"` to identify a list item contained inside the list.
92
+ - `<daff-nav-list>`is assigned `role="navigation"` to indicate that the list is used for navigation.
93
+
94
+ > Always provide an accessible label for `<daff-nav-list>` via `aria-label` or `aria-labelledby` to describe its purpose (e.g. `"Footer links"` or `"Sidebar links"`).
@@ -1,5 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class MultilineListComponent {
3
+ faInfoCircle: import("@fortawesome/fontawesome-common-types").IconDefinition;
3
4
  static ɵfac: i0.ɵɵFactoryDeclaration<MultilineListComponent, never>;
4
5
  static ɵcmp: i0.ɵɵComponentDeclaration<MultilineListComponent, "multiline-list", never, {}, {}, never, never, true, never>;
5
6
  }
@@ -1,29 +1,17 @@
1
- import { ElementRef } from '@angular/core';
2
1
  import * as i0 from "@angular/core";
3
2
  import * as i1 from "@daffodil/design";
4
- export type DaffListType = 'daff-list' | 'daff-nav-list';
3
+ /**
4
+ * A standard list used for grouping generic content.
5
+ *
6
+ * @example
7
+ * ```html
8
+ * <daff-list>
9
+ * <daff-list-item>List item</daff-list-item>
10
+ * <daff-list-item>List item</daff-list-item>
11
+ * </daff-list>
12
+ * ```
13
+ */
5
14
  export declare class DaffListComponent {
6
- private elementRef;
7
- /**
8
- * @docs-private
9
- */
10
- get list(): boolean;
11
- /**
12
- * @docs-private
13
- */
14
- get listType(): DaffListType;
15
- constructor(elementRef: ElementRef);
16
- /**
17
- * @docs-private
18
- */
19
- get nav(): boolean;
20
- /**
21
- * Sets the role for a `<daff-nav-list>` to navigation.
22
- *
23
- * @docs-private
24
- */
25
- get role(): "navigation" | "list";
26
- private _getHostElement;
27
15
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffListComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<DaffListComponent, "daff-list,daff-nav-list", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }]>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffListComponent, "daff-list", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }]>;
29
17
  }
@@ -1,32 +1,25 @@
1
1
  import { ElementRef } from '@angular/core';
2
- import { DaffPrefixDirective, DaffSuffixDirective } from '@daffodil/design';
2
+ import { DaffPrefixDirective } from '@daffodil/design';
3
3
  import * as i0 from "@angular/core";
4
+ /**
5
+ * Individual items within a list.
6
+ *
7
+ * @example
8
+ * ```html
9
+ * <daff-list-item>Standard list item</daff-list-item>
10
+ * <a href="/" daff-list-item> Linked list item</a>
11
+ * ```
12
+ */
4
13
  export declare class DaffListItemComponent {
5
14
  private elementRef;
6
- /**
7
- * @docs-private
8
- */
9
- class: boolean;
10
- /** Whether or not the header item is active */
15
+ /** Whether an item in a `<daff-nav-list>` is the currently active item. */
11
16
  active: boolean;
12
17
  /**
13
18
  * @docs-private
14
19
  */
15
20
  _prefix: DaffPrefixDirective;
16
- /**
17
- * @docs-private
18
- */
19
- _suffix: DaffSuffixDirective;
20
21
  constructor(elementRef: ElementRef);
21
- /**
22
- * Sets the role for a regular `<daff-list-item>` to listitem.
23
- *
24
- * @docs-private
25
- */
26
- get role(): string;
27
- private _getHostElement;
28
- /** Gets whether a list item has one of the given attributes. */
29
- private _isAnchor;
22
+ private get _isAnchor();
30
23
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffListItemComponent, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<DaffListItemComponent, "daff-list-item,a[daff-list-item]", never, { "active": { "alias": "active"; "required": false; }; }, {}, ["_prefix", "_suffix"], ["[daffPrefix]", "*", "[daffSuffix]"], true, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffListItemComponent, "daff-list-item,a[daff-list-item]", never, { "active": { "alias": "active"; "required": false; }; }, {}, ["_prefix"], ["[daffPrefix]", "*"], true, never>;
32
25
  }
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Used to identify the primary title of a list item within a multi-line list.
4
+ *
5
+ * @example
6
+ * ```html
7
+ * <div daffListItemTitle>Title</div>
8
+ * ```
9
+ */
10
+ export declare class DaffListItemTitleDirective {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffListItemTitleDirective, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DaffListItemTitleDirective, "[daffListItemTitle]", never, {}, {}, never, never, true, never>;
13
+ }
package/list/list.d.ts CHANGED
@@ -1,7 +1,13 @@
1
- import { DaffPrefixSuffixModule } from '@daffodil/design';
1
+ import { DaffPrefixDirective } from '@daffodil/design';
2
2
  import { DaffListComponent } from './list/list.component';
3
3
  import { DaffListItemComponent } from './list-item/list-item.component';
4
+ import { DaffListItemTitleDirective } from './list-item-title/list-item-title.directive';
5
+ import { DaffNavListComponent } from './nav-list/nav-list.component';
4
6
  /**
5
7
  * @docs-private
6
8
  */
7
- export declare const DAFF_LIST_COMPONENTS: readonly [typeof DaffListComponent, typeof DaffListItemComponent, typeof DaffPrefixSuffixModule];
9
+ export declare const DAFF_LIST_COMPONENTS: readonly [typeof DaffListComponent, typeof DaffListItemComponent, typeof DaffListItemTitleDirective, typeof DaffPrefixDirective];
10
+ /**
11
+ * @docs-private
12
+ */
13
+ export declare const DAFF_NAV_LIST_COMPONENTS: readonly [typeof DaffNavListComponent, typeof DaffListItemComponent, typeof DaffListItemTitleDirective, typeof DaffPrefixDirective];
@@ -1,13 +1,14 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "@angular/common";
3
3
  import * as i2 from "./list/list.component";
4
- import * as i3 from "./list-item/list-item.component";
5
- import * as i4 from "@daffodil/design";
4
+ import * as i3 from "./nav-list/nav-list.component";
5
+ import * as i4 from "./list-item/list-item.component";
6
+ import * as i5 from "@daffodil/design";
6
7
  /**
7
8
  * @deprecated in favor of {@link DAFF_LIST_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
8
9
  */
9
10
  export declare class DaffListModule {
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffListModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffListModule, never, [typeof i1.CommonModule, typeof i2.DaffListComponent, typeof i3.DaffListItemComponent], [typeof i2.DaffListComponent, typeof i3.DaffListItemComponent, typeof i4.DaffPrefixSuffixModule]>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffListModule, never, [typeof i1.CommonModule, typeof i2.DaffListComponent, typeof i3.DaffNavListComponent, typeof i4.DaffListItemComponent], [typeof i2.DaffListComponent, typeof i3.DaffNavListComponent, typeof i4.DaffListItemComponent, typeof i5.DaffPrefixSuffixModule]>;
12
13
  static ɵinj: i0.ɵɵInjectorDeclaration<DaffListModule>;
13
14
  }
@@ -0,0 +1,17 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@daffodil/design";
3
+ /**
4
+ * A navigation list intended for use with anchor elements (`<a>`).
5
+ *
6
+ * @example
7
+ * ```html
8
+ * <daff-nav-list aria-label="Sidebar links">
9
+ * <a href="/" daff-list-item></a>
10
+ * <a href="/" daff-list-item></a>
11
+ * </daff-nav-list>
12
+ * ```
13
+ */
14
+ export declare class DaffNavListComponent {
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffNavListComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffNavListComponent, "daff-nav-list", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }]>;
17
+ }
@@ -1,4 +1,7 @@
1
1
  export { DaffListModule } from './list.module';
2
2
  export { DAFF_LIST_COMPONENTS } from './list';
3
- export * from './list/list.component';
4
- export * from './list-item/list-item.component';
3
+ export { DAFF_NAV_LIST_COMPONENTS } from './list';
4
+ export { DaffListComponent } from './list/list.component';
5
+ export { DaffNavListComponent } from './nav-list/nav-list.component';
6
+ export { DaffListItemComponent } from './list-item/list-item.component';
7
+ export { DaffListItemTitleDirective } from './list-item-title/list-item-title.directive';
@@ -0,0 +1,40 @@
1
+ @use '../../scss/typography' as t;
2
+
3
+ @mixin daff-list-base() {
4
+ $root: &;
5
+ display: block;
6
+ margin: 0;
7
+ padding: 0;
8
+
9
+ .daff-list-item {
10
+ $root: &;
11
+ display: flex;
12
+ gap: 1rem;
13
+ padding: 0.75rem 1rem;
14
+
15
+ &__content {
16
+ font-size: t.$font-size-base;
17
+ flex-grow: 1;
18
+
19
+ > * {
20
+ margin: 0;
21
+ padding: 0;
22
+ }
23
+ }
24
+
25
+ &__title {
26
+ font-size: t.$font-size-base;
27
+ font-weight: 600;
28
+ line-height: 1.5rem;
29
+ margin: 0;
30
+ padding: 0;
31
+ }
32
+
33
+ .daff-prefix {
34
+ display: flex;
35
+ align-items: center;
36
+ height: 1.5rem;
37
+ width: auto;
38
+ }
39
+ }
40
+ }
@@ -7,6 +7,11 @@
7
7
  $base-contrast: daff-get-base-color($theme, base-contrast);
8
8
  $mode: daff-get-theme-mode($theme);
9
9
 
10
+ .daff-list,
11
+ .daff-nav-list {
12
+ color: $base-contrast;
13
+ }
14
+
10
15
  .daff-nav-list {
11
16
  .daff-list-item {
12
17
  &::after {
@@ -26,12 +26,6 @@ export declare class DaffMediaGalleryComponent implements DaffMediaGalleryRegist
26
26
  */
27
27
  get id(): string | undefined | null;
28
28
  set id(val: string | undefined | null);
29
- /**
30
- * @docs-private
31
- *
32
- * Adds a class for styling the media gallery
33
- */
34
- private class;
35
29
  /**
36
30
  * An event indicating that the selected media gallery element has changed.
37
31
  */