@daffodil/design 0.86.0 → 0.87.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 (96) hide show
  1. package/accordion/README.md +36 -34
  2. package/accordion/accordion/accordion/accordion.component.d.ts +15 -1
  3. package/accordion/accordion/accordion-item/accordion-item.component.d.ts +10 -3
  4. package/accordion/accordion/accordion-item-title/accordion-item-title.directive.d.ts +6 -1
  5. package/atoms/form/form-field/action/action.directive.d.ts +9 -0
  6. package/atoms/form/form-field/form-field/form-field.component.d.ts +33 -1
  7. package/atoms/form/form-field/form-field.d.ts +2 -1
  8. package/atoms/form/form-field/public_api.d.ts +1 -0
  9. package/breadcrumb/README.md +24 -22
  10. package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +15 -0
  11. package/breadcrumb/breadcrumb-item/breadcrumb-item.directive.d.ts +10 -0
  12. package/button/README.md +58 -42
  13. package/button/button/button-base.directive.d.ts +10 -4
  14. package/button/button.d.ts +22 -1
  15. package/button/public_api.d.ts +1 -1
  16. package/button/src/button/button-base.scss +0 -1
  17. package/button/src/button/raised/raised-theme.scss +3 -3
  18. package/core/statusable/statusable.directive.d.ts +22 -2
  19. package/fesm2022/daffodil-design-accordion.mjs +31 -5
  20. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  21. package/fesm2022/daffodil-design-article.mjs +2 -2
  22. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  23. package/fesm2022/daffodil-design-breadcrumb.mjs +25 -0
  24. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  25. package/fesm2022/daffodil-design-button.mjs +58 -16
  26. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  27. package/fesm2022/daffodil-design-form-field-examples.mjs +95 -0
  28. package/fesm2022/daffodil-design-form-field-examples.mjs.map +1 -0
  29. package/fesm2022/daffodil-design-input-examples.mjs +5 -5
  30. package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
  31. package/fesm2022/daffodil-design-input.mjs +11 -15
  32. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  33. package/fesm2022/daffodil-design-media-gallery-examples.mjs +2 -2
  34. package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +1 -1
  35. package/fesm2022/daffodil-design-modal-examples.mjs +3 -2
  36. package/fesm2022/daffodil-design-modal-examples.mjs.map +1 -1
  37. package/fesm2022/daffodil-design-modal.mjs +12 -11
  38. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  39. package/fesm2022/daffodil-design-notification-examples.mjs +3 -3
  40. package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
  41. package/fesm2022/daffodil-design-quantity-field-examples.mjs +4 -4
  42. package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +1 -1
  43. package/fesm2022/daffodil-design-select-examples.mjs +117 -0
  44. package/fesm2022/daffodil-design-select-examples.mjs.map +1 -0
  45. package/fesm2022/daffodil-design-select.mjs +431 -0
  46. package/fesm2022/daffodil-design-select.mjs.map +1 -0
  47. package/fesm2022/daffodil-design-textarea-examples.mjs +66 -0
  48. package/fesm2022/daffodil-design-textarea-examples.mjs.map +1 -0
  49. package/fesm2022/daffodil-design-textarea.mjs +124 -0
  50. package/fesm2022/daffodil-design-textarea.mjs.map +1 -0
  51. package/fesm2022/daffodil-design.mjs +135 -11
  52. package/fesm2022/daffodil-design.mjs.map +1 -1
  53. package/form-field/examples/examples.d.ts +3 -0
  54. package/form-field/examples/form-field-appearances/form-field-appearances.component.d.ts +7 -0
  55. package/form-field/examples/form-field-with-action/form-field-with-action.component.d.ts +9 -0
  56. package/form-field/examples/form-field-with-prefix/form-field-with-prefix.component.d.ts +6 -0
  57. package/form-field/examples/form-field-with-suffix/form-field-with-suffix.component.d.ts +6 -0
  58. package/form-field/examples/index.d.ts +1 -0
  59. package/form-field/examples/public_api.d.ts +1 -0
  60. package/input/input.component.d.ts +4 -8
  61. package/media-gallery/README.md +24 -12
  62. package/modal/modal/modal.component.d.ts +5 -3
  63. package/notification/src/notification-theme.scss +34 -18
  64. package/package.json +1 -1
  65. package/scss/theme.scss +8 -0
  66. package/scss/theming/illuminate/illuminate.scss +2 -0
  67. package/select/README.md +8 -0
  68. package/select/animation/select-animation-state.d.ts +7 -0
  69. package/select/animation/select-animation.d.ts +4 -0
  70. package/select/animation/state.enum.d.ts +4 -0
  71. package/select/examples/default-select/default-select.component.d.ts +8 -0
  72. package/select/examples/disabled-select/disabled-select.component.d.ts +8 -0
  73. package/select/examples/index.d.ts +1 -0
  74. package/select/examples/models/address.type.d.ts +7 -0
  75. package/select/examples/models/addresses.d.ts +2 -0
  76. package/select/examples/public_api.d.ts +3 -0
  77. package/select/examples/select-with-error/select-with-error.component.d.ts +8 -0
  78. package/select/examples/skeleton-select/skeleton-select.component.d.ts +8 -0
  79. package/select/index.d.ts +1 -0
  80. package/select/option/context.type.d.ts +17 -0
  81. package/select/option/option.directive.d.ts +11 -0
  82. package/select/public_api.d.ts +4 -0
  83. package/select/select/select.component.d.ts +170 -0
  84. package/select/select.d.ts +4 -0
  85. package/select/src/select-theme.scss +75 -0
  86. package/src/atoms/form/form-field/form-field/form-field-theme.scss +35 -8
  87. package/textarea/README.md +28 -0
  88. package/textarea/examples/basic-textarea/basic-textarea.component.d.ts +5 -0
  89. package/textarea/examples/examples.d.ts +2 -0
  90. package/textarea/examples/index.d.ts +1 -0
  91. package/textarea/examples/public_api.d.ts +1 -0
  92. package/textarea/examples/textarea-disabled/textarea-disabled.component.d.ts +7 -0
  93. package/textarea/examples/textarea-error/textarea-error.component.d.ts +7 -0
  94. package/textarea/index.d.ts +1 -0
  95. package/textarea/public_api.d.ts +1 -0
  96. package/textarea/textarea.component.d.ts +59 -0
