@daffodil/design 0.87.1 → 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
@@ -3,14 +3,6 @@ import { Params } from '@angular/router';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class DaffPaginatorComponent implements OnChanges {
5
5
  private elementRef;
6
- /**
7
- * @docs-private
8
- */
9
- class: boolean;
10
- /**
11
- * @docs-private
12
- */
13
- role: string;
14
6
  /**
15
7
  * @docs-private
16
8
  */
@@ -98,14 +90,12 @@ export declare class DaffPaginatorComponent implements OnChanges {
98
90
  * Emits a pageNumber to notifyPageChange Output.
99
91
  *
100
92
  * @docs-private
101
- * @param pageNumber a page number
102
93
  */
103
94
  _onNotifyPageChange(pageNumber: number): void;
104
95
  /**
105
96
  * A simple function that determines if the given page number is the current page number.
106
97
  *
107
98
  * @docs-private
108
- * @param page a page number
109
99
  */
110
100
  _isSelected(page: number): boolean;
111
101
  /**
@@ -113,7 +103,6 @@ export declare class DaffPaginatorComponent implements OnChanges {
113
103
  * so the paginator retains the same total width at the extreme page numbers (1 and numberOfPages).
114
104
  *
115
105
  * @docs-private
116
- * @param pageNumber page number to check.
117
106
  */
118
107
  _showNumber(pageNumber: number): boolean;
119
108
  /**
@@ -1,6 +1,11 @@
1
1
  # Progress Bar
2
2
  A progress bar provides visual feedback about the duration or progress of a task or operation.
3
3
 
4
+ ## Overview
5
+ Progress bars can be **determinate** (percentage known) or **indeterminate** (percentage unknown).
6
+
7
+ <design-land-example-viewer-container example="progress-bar-default"></design-land-example-viewer-container>
8
+
4
9
  ## Usage
5
10
 
6
11
  ### Within a standalone component
@@ -43,25 +48,43 @@ export class CustomComponentModule { }
43
48
 
44
49
  > This method is deprecated. It's recommended to update all custom components to standalone.
45
50
 
51
+ ## Label
52
+ Use `<daff-progress-bar-label>` to help users understand what the progress represents. The label is automatically associated with the progress bar for accessibility via `aria-labelledby`.
53
+
54
+ If no label is provided, add an `aria-label` to `<daff-progress-bar>` to ensure an accessible experience.
55
+
46
56
  ## Types
47
- There are two types of progress bars: `determinate` and `indeterminate`. They are `determinate` by default.
48
57
 
49
58
  ### Determinate
50
- Determinate progress bars should be used when the percentage of a task or operation is known.
51
-
52
- <design-land-example-viewer-container example="progress-bar-default"></design-land-example-viewer-container>
59
+ Use determinate progress bars when the percentage of completion is known. This is the default type.
53
60
 
54
61
  ### Indeterminate
55
- Indeterminate progress bars should be used when the loading percentage of a task or operation is unknown or cannot be calculated.
62
+ Use indeterminate progress bars when when the percentage of completion is unknown or cannot be calculated. Set the `indeterminate` property to `true`:
56
63
 
57
64
  <design-land-example-viewer-container example="progress-bar-indeterminate"></design-land-example-viewer-container>
58
65
 
59
- ## Theming
60
- Use the `color` property to change the color of a progress bar. The default color is primary.
66
+ ## Colors
67
+ The default color is `primary`. Use the `color` property to change a progress bar's color.
61
68
 
62
69
  > `theme`, `white`, and `black` should be used with caution to ensure that there is sufficient contrast.
63
70
 
64
71
  <design-land-example-viewer-container example="progress-bar-themes"></design-land-example-viewer-container>
65
72
 
66
73
  ## Accessibility
67
- The progress bar component works with the ARIA `role="progressbar"` to provide an accessible experience. A Label should always be provided by using `label[daffFormLabel]`, `aria-label`, or `aria-labelledby`.
74
+ Progress bar implements the ARIA `role="progressbar"` pattern:
75
+
76
+ - `aria-valuemin="0"` and `aria-valuemax="100"` are set by default.
77
+ - `aria-valuenow` reflects the current progress value (not relevant for indeterminate mode).
78
+ - `aria-labelledby` links the progress bar track to `<daff-progress-bar-label>` when present.
79
+
80
+ **Best practice:** Always provide an accessible label via `<daff-progress-bar-label>` or `aria-label` so users know what the progress represents.
81
+
82
+ ```html
83
+ <daff-progress-bar>
84
+ <daff-progress-bar-label>File upload</daff-progress-bar-label>
85
+ </daff-progress-bar>
86
+ ```
87
+
88
+ ```html
89
+ <daff-progress-bar aria-label="File upload"></daff-progress-bar>
90
+ ```
@@ -1,9 +1,13 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * Use label to help users understand what the progress represents.
4
+ *
5
+ * @usage
6
+ * ```html
7
+ * <daff-progress-bar-label>File upload</daff-progress-bar-label>
8
+ * ```
9
+ */
2
10
  export declare class DaffProgressBarLabelDirective {
3
- /**
4
- * @docs-private
5
- */
6
- class: boolean;
7
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffProgressBarLabelDirective, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<DaffProgressBarLabelDirective, "[daffProgressBarLabel]", never, {}, {}, never, never, true, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DaffProgressBarLabelDirective, "daff-progress-bar-label", never, {}, {}, never, never, true, never>;
9
13
  }
@@ -1,73 +1,77 @@
1
- import { AnimationEvent } from '@angular/animations';
2
1
  import { EventEmitter, ChangeDetectorRef } from '@angular/core';
3
2
  import { DaffColorableDirective } from '@daffodil/design';
3
+ import { DaffProgressBarLabelDirective } from './progress-bar-label/progress-bar-label.directive';
4
4
  import * as i0 from "@angular/core";
5
5
  import * as i1 from "@daffodil/design";
6
- export declare const clamp: (number: number, min: number, max: number) => number;
6
+ export declare const clamp: (value: number, min: number, max: number) => number;
7
+ /**
8
+ * A progress bar provides visual feedback about the duration or progress of a task or operation.
9
+ *
10
+ * @usage
11
+ * ```html
12
+ * <daff-progress-bar>
13
+ * <daff-progress-bar-label>File upload</daff-progress-bar-label>
14
+ * </daff-progress-bar>
15
+ * ```
16
+ */
7
17
  export declare class DaffProgressBarComponent {
8
18
  private _changeDetectorRef;
9
19
  private colorable;
20
+ constructor(_changeDetectorRef: ChangeDetectorRef, colorable: DaffColorableDirective);
21
+ private _percentage;
10
22
  /**
11
23
  * @docs-private
12
24
  */
13
- class: boolean;
14
- /**
15
- * @docs-private
16
- */
17
- get indeterminateClass(): boolean;
25
+ _label: DaffProgressBarLabelDirective;
18
26
  /**
19
- * @docs-private
27
+ * Sets the percentage completion of the progression,
28
+ * expressed as a whole number between 0 and 100.
20
29
  */
21
- get role(): string;
30
+ get percentage(): number;
31
+ set percentage(val: number);
22
32
  /**
23
33
  * @docs-private
24
34
  */
25
- get ariaLabel(): string;
35
+ get ariaValueNow(): number;
26
36
  /**
27
37
  * @docs-private
28
38
  */
29
- ariaValueMin: string;
39
+ get ariaLabelledBy(): string;
30
40
  /**
31
41
  * @docs-private
42
+ *
43
+ * The unique id of the progress bar.
32
44
  */
33
- ariaValueMax: string;
45
+ id: string;
34
46
  /**
35
- * @docs-private
47
+ * An `aria-label` for the progress bar.
36
48
  */
37
- get ariaValueNow(): number;
38
- constructor(_changeDetectorRef: ChangeDetectorRef, colorable: DaffColorableDirective);
39
- private _percentage;
40
- private _indeterminate;
41
- /**
42
- * Sets the percentage completion of the progression,
43
- * expressed as a whole number between 0 and 100.
44
- *
45
- */
46
- get percentage(): number;
47
- set percentage(val: number);
49
+ ariaLabel: string;
48
50
  /**
49
51
  * Property to set the animation of a progress bar to
50
52
  * run for an indefinite amount of time.
51
53
  *
52
54
  * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress
53
55
  **/
54
- get indeterminate(): any;
55
- set indeterminate(value: any);
56
+ indeterminate: boolean;
56
57
  /**
57
- * An event that emits each time the progression reaches 100%
58
- * and the animation is finished
58
+ * @docs-private
59
+ *
60
+ * Returns the transform style for the determinate progress bar.
59
61
  */
60
- finished: EventEmitter<void>;
62
+ _determinateBarTransform(): string;
61
63
  /**
62
- * Calculates when the progress animation is fully completed
63
- *
64
- * @param event: AnimationEvent
64
+ * An event that emits each time the progression reaches 100%
65
+ * and the animation is finished.
65
66
  */
66
- onAnimationComplete(event: AnimationEvent): void;
67
+ finished: EventEmitter<void>;
67
68
  /**
68
69
  * @docs-private
70
+ *
71
+ * Handles the CSS transition end event.
69
72
  */
70
- get fillState(): any;
73
+ onTransitionEnd(event: TransitionEvent): void;
71
74
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffProgressBarComponent, never>;
72
- static ɵcmp: i0.ɵɵComponentDeclaration<DaffProgressBarComponent, "daff-progress-bar", never, { "percentage": { "alias": "percentage"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; }, { "finished": "finished"; }, never, ["label[daffProgressBarLabel]"], true, [{ directive: typeof i1.DaffColorableDirective; inputs: { "color": "color"; }; outputs: {}; }]>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffProgressBarComponent, "daff-progress-bar", never, { "percentage": { "alias": "percentage"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; }, { "finished": "finished"; }, ["_label"], ["daff-progress-bar-label"], true, [{ directive: typeof i1.DaffColorableDirective; inputs: { "color": "color"; }; outputs: {}; }]>;
76
+ static ngAcceptInputType_indeterminate: unknown;
73
77
  }
@@ -1,4 +1,4 @@
1
1
  export { DaffProgressBarModule } from './progress-bar.module';
2
- export * from './progress-bar.component';
3
- export * from './progress-bar-label/progress-bar-label.directive';
2
+ export { DaffProgressBarComponent } from './progress-bar.component';
3
+ export { DaffProgressBarLabelDirective } from './progress-bar-label/progress-bar-label.directive';
4
4
  export { DAFF_PROGRESS_BAR_COMPONENTS } from './progress-bar';
@@ -29,7 +29,17 @@ export declare class DaffQuantityFieldComponent extends DaffFormFieldControl<num
29
29
  selectMax: number;
30
30
  id: string;
31
31
  get focused(): boolean;
32
+ /**
33
+ * @docs-private
34
+ *
35
+ * TODO: Update functionality to match other control during refactor.
36
+ */
32
37
  disabled: boolean;
38
+ /**
39
+ * @docs-private
40
+ * TODO: Update functionality to match other control during refactor.
41
+ */
42
+ required: boolean;
33
43
  private _quantity;
34
44
  private _inputHasBeenShown;
35
45
  get quantity(): number;
package/scss/global.scss CHANGED
@@ -25,7 +25,6 @@ html {
25
25
  line-height: 1.5;
26
26
  -webkit-font-smoothing: antialiased;
27
27
  -moz-osx-font-smoothing: grayscale;
28
- --daff-sidebar-side-fixed-top-shift: 0;
29
28
  }
30
29
 
31
30
  html {
@@ -3,7 +3,6 @@ import { TemplatePortal } from '@angular/cdk/portal';
3
3
  import { ChangeDetectorRef, OnInit, ElementRef, OnDestroy } from '@angular/core';
4
4
  import { ControlValueAccessor, NgControl } from '@angular/forms';
5
5
  import { DaffFormFieldComponent, DaffFormFieldControl, DaffOpenableDirective } from '@daffodil/design';
6
- import { DaffSelectAnimationState } from '../animation/state.enum';
7
6
  import { DaffSelectOptionDirective } from '../option/option.directive';
8
7
  import * as i0 from "@angular/core";
9
8
  import * as i1 from "@daffodil/design";
@@ -29,8 +28,6 @@ export declare class DaffSelectComponent<T = unknown> extends DaffFormFieldContr
29
28
  private _overlay;
30
29
  private _value;
31
30
  private _highlighted;
32
- private _animationState;
33
- private _animationFinishCallbackQueue;
34
31
  /**
35
32
  * @docs-private
36
33
  */
@@ -45,22 +42,23 @@ export declare class DaffSelectComponent<T = unknown> extends DaffFormFieldContr
45
42
  blur(): void;
46
43
  /**
47
44
  * @docs-private
45
+ *
46
+ * Implemented as part of DaffFormFieldControl.
48
47
  */
49
- _disabled: boolean;
50
48
  disabled: boolean;
51
- options: T[];
52
- /**
53
- * @docs-private
54
- */
55
- get isOpen(): boolean;
49
+ private _required;
56
50
  /**
57
51
  * @docs-private
52
+ *
53
+ * Implemented as part of DaffFormFieldControl.
58
54
  */
59
- class: boolean;
55
+ get required(): boolean;
56
+ set required(value: boolean);
57
+ options: T[];
60
58
  /**
61
59
  * @docs-private
62
60
  */
63
- get disabledClass(): boolean;
61
+ get isOpen(): boolean;
64
62
  /**
65
63
  * @docs-private
66
64
  *
@@ -88,10 +86,6 @@ export declare class DaffSelectComponent<T = unknown> extends DaffFormFieldContr
88
86
  * @docs-private
89
87
  */
90
88
  optionTemplate?: DaffSelectOptionDirective;
91
- /**
92
- * @docs-private
93
- */
94
- get animationState(): DaffSelectAnimationState;
95
89
  /**
96
90
  * @docs-private
97
91
  */
@@ -121,10 +115,6 @@ export declare class DaffSelectComponent<T = unknown> extends DaffFormFieldContr
121
115
  * @docs-private
122
116
  */
123
117
  registerOnTouched(fn: any): void;
124
- /**
125
- * @docs-private
126
- */
127
- setDisabledState(isDisabled: boolean): void;
128
118
  /**
129
119
  * @docs-private
130
120
  */
@@ -133,10 +123,6 @@ export declare class DaffSelectComponent<T = unknown> extends DaffFormFieldContr
133
123
  * @docs-private
134
124
  */
135
125
  ngOnInit(): void;
136
- /**
137
- * @docs-private
138
- */
139
- animationFinished(): void;
140
126
  /**
141
127
  * Opens the options list.
142
128
  */
@@ -165,6 +151,8 @@ export declare class DaffSelectComponent<T = unknown> extends DaffFormFieldContr
165
151
  * Highlights the previous option in the list.
166
152
  */
167
153
  highlightPrevious(event?: KeyboardEvent | MouseEvent): void;
168
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffSelectComponent<any>, [null, null, { optional: true; self: true; }, null, null, null]>;
169
- static ɵcmp: i0.ɵɵComponentDeclaration<DaffSelectComponent<any>, "daff-select", never, { "disabled": { "alias": "disabled"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionsId": { "alias": "optionsId"; "required": false; }; }, {}, ["optionTemplate"], never, true, [{ directive: typeof i1.DaffOpenableDirective; inputs: {}; outputs: {}; }]>;
154
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffSelectComponent<any>, [null, null, { optional: true; self: true; }, null, null, { optional: true; }]>;
155
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffSelectComponent<any>, "daff-select", never, { "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionsId": { "alias": "optionsId"; "required": false; }; }, {}, ["optionTemplate"], never, true, [{ directive: typeof i1.DaffOpenableDirective; inputs: {}; outputs: {}; }]>;
156
+ static ngAcceptInputType_disabled: unknown;
157
+ static ngAcceptInputType_required: unknown;
170
158
  }
@@ -1,4 +1,3 @@
1
- import { DaffErrorMessageComponent, DaffFormLabelDirective } from '@daffodil/design';
2
1
  import { DaffSelectOptionDirective } from './option/option.directive';
3
2
  import { DaffSelectComponent } from './select/select.component';
4
- export declare const DAFF_SELECT_COMPONENTS: readonly [typeof DaffSelectComponent, typeof DaffSelectOptionDirective, typeof DaffErrorMessageComponent, typeof DaffFormLabelDirective];
3
+ export declare const DAFF_SELECT_COMPONENTS: readonly [typeof DaffSelectComponent, typeof DaffSelectOptionDirective];
package/sidebar/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Sidebar
2
- Sidebar is a component used to display additional information to the side of a page that may be fixed or collapsible.
2
+ Sidebar is a component used to display additional information alongside a page.
3
3
 
4
4
  ## Overview
5
- Sidebars are often used for navigation, but it's built to be flexible and extensible so that it can be used for any content. Sidebar supports a header and footer component with minimal default styling.
5
+ Sidebars are commonly used for navigation but are flexible enough to display any type of content. They include optional header and footer components with minimal styling. They can be fixed or collapsible and support multiple modes and positions.
6
+
7
+ <design-land-example-viewer-container example="basic-sidebar"></design-land-example-viewer-container>
6
8
 
7
9
  ## Usage
8
10
 
@@ -47,21 +49,34 @@ export class CustomComponentModule { }
47
49
  > This method is deprecated. It's recommended to update all custom components to standalone.
48
50
 
49
51
  ### Required imports
50
- The `BrowserAnimationsModule` or `NoopAnimationsModule` must be imported in the particular Angular `@NgModule` the sidebar is used in for the sidebar to render and work properly.
52
+ The `@angular/platform-browser/animations` `BrowserAnimationsModule` or `NoopAnimationsModule` must be imported in your application module for the sidebar to render and function properly. Without one of these imports, the sidebar component will not initialize correctly.
51
53
 
52
- ## Basic sidebar
53
- The default setting for sidebar is `mode="side"` and `side="left"`.
54
+ ```ts
55
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
54
56
 
55
- <design-land-example-viewer-container example="basic-sidebar"></design-land-example-viewer-container>
57
+ @NgModule({
58
+ imports: [
59
+ BrowserAnimationsModule,
60
+ ],
61
+ })
62
+ export class CustomComponentModule {}
63
+ ```
56
64
 
57
- ## Implementing the main and sidebar content
58
- The main and sidebar content should be placed inside of the `<daff-sidebar-viewport>`. The sidebar content should be placed inside of the `<daff-sidebar>`.
65
+ ## Anatomy
66
+ `<daff-sidebar>` is placed inside a `<daff-sidebar-viewport>` alongside the page content. It optionally supports:
59
67
 
60
- > The sidebar viewport should only ever be used once in an application, but it's possible for there to be multiple sidebars of many modes at the same time.
68
+ **Header**\
69
+ Contains an optional title (`[daffSidebarHeaderTitle]`), an optional dismiss button, and a slot for custom content. Use `<daff-sidebar-header>`.
61
70
 
62
- A viewport navigation can either be:
71
+ **Footer**\
72
+ A fixed container anchored to the bottom of the sidebar, often used for persistent actions or controls. Use `<daff-sidebar-footer>`.
63
73
 
64
- - Placed alongside the `<daff-sidebar>` using the `[daff-sidebar-viewport-nav]` selector.
74
+ > `<daff-sidebar-viewport>` should only be used once per application, but multiple sidebars of different modes can exist within it.
75
+
76
+ ## Navigation placement
77
+ A viewport navigation can be placed either:
78
+
79
+ - Alongside the sidebar, using the `[daff-sidebar-viewport-nav]` selector:
65
80
 
66
81
  ```html
67
82
  <daff-sidebar-viewport (backdropClicked)="toggleOpen()">
@@ -79,7 +94,7 @@ A viewport navigation can either be:
79
94
  </daff-sidebar-viewport>
80
95
  ```
81
96
 
82
- - Placed inside of the viewport content by **omitting** the `[daff-sidebar-viewport-nav]` selector from the nav component.
97
+ - Inside the viewport content by **omitting** the `[daff-sidebar-viewport-nav]` selector:
83
98
 
84
99
  ```html
85
100
  <daff-sidebar-viewport (backdropClicked)="toggleOpen()">
@@ -97,59 +112,48 @@ A viewport navigation can either be:
97
112
  </daff-sidebar-viewport>
98
113
  ```
99
114
 
100
- ## Header and footer
101
- The `<daff-sidebar-header>` includes optional title (`[daffSidebarHeaderTitle]`) and action (`[daffSidebarHeaderAction]`) selectors, and a slot to render custom content. The action selector should be used along with the `<daff-icon-button>` (view [Button Documentation](/libs/design/button/README.md)) to make sure that the action is positioned correctly and it passes WCAG guidelines.
102
-
103
- The `<daff-sidebar-footer>` is a "holder" component with minimal default styling. Its main purpose is to position the footer at the bottom of the sidebar, allowing the sidebar's content to overflow and scroll while ensuring that the footer remains constantly visible.
104
-
105
- Both the header and footer are optional components that will not render in the DOM if they are not used.
106
-
107
115
  ## Closing a sidebar
108
- A sidebar can be closed by clicking on the backdrop, using the escape key, or clicking on the close button in the sidebar header.
109
-
110
- > Note: The close button is hidden by default. To make it visible, set the `dismissible` property on the sidebar header to `true`.
116
+ A sidebar can be closed by:
117
+ - Clicking on the backdrop
118
+ - Pressing the `ESC` key
119
+ - Clicking the close button (requires `dismissible="true"` on the sidebar header)
111
120
 
112
121
  ## Modes
113
- A sidebar can be rendered four different ways by using the `mode` property. If `mode` is not specified, `side` is used by default.
122
+ Use the `mode` property to control how the sidebar is displayed:
114
123
 
115
- | Mode | Description |
116
- | ---------- | ---------------------------------------------------------------------------------------------------- |
117
- | side | Displays the sidebar alongside the main content. |
118
- | side-fixed | Displays the sidebar alongside the content, but the sidebar remains fixed in place and scrolls independently from the content. |
119
- | over | The sidebar slides over the main content when open, temporarily covering part of the content when active. |
120
- | under | The sidebar remains fixed in place while the main content slides over it when the sidebar is closed. |
124
+ | Mode | Description |
125
+ | ---------- | ----------- |
126
+ | `side` (default) | Displays the sidebar alongside the main content. |
127
+ | `side-fixed` | Displays the sidebar alongside the content but remains fixed in place, scrolling independently from the content. |
128
+ | `over` | Slides over the main content, temporarily covering it when active. |
129
+ | `under` | Sits beneath the main content, which slides over the sidebar when closed. |
121
130
 
122
- ### Over sidebar
123
- <design-land-example-viewer-container example="over-sidebar"></design-land-example-viewer-container>
131
+ **Over and under sidebars**
132
+ <design-land-example-viewer-container example="over-and-under-sidebars"></design-land-example-viewer-container>
124
133
 
125
- ### Under sidebar
126
- <design-land-example-viewer-container example="under-sidebar"></design-land-example-viewer-container>
134
+ **Side fixed sidebar**
135
+ <design-land-example-viewer-container example="side-fixed-sidebar"></design-land-example-viewer-container>
127
136
 
128
- ### Two fixed sidebars on either side
137
+ **Two fixed sidebars on either side**
129
138
  <design-land-example-viewer-container example="two-fixed-sidebars-either-side"></design-land-example-viewer-container>
130
139
 
131
- ### Fixed and over sidebar
140
+ **Fixed and over sidebar**
132
141
  <design-land-example-viewer-container example="fixed-and-over-sidebar"></design-land-example-viewer-container>
133
142
 
134
143
  ## Sides
135
- A sidebar can be positioned on either side of a screen by using the `side` property. If `side` is not specificed, `left` is used by default.
144
+ Use the `side` property to control the placement of the sidebar:
136
145
 
137
- | Side | Description |
138
- | ----- | ---------------------------------------------- |
139
- | left | Places sidebar on the left side of the screen |
140
- | right | Places sidebar on the right side of the screen |
146
+ | Side | Description |
147
+ | ----- | ----------- |
148
+ | `left` (default) | Places the sidebar on the left side of the screen. |
149
+ | `right` | Places the sidebar on the right side of the screen. |
141
150
 
142
- ## Custom styles
151
+ <design-land-example-viewer-container example="sidebar-sides"></design-land-example-viewer-container>
143
152
 
144
- #### Setting a sidebar's width
145
- The default size of a sidebar is `240px`. The `--daff-sidebar-left-width` and `--daff-sidebar-right-width` variables can be used to change the width of a left or right sidebar. These variables need to be defined on `<daff-sidebar-viewport>` or on the shadow DOM.
153
+ ## Customizations
146
154
 
147
- `custom-sidebar-viewport.html`
148
- ```html
149
- <daff-sidebar-viewport>
150
- <daff-sidebar></daff-sidebar>
151
- </daff-sidebar-viewport>
152
- ```
155
+ ### Sidebar width
156
+ The default width is `240px`. Override it with:
153
157
 
154
158
  ```scss
155
159
  :host {
@@ -158,35 +162,26 @@ The default size of a sidebar is `240px`. The `--daff-sidebar-left-width` and `-
158
162
  }
159
163
  ```
160
164
 
161
- or:
162
-
163
- ```scss
164
- daff-sidebar-viewport {
165
- --daff-sidebar-left-width: 288px;
166
- --daff-sidebar-right-width: 288px;
167
- }
168
- ```
169
-
170
- ## Changing a side- fixed sidebar's top offset position
171
- The default offset position of a sidebar is `0px`. The `--daff-sidebar-side-fixed-top-shift` variable can be used to adjust the top offset position for a primary sidebar and its viewport content.
165
+ ### Side fixed mode's top offset position
166
+ The default offset for a `side-fixed` sidebar is `64px` (matching the [Navbar](/libs/design/navbar/README.md)'s height). Override it with:
172
167
 
173
168
  ```scss
174
169
  body {
175
- --daff-sidebar-side-fixed-top-shift: 64px;
170
+ --daff-sidebar-side-fixed-top-shift: 72px;
176
171
  }
177
172
  ```
178
173
 
179
- ## Examples
180
- #### Over and under sidebars
181
- <design-land-example-viewer-container example="over-and-under-sidebars"></design-land-example-viewer-container>
182
-
183
- ### Side fixed sidebar
184
- <design-land-example-viewer-container example="side-fixed-sidebar"></design-land-example-viewer-container>
185
-
186
174
  ## Accessibility
187
- A meaningful `role` should be set on all sidebars depending on how they are used.
175
+ - Apply a meaningful `role` (e.g., navigation) to describe the sidebar’s purpose.
176
+ - When no title or header is present, use an `aria-label` to provide context.
188
177
 
189
- When a sidebar header is not used or there is no title for the sidebar, a meaningful `aria-label` should be set to describe the sidebar.
178
+ ### Focus management
179
+ Focus trapping is automatically applied for `over` and `under` modes and turned off for `side` and `side-fixed` modes. When opened, the first tabbable element in the sidebar receives focus. When closed, focus returns to the previously focused element.
190
180
 
191
- ### Focus
192
- Focus trapping is enabled for `over` and `under` modes, and disabled for `side` and `side-fixed` modes. When a sidebar is opened, the first tabbable element within the sidebar will receive focus. When a sidebar is closed, the element that was focused before the sidebar was opened will be re-focused.
181
+ ## Deprecations
182
+ `[daffSidebarHeaderAction]` has been deprecated in favor of the `dismissible` property. Replace `[daffSidebarHeaderAction]` with `<daff-sidebar-header [dismissible]="true">`
183
+
184
+ ```html
185
+ <daff-sidebar-header [dismissible]="true">
186
+ </daff-sidebar-header>
187
+ ```
@@ -3,7 +3,6 @@ import * as i0 from "@angular/core";
3
3
  export declare class OverandUnderSidebarsComponent {
4
4
  faTimes: import("@fortawesome/fontawesome-common-types").IconDefinition;
5
5
  open: boolean;
6
- sideControl: FormControl;
7
6
  modeControl: FormControl;
8
7
  openSidebar(): void;
9
8
  closeSidebar(): void;
@@ -0,0 +1,11 @@
1
+ import { FormControl } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SidebarSidesComponent {
4
+ faTimes: import("@fortawesome/fontawesome-common-types").IconDefinition;
5
+ open: boolean;
6
+ sideControl: FormControl;
7
+ openSidebar(): void;
8
+ closeSidebar(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SidebarSidesComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<SidebarSidesComponent, "sidebar-sides", never, {}, {}, never, never, true, never>;
11
+ }
@@ -23,15 +23,6 @@ export declare class DaffSidebarComponent implements DaffOpenable {
23
23
  private _focusStack;
24
24
  private openDirective;
25
25
  private _doc;
26
- /**
27
- * @docs-private
28
- *
29
- * The CSS classes set.
30
- */
31
- get classes(): {
32
- [x: string]: boolean;
33
- 'daff-sidebar': boolean;
34
- };
35
26
  /**
36
27
  * @docs-private
37
28
  *
@@ -8,10 +8,6 @@ import * as i0 from "@angular/core";
8
8
  * ```
9
9
  */
10
10
  export declare class DaffSidebarFooterComponent {
11
- /**
12
- * @docs-private
13
- */
14
- class: boolean;
15
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffSidebarFooterComponent, never>;
16
12
  static ɵcmp: i0.ɵɵComponentDeclaration<DaffSidebarFooterComponent, "daff-sidebar-footer", never, {}, {}, never, ["*"], true, never>;
17
13
  }
@@ -1,4 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * @deprecated in favor of the `dismissible` property on `DaffSidebarHeaderComponent`. Deprecated in version 0.88.0. Will be removed in version 0.91.0.
4
+ */
2
5
  export declare class DaffSidebarHeaderActionDirective {
3
6
  /**
4
7
  * @docs-private
@@ -14,10 +14,6 @@ export declare class DaffSidebarHeaderComponent {
14
14
  * @docs-private
15
15
  */
16
16
  faTimes: import("@fortawesome/fontawesome-common-types").IconDefinition;
17
- /**
18
- * @docs-private
19
- */
20
- class: boolean;
21
17
  /** Whether or not a sidebar header should display the close icon. */
22
18
  dismissible: boolean;
23
19
  /**