@@ -1,21 +1,14 @@
1
1
  # Accordion
2
- An accordion is a group of vertically stacked headings used to toggle the visibility of a section of content.
2
+ An accordion is a group of vertically stacked headings that allow users to toggle the visibility of related content.
3
3
 
4
4
  ## Overview
5
- Accordions are helpful to shorten pages and reduce scrolling by hiding content that's not crucial to display at all times. The accordion component consists of several pre-styled components and directives.
5
+ Accordions helps reduce scrolling by hiding non-essential information until it’s needed. Use it to organize content into collapsible sections. This is especially useful for long pages where not all information needs to be visible at once.
6
6
 
7
7
  <design-land-example-viewer-container example="basic-accordion"></design-land-example-viewer-container>
8
8
 
9
- ## Formatting
10
- Accordions are built using `<daff-accordion>`, `<daff-accordion-item>`, and `[daffAccordionItemTitle]`.
11
-
12
- - **`<daff-accordion>`**: A wrapper for grouping accordion items.
13
- - **`<daff-accordion-item>`**: The wrapper for the title and content. It handles the expansion and collapse of the inner content when clicked.
14
- - **`[daffAccordionItemTitle]`**: Used to provide a high level overview of the content.
15
-
16
- Any additional content placed inside of an accordion item will be displayed as part of the collapsible content.
17
-
18
9
  ## Usage
10
+ To use the accordion components, import `DAFF_ACCORDION_COMPONENTS` into your custom component:
11
+
19
12
  ```ts
20
13
  import { DAFF_ACCORDION_COMPONENTS } from '@daffodil/design/accordion';
21
14
 
@@ -29,43 +22,52 @@ import { DAFF_ACCORDION_COMPONENTS } from '@daffodil/design/accordion';
29
22
  export class CustomComponent {}
30
23
  ```
31
24
 
25
+ ## Anatomy
26
+ An accordion is composed of the following:
27
+
28
+ - **`<daff-accordion>`**: Groups accordion items.
29
+ - **`<daff-accordion-item>`**: Contains the title and collapsible content. Handles expansion and collapse on user interaction.
30
+ - **`[daffAccordionItemTitle]`**: Used to provide a high level overview of the panel content.
31
+
32
+ Content inside `<daff-accordion-item>` (excluding the title) is part of the panel content that is shown or hidden when the item is toggled.
33
+
32
34
  ```html
33
35
  <daff-accordion>
34
- <daff-accordion-item>
35
- <div daffAccordionItemTitle></div>
36
- <p>Item Content</p>
37
- </daff-accordion-item>
38
- <daff-accordion-item>
39
- <div daffAccordionItemTitle></div>
40
- <p>Item Content</p>
41
- </daff-accordion-item>
36
+ <daff-accordion-item>
37
+ <div daffAccordionItemTitle>Title</div>
38
+ <div>Expandable content</div>
39
+ </daff-accordion-item>
42
40
  </daff-accordion>
43
41
  ```
44
42
 
45
- ## Examples
43
+ ## Expand an item by default
44
+ Use the `initiallyExpanded` property on the accordion item to have an item open by default.
46
45
 
47
- ### Expand an item by default
48
- Use the `initiallyExpanded` property on the accordion item to have it opened by default.
46
+ <design-land-example-viewer-container example="initially-expanded-accordion"></design-land-example-viewer-container>
49
47
 
50
- ```html
51
- <daff-accordion-item [initiallyExpanded]="true"></daff-accordion-item>
52
- ```
48
+ ## Disable an accordion item
49
+ Use the `disabled` property on the accordion item to disable and prevent it from being expanded or collapsed.
53
50
 
54
- ### Disable an item
55
- Use the `disabled` property on the accordion item to prevent it from being expanded or collapsed.
56
-
57
- ```html
58
- <daff-accordion-item [disabled]="true"></daff-accordion-item>
59
- ```
51
+ <design-land-example-viewer-container example="disabled-accordion"></design-land-example-viewer-container>
60
52
 
61
53
  ## Accessibility
62
54
  Accordion follows the [Accordion WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/).
63
55
 
64
- - Titles have an `id`, the `button` role, the `aria-expanded` state, and the `aria-controls` property set to the ID specified by the `contentId` property. It uses an autogenerated value by default but can be customized.
65
- - Content blocks have an `id`, the `region` role, and the `aria-labelledby` property set to the ID specified by the `itemId` property. It uses an autogenerated value by default but can be customized.
56
+ Titles act as buttons with:
57
+ - `role="button"`
58
+ - A unique `id`, defined by the `contentId` property.
59
+ - `aria-expanded` to indicate current state.
60
+ - `aria-controls` property linked to the associated panel content.
61
+
62
+ Content blocks include:
63
+ - `role="region"`
64
+ - A unique `id`, defined by the `itemId` property.
65
+ - `aria-labelledby` property linked to the corresponding title.
66
+
67
+ IDs are autogenerated by default but can be overridden via the `contentId` and `itemId` inputs on `<daff-accordion-item>`.
66
68
 
67
69
  ### Keyboard interactions
68
70
  | Key | Action |
69
71
  | --- | ------ |
70
72
  | `Tab` | Moves focus to the next focusable element. |
71
- | `Space` or `Enter` | When focus is on the accordion item, it collapses or expands the associated content panel. |
73
+ | `Space` / `Enter` | Expands or collapses the focused accordion item's panel content. |
@@ -1,7 +1,21 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "@daffodil/design";
3
3
  /**
4
- * A wrapper for grouping accordion items.
4
+ * Groups accordion items.
5
+ *
6
+ * @example
7
+ * ```html
8
+ * <daff-accordion>
9
+ * <daff-accordion-item>
10
+ * <div daffAccordionItemTitle>Title</div>
11
+ * <div>Expandable content</div>
12
+ * </daff-accordion-item>
13
+ * <daff-accordion-item>
14
+ * <div daffAccordionItemTitle>Title</div>
15
+ * <div>Expandable content</div>
16
+ * </daff-accordion-item>
17
+ * </daff-accordion>
18
+ * ```
5
19
  */
6
20
  export declare class DaffAccordionComponent {
7
21
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffAccordionComponent, never>;
@@ -3,8 +3,15 @@ import { DaffOpenable, DaffOpenableDirective } from '@daffodil/design';
3
3
  import * as i0 from "@angular/core";
4
4
  import * as i1 from "@daffodil/design";
5
5
  /**
6
- * The wrapper for the title and content. It handles the expansion and collapse of the inner content when clicked.
7
- * All `daff-accordion-item`s should be grouped inside the `daff-accordion` component.
6
+ * Contains the title and collapsible content. Handles expansion and collapse on user interaction. All `<daff-accordion-item>`s should be grouped inside a `<daff-accordion>`.
7
+ *
8
+ * @example
9
+ * ```html
10
+ * <daff-accordion-item>
11
+ * <div daffAccordionItemTitle>Title</div>
12
+ * <div>Accordion content</div>
13
+ * </daff-accordion-item>
14
+ * ```
8
15
  */
9
16
  export declare class DaffAccordionItemComponent implements OnInit, DaffOpenable {
10
17
  private openDirective;
@@ -21,7 +28,7 @@ export declare class DaffAccordionItemComponent implements OnInit, DaffOpenable
21
28
  */
22
29
  contentId: string;
23
30
  /**
24
- * Whether or not the item is initially opened by default.
31
+ * Whether or not an accordion item is initially expanded by default.
25
32
  */
26
33
  initiallyExpanded: boolean;
27
34
  /**
@@ -1,6 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
2
  /**
3
- * Used to provide a high level overview of the content. It should be wrapped by a `<daff-accordion-item>`.
3
+ * Used to provide a high level overview of the panel content. It should be wrapped by a `<daff-accordion-item>`.
4
+ *
5
+ * @example
6
+ * ```html
7
+ * <div daffAccordionItemTitle>Title</div>
8
+ * ```
4
9
  */
5
10
  export declare class DaffAccordionItemTitleDirective {
6
11
  /**
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DaffFormFieldActionDirective {
3
+ /**
4
+ * @docs-private
5
+ */
6
+ class: boolean;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffFormFieldActionDirective, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DaffFormFieldActionDirective, "[daffFormFieldAction]", never, {}, {}, never, never, true, never>;
9
+ }
@@ -2,10 +2,12 @@ import { AfterContentInit, AfterContentChecked, ChangeDetectorRef, AfterViewInit
2
2
  import { DaffPrefixDirective } from '../../../../core/prefix-suffix/prefix.directive';
3
3
  import { DaffSuffixDirective } from '../../../../core/prefix-suffix/suffix.directive';
4
4
  import { DaffFormLabelDirective } from '../../form-label/form-label.directive';
5
+ import { DaffFormFieldActionDirective } from '../action/action.directive';
5
6
  import { DaffFormFieldControl } from '../form-field-control';
6
7
  import { DaffFormFieldLabelDirective } from '../label/label.directive';
7
8
  import * as i0 from "@angular/core";
8
9
  import * as i1 from "../../../../core/skeletonable/skeletonable.directive";
10
+ export type DaffFormFieldApperanace = 'fluid' | 'fixed';
9
11
  export declare class DaffFormFieldComponent implements AfterContentInit, AfterContentChecked, AfterViewInit {
10
12
  private cd;
11
13
  /** @docs-private */
@@ -15,8 +17,16 @@ export declare class DaffFormFieldComponent implements AfterContentInit, AfterCo
15
17
  constructor(cd: ChangeDetectorRef);
16
18
  /** @docs-private */
17
19
  _prefix: DaffPrefixDirective;
20
+ /**
21
+ * @docs-private
22
+ */
23
+ get hasPrefixClass(): DaffPrefixDirective;
18
24
  /** @docs-private */
19
25
  _suffix: DaffSuffixDirective;
26
+ /**
27
+ * @docs-private
28
+ */
29
+ get hasSuffixClass(): DaffSuffixDirective | DaffFormFieldActionDirective;
20
30
  /**
21
31
  * @docs-private
22
32
  *
@@ -32,6 +42,10 @@ export declare class DaffFormFieldComponent implements AfterContentInit, AfterCo
32
42
  * @docs-private
33
43
  */
34
44
  _formFieldLabelDirective: DaffFormFieldLabelDirective;
45
+ /**
46
+ * @docs-private
47
+ */
48
+ _action: DaffFormFieldActionDirective;
35
49
  /**
36
50
  * @docs-private
37
51
  */
@@ -94,6 +108,24 @@ export declare class DaffFormFieldComponent implements AfterContentInit, AfterCo
94
108
  * @docs-private
95
109
  */
96
110
  get raisedClass(): boolean;
111
+ private _appearance;
112
+ /**
113
+ * The appearance style of a form field, whether the label is fluid or fixed.
114
+ */
115
+ get appearance(): DaffFormFieldApperanace;
116
+ set appearance(value: DaffFormFieldApperanace);
117
+ /**
118
+ * @docs-private
119
+ */
120
+ get fluidClass(): boolean;
121
+ /**
122
+ * @docs-private
123
+ */
124
+ get fixedClass(): boolean;
125
+ /**
126
+ * @docs-private
127
+ */
128
+ get isFixed(): boolean;
97
129
  /**
98
130
  * The unique id of the form field. Defaults to an autogenerated value. When using this,
99
131
  * it's your responsibility to ensure that the id for each form field is unique.
@@ -152,5 +184,5 @@ export declare class DaffFormFieldComponent implements AfterContentInit, AfterCo
152
184
  */
153
185
  ngAfterContentChecked(): void;
154
186
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffFormFieldComponent, never>;
155
- static ɵcmp: i0.ɵɵComponentDeclaration<DaffFormFieldComponent, "daff-form-field", never, { "id": { "alias": "id"; "required": false; }; }, {}, ["_prefix", "_suffix", "_control", "_formLabelDirective", "_formFieldLabelDirective", "_hint", "_error"], ["[daffPrefix]", "label[daffFormLabel]", "daff-form-label", "label", "*", "[daffSuffix]", "daff-hint", "daff-error-message"], true, [{ directive: typeof i1.DaffSkeletonableDirective; inputs: { "skeleton": "skeleton"; }; outputs: {}; }]>;
187
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffFormFieldComponent, "daff-form-field", never, { "appearance": { "alias": "appearance"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, ["_prefix", "_suffix", "_control", "_formLabelDirective", "_formFieldLabelDirective", "_action", "_hint", "_error"], ["*", "[daffPrefix]", "*", "[daffSuffix]", "daff-hint", "daff-error-message", "[daffFormFieldAction]", "label[daffFormLabel]", "daff-form-label", "label"], true, [{ directive: typeof i1.DaffSkeletonableDirective; inputs: { "skeleton": "skeleton"; }; outputs: {}; }]>;
156
188
  }
@@ -4,8 +4,9 @@ import { DaffSuffixDirective } from '../../../core/prefix-suffix/suffix.directiv
4
4
  import { DaffErrorMessageComponent } from '../error-message/error-message.component';
5
5
  import { DaffFormLabelDirective } from '../form-label/form-label.directive';
6
6
  import { DaffHintComponent } from '../hint/hint.component';
7
+ import { DaffFormFieldActionDirective } from './action/action.directive';
7
8
  import { DaffFormFieldLabelDirective } from './label/label.directive';
8
9
  /**
9
10
  * @docs-private
10
11
  */
11
- export declare const DAFF_FORM_FIELD_COMPONENTS: readonly [typeof DaffFormFieldComponent, typeof DaffErrorMessageComponent, typeof DaffFormLabelDirective, typeof DaffHintComponent, typeof DaffPrefixDirective, typeof DaffSuffixDirective, typeof DaffFormFieldLabelDirective];
12
+ export declare const DAFF_FORM_FIELD_COMPONENTS: readonly [typeof DaffFormFieldComponent, typeof DaffErrorMessageComponent, typeof DaffFormLabelDirective, typeof DaffHintComponent, typeof DaffPrefixDirective, typeof DaffSuffixDirective, typeof DaffFormFieldLabelDirective, typeof DaffFormFieldActionDirective];
@@ -3,3 +3,4 @@ export { DaffFormFieldComponent } from './form-field/form-field.component';
3
3
  export { DaffFormFieldControl } from './form-field-control';
4
4
  export { DAFF_FORM_FIELD_COMPONENTS } from './form-field';
5
5
  export { DaffFormFieldLabelDirective } from './label/label.directive';
6
+ export { DaffFormFieldActionDirective } from './action/action.directive';
@@ -1,22 +1,14 @@
1
1
  # Breadcrumb
2
- Breadcrumbs are a secondary navigation that displays a user's location within a website or application.
2
+ Breadcrumb is a secondary navigation pattern that shows users their current location within a website or application’s hierarchy.
3
3
 
4
4
  ## Overview
5
- Breadcrumbs are a visual representation of the site's navigational hierarchy. They indicate the current page's location and allows users to easily move up to a parent level.
6
-
7
- ## Requirements
8
- - `[daff-breadcrumb]` is required to be used with the native HTML `<ol>` element.
9
- - Each `[daffBreadcrumbItem]` needs to be a `<li>` element.
10
-
11
- ## Structure
12
- Breadcrumbs are built using `[daff-breadcrumb]` and `[daffBreadCrumbItem]`.
13
-
14
- - **`[daff-breadcrumb]`**: a wrapper for grouping breadcrumb items.
15
- - **`[daffBreacrumbItem]`**: used to display each breadcrumb item.
5
+ Breadcrumbs visually represent the navigational structure of a site or app and helps users navigate to parent levels with ease. Each breadcrumb item corresponds to a level in the hierarchy, with the last item indicating the current page or context.
16
6
 
17
7
  <design-land-example-viewer-container example="basic-breadcrumb"></design-land-example-viewer-container>
18
8
 
19
9
  ## Usage
10
+ To use the breadcrumb components, import `DAFF_BREADCRUMB_COMPONENTS` into your custom component:
11
+
20
12
  ```ts
21
13
  import { DAFF_BREADCRUMB_COMPONENTS } from '@daffodil/design/breadcrumb';
22
14
 
@@ -30,16 +22,19 @@ import { DAFF_BREADCRUMB_COMPONENTS } from '@daffodil/design/breadcrumb';
30
22
  export class CustomComponent {}
31
23
  ```
32
24
 
25
+ ## Anatomy
26
+ A breadcrumb is composed of the following:
27
+
28
+ - **`[daff-breadcrumb]`**: Groups breadcrumb items. Must be applied to a native `<ol>` element.
29
+ - **`[daffBreacrumbItem]`**: Represents each individual breadcrumb item. Must be used on a `<li>` element.
30
+
33
31
  ```html
34
32
  <ol daff-breadcrumb>
35
33
  <li daffBreadcrumbItem>
36
- <a routerLink="/link">Link</a>
37
- </li>
38
- <li daffBreadcrumbItem>
39
- <a routerLink="/link">Link</a>
34
+ <a routerLink="/">Home</a>
40
35
  </li>
41
36
  <li daffBreacrumbItem>
42
- <span>Active Link</span>
37
+ <span>Current page</span>
43
38
  </li>
44
39
  </ol>
45
40
  ```
@@ -47,16 +42,23 @@ export class CustomComponent {}
47
42
  ## Accessibility
48
43
  Breadcrumb follows the [Breadcrumb WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/).
49
44
 
50
- - `aria-current="page"` is automatically applied to the last item to indicate that it represents the current page.
45
+ - The last breadcrumb item is automatically assigned `aria-current="page"` to indicate the current page.
51
46
 
52
- In order to fully comply with the WAI-ARIA design pattern:
47
+ ### Best practices
48
+ To ensure full accessibility compliance with the WAI-ARIA design pattern:
53
49
 
54
- - Breadcrumbs should be wrapped in a native HTML `<nav>` element so that assistive technologies can present the breadcrumbs as a navigational element on the page.
55
- - Use `aria-label="Breadcrumb"` on the `nav` element to provide more context into what kind of navigation it is.
50
+ - Wrap the breadcrumb in a `<nav>` element so assistive technologies can present the breadcrumb as a navigational element on the page.
51
+ - Provide a descriptive `aria-label` on the `<nav>` element to identify the type of navigation.
56
52
 
57
53
  ```html
58
- <nav aria-label="breadcrumb">
54
+ <nav aria-label="Category breadcrumb">
59
55
  <ol daff-breadcrumb>
56
+ <li daffBreadcrumbItem>
57
+ <a routerLink="/">Home</a>
58
+ </li>
59
+ <li daffBreadcrumbItem>
60
+ <span>Current Page</span>
61
+ </li>
60
62
  </ol>
61
63
  </nav>
62
64
  ```
@@ -2,6 +2,21 @@ import { QueryList, AfterContentInit, DestroyRef } from '@angular/core';
2
2
  import { DaffBreadcrumbItemDirective } from '../breadcrumb-item/breadcrumb-item.directive';
3
3
  import * as i0 from "@angular/core";
4
4
  import * as i1 from "@daffodil/design";
5
+ /**
6
+ * Groups breadcrumb items. Must be applied to a native `<ol>` element.
7
+ *
8
+ * @example
9
+ * ```html
10
+ * <ol daff-breadcrumb>
11
+ * <li daffBreadcrumbItem>
12
+ * <a routerLink="/">Home</a>
13
+ * </li>
14
+ * <li daffBreacrumbItem>
15
+ * <span>Current page</span>
16
+ * </li>
17
+ * </ol>
18
+ * ```
19
+ */
5
20
  export declare class DaffBreadcrumbComponent implements AfterContentInit {
6
21
  private destroyRef;
7
22
  constructor(destroyRef: DestroyRef);
@@ -1,5 +1,15 @@
1
1
  import { ChangeDetectorRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
+ /**
4
+ * Represents each individual breadcrumb item. Must be used on a `<li>` element.
5
+ *
6
+ * @example
7
+ * ```html
8
+ * <li daffBreadcrumbItem>
9
+ * <a routerLink="/">Link</a>
10
+ * </li>
11
+ * ```
12
+ */
3
13
  export declare class DaffBreadcrumbItemDirective {
4
14
  private cdRef;
5
15
  /**
package/button/README.md CHANGED
@@ -1,55 +1,63 @@
1
1
  # Button
2
- Buttons are used to make actions apparent to the end user. It can be used to navigate users to a different page or to perform an action. Buttons can contain text, icons, or both.
2
+ Buttons make actions apparent to users and can navigate to different pages or perform actions. They can display text, icons, or both.
3
3
 
4
4
  ## Overview
5
- Native `<button>` or `<a>` elements are always used in order to provide an easy, accessible experience for users.
5
+ Button supports five variants that change its visual style, each applied as an attribute:
6
6
 
7
- - `<a>` should be used for interactions that will navigate users to a new page or to a different target on the same page.
8
- - `<button>` should be used when a clickable action is performed within the same page.
7
+ | Attribute | Description |
8
+ | --------- | ----------- |
9
+ | `daff-button` | Rectangular button with background color |
10
+ | `daff-flat-button`| Rectangular button with no outline or background color |
11
+ | `daff-icon-button` | Icon only button used with icon fonts |
12
+ | `daff-stroked-button` | Rectangular button with oultline, no background color |
13
+ | `daff-underline-button` | Text button with underline styling |
9
14
 
10
- ## Types
11
- Button supports five types that change its visual style.
12
-
13
- - `daff-button` - Rectangular contained button with background color
14
- - `daff-flat-button` - Rectangular contained button with no outline or background color
15
- - `daff-icon-button` - Icon button used with icon fonts
16
- - `daff-stroked-button` - Rectangular outlined button with no background color
17
-
18
- ### Basic Button
15
+ **Basic button**
19
16
  <design-land-example-viewer-container example="basic-button"></design-land-example-viewer-container>
20
17
 
21
- ### Flat Button
18
+ **Flat button**
22
19
  <design-land-example-viewer-container example="flat-button"></design-land-example-viewer-container>
23
20
 
24
- ### Stroked button
21
+ **Stroked button**
25
22
  <design-land-example-viewer-container example="stroked-button"></design-land-example-viewer-container>
26
23
 
27
24
  > `dark`, `light`, and `theme` should be used with caution to ensure that there is sufficient contrast.
28
25
 
29
- ### Icon button
26
+ **Icon button**
30
27
  <design-land-example-viewer-container example="icon-button"></design-land-example-viewer-container>
31
28
 
32
29
  > `dark`, `light`, and `theme` should be used with caution to ensure that there is sufficient contrast.
33
30
 
34
- ### Underline button
31
+ **Underline button**
35
32
  <design-land-example-viewer-container example="underline-button"></design-land-example-viewer-container>
36
33
 
37
- ### Raised button (deprecated)
38
- <design-land-example-viewer-container example="raised-button"></design-land-example-viewer-container>
34
+ ## When to use
35
+ Native `<button>` or `<a>` elements should always be used in order to provide an easy, accessible experience for users.
36
+
37
+ - Use `<a>` for navigation to new pages or different sections.
38
+ - Use `<button>` for actions performed within the same page.
39
39
 
40
40
  ## Usage
41
41
 
42
42
  ### Within a standalone component
43
- To use button in a standalone component, import each button type directly into your custom component. Buttons can be imported individually or all together by using `DAFF_BUTTON_COMPONENTS`:
43
+ To use button in a standalone component, import each button type directly into your custom component.
44
+
45
+ Available imports:
46
+ - `DAFF_BASIC_BUTTON_COMPONENTS`
47
+ - `DAFF_FLAT_BUTTON_COMPONENTS`
48
+ - `DAFF_ICON_BUTTON_COMPONENTS`
49
+ - `DAFF_STROKED_BUTTON_COMPONENTS`
50
+ - `DAFF_UNDERLINE_BUTTON_COMPONENTS`
51
+ - `DAFF_BUTTON_COMPONENTS` (all types)
44
52
 
45
53
  ```ts
46
- import { DaffButtonComponent } from '@daffodil/design/button';
54
+ import { DAFF_BASIC_BUTTON_COMPONENTS } from '@daffodil/design/button';
47
55
 
48
56
  @Component({
49
57
  selector: 'custom-component',
50
58
  templateUrl: './custom-component.component.html',
51
59
  imports: [
52
- DaffButtonComponent,
60
+ DAFF_BASIC_BUTTON_COMPONENTS,
53
61
  ],
54
62
  })
55
63
  export class CustomComponent {}
@@ -79,41 +87,49 @@ export class CustomComponentModule { }
79
87
 
80
88
  > This method is deprecated. It's recommended to update all custom components to standalone.
81
89
 
90
+ ## Anatomy
91
+ Buttons should always have a label, unless you are only using an icon that is universally understood and accessible.
92
+
93
+ ### Icon support
94
+ An icon can be rendered on either side of the button text content with the `daffPrefix` and `daffSuffix` selectors. Avoid using both simultaneously.
95
+
96
+ ```html
97
+ <button daff-button>
98
+ <fa-icon [faIcon]="faUser" daffPrefix></fa-icon>
99
+ Button label
100
+ </button>
101
+
102
+ <button daff-button>
103
+ Button label
104
+ <fa-icon [faIcon]="faArrowRight" daffPrefix></fa-icon>
105
+ </button>
106
+ ```
107
+
82
108
  ## Sizes
83
- Use the `size` property to specify a button size. Setting this property will change the height and padding of a button. The size of all variants will default to `md` if none is defined.
109
+ Use the `size` property to control button dimensions. The default size is `md`.
84
110
 
85
111
  <design-land-example-viewer-container example="sizeable-button"></design-land-example-viewer-container>
86
112
 
87
113
  ## Colors
88
- Use the `color` property to change the color of a button. The default color is light gray.
114
+ Use the `color` property to change the color of a button.
89
115
 
90
- > For select button types, `dark` and `light` should be used on a darker background in order to have sufficient contrast.
116
+ > Note: `dark`, `light`, and `theme` should be used on appropriate backgrounds for sufficient contrast.
91
117
 
92
118
  ## Status indicators
93
- Buttons with status indicators can be used to distinguish what type of action it performs and its importance compared to other buttons in the same context. Use the `status` property to change the status.
119
+ Status indicators help users understand the type of action a button performs and its importance relative to other buttons in the same context. Use the `status` property to convey different semantic meanings.
94
120
 
95
121
  <design-land-example-viewer-container example="statusable-button"></design-land-example-viewer-container>
96
122
 
97
123
  ## Elevation
98
- Use the `elevated` property to add a shadow to buttons. Note that the `elevated` property is not supported for flat, icon, and underline buttons.
124
+ Add shadows to buttons with the `elevated` property.
99
125
 
100
- <design-land-example-viewer-container example="elevated-button"></design-land-example-viewer-container>
101
-
102
- ## Icon support
103
- An icon can be rendered on either side of the button text content with the `daffPrefix` and `daffSuffix` selectors.
126
+ > Note: The `elevated` property is not supported for flat, icon, and underline buttons.
104
127
 
105
- ```html
106
- <button daff-button>
107
- <fa-icon [faIcon]="faUser" daffPrefix></fa-icon>
108
- Button Content
109
- <fa-icon [faIcon]="faUser" daffSuffix></fa-icon>
110
- </button>
111
- ```
128
+ <design-land-example-viewer-container example="elevated-button"></design-land-example-viewer-container>
112
129
 
113
130
  ## Accessbility
114
131
  Daffodil uses native `<a>` and `<button>` HTML elements to ensure an accessible experience by default.
115
132
 
116
- - The `<button>` element should be used when a clickable action is performed within the same page.
117
- - The `<a>` element should be used to navigate users to a new page or to a different target on the same page.
118
-
119
- Buttons and links containing only icons (`<daff-icon-button>`) need to be given meaningful labels using `aria-label` or `aria-labelledby`.
133
+ - Use `<a>` for navigation to new pages or different sections.
134
+ - Use `<button>` for actions performed within the same page.
135
+ - Icon only buttons (`<daff-icon-button>`) need to be given meaningful labels using `aria-label` or `aria-labelledby`.
@@ -5,18 +5,24 @@ import * as i1 from "@daffodil/design";
5
5
  import * as i2 from "./button-sizable.directive";
6
6
  export declare class DaffButtonBaseDirective {
7
7
  private size;
8
+ /**
9
+ * @docs-private
10
+ */
8
11
  _prefix: DaffPrefixDirective;
9
- _suffix: DaffSuffixDirective;
10
- constructor(size: DaffButtonSizableDirective);
11
12
  /**
12
13
  * @docs-private
13
14
  */
14
- get disabledClass(): any;
15
+ _suffix: DaffSuffixDirective;
16
+ constructor(size: DaffButtonSizableDirective);
15
17
  /**
16
- * Sets the tabindex. Defaults to 0.
18
+ * Sets the tabindex.
17
19
  */
18
20
  tabindex: number;
19
21
  private _disabled;
22
+ /**
23
+ * @docs-private
24
+ */
25
+ get disabledClass(): any;
20
26
  /**
21
27
  * The disabled state of the button.
22
28
  */
@@ -1,3 +1,4 @@
1
+ import { DaffPrefixDirective, DaffSuffixDirective } from '@daffodil/design';
1
2
  import { DaffButtonComponent } from './button/basic/button.component';
2
3
  import { DaffFlatButtonComponent } from './button/flat/flat.component';
3
4
  import { DaffIconButtonComponent } from './button/icon/icon.component';
@@ -7,4 +8,24 @@ import { DaffUnderlineButtonComponent } from './button/underline/underline.compo
7
8
  /**
8
9
  * @docs-private
9
10
  */
10
- export declare const DAFF_BUTTON_COMPONENTS: readonly [typeof DaffButtonComponent, typeof DaffFlatButtonComponent, typeof DaffIconButtonComponent, typeof DaffRaisedButtonComponent, typeof DaffStrokedButtonComponent, typeof DaffUnderlineButtonComponent];
11
+ export declare const DAFF_BUTTON_COMPONENTS: readonly [typeof DaffButtonComponent, typeof DaffFlatButtonComponent, typeof DaffIconButtonComponent, typeof DaffRaisedButtonComponent, typeof DaffStrokedButtonComponent, typeof DaffUnderlineButtonComponent, typeof DaffPrefixDirective, typeof DaffSuffixDirective];
12
+ /**
13
+ * @docs-private
14
+ */
15
+ export declare const DAFF_BASIC_BUTTON_COMPONENTS: readonly [typeof DaffButtonComponent, typeof DaffPrefixDirective, typeof DaffSuffixDirective];
16
+ /**
17
+ * @docs-private
18
+ */
19
+ export declare const DAFF_FLAT_BUTTON_COMPONENTS: readonly [typeof DaffFlatButtonComponent, typeof DaffPrefixDirective, typeof DaffSuffixDirective];
20
+ /**
21
+ * @docs-private
22
+ */
23
+ export declare const DAFF_ICON_BUTTON_COMPONENTS: readonly [typeof DaffIconButtonComponent, typeof DaffPrefixDirective, typeof DaffSuffixDirective];
24
+ /**
25
+ * @docs-private
26
+ */
27
+ export declare const DAFF_STROKED_BUTTON_COMPONENTS: readonly [typeof DaffStrokedButtonComponent, typeof DaffPrefixDirective, typeof DaffSuffixDirective];
28
+ /**
29
+ * @docs-private
30
+ */
31
+ export declare const DAFF_UNDERLINE_BUTTON_COMPONENTS: readonly [typeof DaffUnderlineButtonComponent, typeof DaffPrefixDirective, typeof DaffSuffixDirective];
@@ -1,5 +1,5 @@
1
1
  export { DaffButtonModule } from './button.module';
2
- export { DAFF_BUTTON_COMPONENTS } from './button';
2
+ export { DAFF_BUTTON_COMPONENTS, DAFF_BASIC_BUTTON_COMPONENTS, DAFF_FLAT_BUTTON_COMPONENTS, DAFF_ICON_BUTTON_COMPONENTS, DAFF_STROKED_BUTTON_COMPONENTS, DAFF_UNDERLINE_BUTTON_COMPONENTS, } from './button';
3
3
  export { DaffButtonComponent } from './button/basic/button.component';
4
4
  export { DaffFlatButtonComponent } from './button/flat/flat.component';
5
5
  export { DaffRaisedButtonComponent } from './button/raised/raised.component';
@@ -23,7 +23,6 @@
23
23
 
24
24
  @mixin daff-button-base {
25
25
  @include interactions.clickable();
26
- @include t.text-truncate();
27
26
  display: inline-flex;
28
27
  justify-content: center;
29
28
  align-items: center;
@@ -42,7 +42,7 @@
42
42
 
43
43
  .daff-raised-button {
44
44
  @include daff-raised-button-theme-variant(
45
- daff-illuminate($base, $neutral, 2)
45
+ daff-color($neutral, 20)
46
46
  );
47
47
 
48
48
  &.daff-primary {
@@ -76,9 +76,9 @@
76
76
  &[disabled],
77
77
  &.disabled {
78
78
  @include daff-raised-button-theme-variant(
79
- daff-illuminate($base, $neutral, 3)
79
+ daff-color($neutral, 30)
80
80
  );
81
- color: daff-illuminate($base, $neutral, 5);
81
+ color: daff-color($neutral, 50);
82
82
 
83
83
  &::after {
84
84
  box-shadow: none;