@daffodil/design 0.91.0 → 0.92.3-rc.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 (142) hide show
  1. package/accordion/README.md +26 -38
  2. package/accordion/index.d.ts +2 -2
  3. package/article/README.md +66 -46
  4. package/article/index.d.ts +22 -1
  5. package/article/src/article-theme.scss +12 -0
  6. package/breadcrumb/README.md +6 -1
  7. package/breadcrumb/index.d.ts +65 -11
  8. package/breadcrumb/src/breadcrumb-theme.scss +1 -1
  9. package/button/README.md +36 -33
  10. package/button/index.d.ts +26 -5
  11. package/button/src/button/basic/button-theme.scss +4 -2
  12. package/button/src/button/button-base.scss +26 -3
  13. package/button/src/button/icon/icon-theme.scss +10 -6
  14. package/button/src/button/raised/raised-theme.scss +4 -2
  15. package/callout/README.md +15 -27
  16. package/card/README.md +36 -61
  17. package/container/README.md +18 -23
  18. package/fesm2022/daffodil-design-accordion.mjs +13 -13
  19. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-article.mjs +168 -26
  21. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-breadcrumb.mjs +180 -28
  23. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-button.mjs +83 -42
  25. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-callout.mjs +23 -23
  27. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-card.mjs +33 -33
  29. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-checkbox.mjs +13 -13
  31. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-container.mjs +8 -8
  33. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-form-field.mjs +26 -26
  35. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-form.mjs +9 -9
  37. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-hero.mjs +23 -23
  39. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-image.mjs +8 -8
  41. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  42. package/fesm2022/daffodil-design-input.mjs +18 -14
  43. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-link-set.mjs +25 -17
  45. package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-list.mjs +16 -16
  47. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-loading-icon.mjs +8 -8
  49. package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
  50. package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
  51. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-menu.mjs +223 -60
  53. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-modal.mjs +33 -29
  55. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-native-select.mjs +47 -41
  57. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-navbar.mjs +25 -21
  59. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-notification.mjs +16 -16
  61. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-paginator.mjs +7 -7
  63. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
  65. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-quantity-field.mjs +17 -14
  67. package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-radio.mjs +16 -16
  69. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-select.mjs +6 -6
  71. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-sidebar.mjs +25 -25
  73. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-spinner.mjs +99 -0
  75. package/fesm2022/daffodil-design-spinner.mjs.map +1 -0
  76. package/fesm2022/daffodil-design-switch.mjs +3 -3
  77. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-tabs.mjs +15 -15
  79. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-tag.mjs +7 -7
  81. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-text-snippet.mjs +6 -8
  83. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  84. package/fesm2022/daffodil-design-textarea.mjs +6 -3
  85. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-toast.mjs +23 -25
  87. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-tree.mjs +152 -103
  89. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  90. package/fesm2022/daffodil-design-youtube-player.mjs +6 -6
  91. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  92. package/fesm2022/daffodil-design.mjs +385 -326
  93. package/fesm2022/daffodil-design.mjs.map +1 -1
  94. package/form-field/README.md +50 -85
  95. package/form-field/index.d.ts +11 -9
  96. package/hero/README.md +5 -5
  97. package/image/README.md +2 -2
  98. package/index.d.ts +184 -270
  99. package/input/README.md +4 -4
  100. package/input/index.d.ts +4 -3
  101. package/link-set/index.d.ts +9 -1
  102. package/list/README.md +2 -2
  103. package/loading-icon/README.md +1 -1
  104. package/loading-icon/index.d.ts +1 -1
  105. package/media-gallery/README.md +3 -3
  106. package/menu/README.md +107 -10
  107. package/menu/index.d.ts +143 -11
  108. package/modal/README.md +1 -1
  109. package/modal/index.d.ts +23 -15
  110. package/native-select/README.md +4 -4
  111. package/native-select/index.d.ts +8 -7
  112. package/navbar/README.md +23 -17
  113. package/navbar/index.d.ts +12 -2
  114. package/navbar/src/navbar-theme.scss +4 -46
  115. package/notification/README.md +4 -4
  116. package/package.json +1 -1
  117. package/paginator/README.md +42 -6
  118. package/paginator/index.d.ts +4 -2
  119. package/progress-bar/README.md +3 -3
  120. package/quantity-field/README.md +4 -4
  121. package/quantity-field/index.d.ts +4 -1
  122. package/radio/README.md +1 -1
  123. package/scss/theme.scss +7 -1
  124. package/scss/theming/_color-palettes.scss +0 -6
  125. package/select/README.md +4 -4
  126. package/sidebar/README.md +6 -6
  127. package/spinner/README.md +57 -0
  128. package/spinner/index.d.ts +53 -0
  129. package/spinner/src/spinner-theme.scss +62 -0
  130. package/switch/README.md +4 -4
  131. package/switch/index.d.ts +2 -2
  132. package/tabs/README.md +1 -1
  133. package/tabs/index.d.ts +2 -2
  134. package/tag/README.md +24 -30
  135. package/tag/index.d.ts +1 -1
  136. package/text-snippet/README.md +1 -1
  137. package/text-snippet/src/text-snippet-theme.scss +12 -0
  138. package/textarea/README.md +4 -4
  139. package/textarea/index.d.ts +4 -4
  140. package/toast/README.md +4 -4
  141. package/tree/README.md +39 -22
  142. package/tree/index.d.ts +57 -90
@@ -4,7 +4,7 @@ An accordion is a group of vertically stacked, collapsible sections that allow u
4
4
  ## Overview
5
5
  Accordions help reduce scrolling by hiding non-essential information until it's needed. They organize content into collapsible sections, making it easier for users to find and focus on information relevant to them. This is especially useful for long pages where not all information needs to be visible at once.
6
6
 
7
- <design-land-example-viewer-container example="basic-accordion"></design-land-example-viewer-container>
7
+ <daff-docs-example-viewer example="basic-accordion"></daff-docs-example-viewer>
8
8
 
9
9
  ## Best practices
10
10
 
@@ -17,7 +17,7 @@ Accordions help reduce scrolling by hiding non-essential information until it's
17
17
  - The content is very short and hiding it adds unnecessary complexity (use [list](/libs/design/list/README.md) instead)
18
18
 
19
19
  ## Usage
20
- To use accordion, import `DAFF_ACCORDION_COMPONENTS` directly into your custom component:
20
+ Import `DAFF_ACCORDION_COMPONENTS` into your component:
21
21
 
22
22
  ```ts
23
23
  import { DAFF_ACCORDION_COMPONENTS } from '@daffodil/design/accordion';
@@ -33,60 +33,48 @@ export class CustomComponent {}
33
33
  ```
34
34
 
35
35
  ## Anatomy
36
- An accordion consists of the following components:
36
+ An accordion is composed of a container, items, titles, and content:
37
37
 
38
- ### Container
39
- **`<daff-accordion>`**: The wrapper component that groups all accordion items together.
40
-
41
- ### Item
42
- **`<daff-accordion-item>`**: Individual collapsible section containing a title and content. Handles expansion and collapse on user interaction.
43
-
44
- ### Title
45
- **`[daffAccordionItemTitle]`**: The clickable header that toggles the accordion item's visibility.
46
-
47
- ### Content
48
- Content placed inside `<daff-accordion-item>` (excluding the title) forms the collapsible panel content that is shown or hidden when toggled.
49
-
50
- ### Basic structure
51
38
  ```html
52
39
  <daff-accordion>
53
- <daff-accordion-item>
54
- <div daffAccordionItemTitle>Title</div>
55
- <div>Expandable content</div>
56
- </daff-accordion-item>
40
+ <daff-accordion-item>
41
+ <h3 daffAccordionItemTitle>Title</h3>
42
+ <div>Expandable content</div>
43
+ </daff-accordion-item>
57
44
  </daff-accordion>
58
45
  ```
59
46
 
47
+ - **`<daff-accordion>`**: The wrapper component that groups all accordion items together.
48
+ - **`<daff-accordion-item>`**: Individual collapsible section containing a title and content. Handles expansion and collapse on user interaction.
49
+ - **`[daffAccordionItemTitle]`**: The clickable header that toggles the accordion item's visibility.
50
+ - **Content**: Content placed inside `<daff-accordion-item>` (excluding the title) forms the collapsible panel content that is shown or hidden when toggled.
51
+
60
52
  ## Features
61
53
 
62
- ### Expand an item by default
54
+ ### Expanding by default
63
55
  Use the `initiallyExpanded` property on the accordion item to have an item open by default.
64
56
 
65
- <design-land-example-viewer-container example="initially-expanded-accordion"></design-land-example-viewer-container>
57
+ <daff-docs-example-viewer example="initially-expanded-accordion"></daff-docs-example-viewer>
66
58
 
67
- ### Disable an accordion item
59
+ ### Disabling an item
68
60
  Use the `disabled` property on the accordion item to disable and prevent it from being expanded or collapsed.
69
61
 
70
- <design-land-example-viewer-container example="disabled-accordion"></design-land-example-viewer-container>
62
+ <daff-docs-example-viewer example="disabled-accordion"></daff-docs-example-viewer>
71
63
 
72
64
  ## Accessibility
73
65
  Accordion follows the [Accordion WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/).
74
66
 
75
- Titles act as buttons with:
76
- - `role="button"`
77
- - A unique `id`, defined by the `contentId` property.
78
- - `aria-expanded` to indicate current state.
79
- - `aria-controls` property linked to the associated panel content.
80
-
81
- Content blocks include:
82
- - `role="region"`
83
- - A unique `id`, defined by the `itemId` property.
84
- - `aria-labelledby` property linked to the corresponding title.
67
+ ### Daffodil provides
68
+ - `role="button"` on titles with `aria-expanded` to indicate current state and `aria-controls` linking to the associated panel
69
+ - `role="region"` on content panels with `aria-labelledby` linking back to the corresponding title
70
+ - Unique IDs autogenerated for titles and panels (overridable via the `contentId` and `itemId` inputs on `<daff-accordion-item>`)
85
71
 
86
- IDs are autogenerated by default but can be overridden via the `contentId` and `itemId` inputs on `<daff-accordion-item>`.
87
-
88
- ### Keyboard interactions
72
+ #### Keyboard interactions
89
73
  | Key | Action |
90
74
  | --- | ------ |
91
75
  | `Tab` | Moves focus to the next focusable element. |
92
- | `Space` / `Enter` | Expands or collapses the focused accordion item's panel content. |
76
+ | `Enter` / `Space` | Expands or collapses the focused accordion item's panel content. |
77
+
78
+ ### Developer responsibilities
79
+ - Wrap titles in an appropriate heading element (`<h2>`, `<h3>`, etc.) so the accordion contributes to the page's heading structure
80
+ - Provide concise, descriptive title text
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { OnInit } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import * as i1 from '@daffodil/design';
5
- import { DaffOpenable, DaffOpenableDirective, DaffDisableableDirective } from '@daffodil/design';
5
+ import { DaffOpenable, DaffDisableable, DaffOpenableDirective, DaffDisableableDirective } from '@daffodil/design';
6
6
 
7
7
  /**
8
8
  * Groups accordion items.
@@ -37,7 +37,7 @@ declare class DaffAccordionComponent {
37
37
  * </daff-accordion-item>
38
38
  * ```
39
39
  */
40
- declare class DaffAccordionItemComponent implements OnInit, DaffOpenable {
40
+ declare class DaffAccordionItemComponent implements OnInit, DaffOpenable, DaffDisableable {
41
41
  private openDirective;
42
42
  private disabledDirective;
43
43
  /**
package/article/README.md CHANGED
@@ -1,52 +1,8 @@
1
1
  # Article
2
- Article provides styles to common element selectors to create an article in a content page.
2
+ Article provides styles for common HTML elements to create readable, well-formatted content pages.
3
3
 
4
4
  ## Overview
5
- Article can be used on any content page that displays large blocks of text-driven information. It's meant to be used as a standalone element and should not be nested inside any other components that may change the background color from the anticipated one. In the event that you must nest an article inside another component, please ensure that you set the article's background color to the default body color.
6
-
7
- ## Supported elements
8
-
9
- ### Headings
10
- <design-land-example-viewer-container example="article-headings"></design-land-example-viewer-container>
11
-
12
- ### Article Meta
13
- Meta is used if there is metadata information about your article (i.e. author name, date, etc). Meta is a custom directive of article and is not a native element selector. To use it, add `daffArticleMeta` to a paragraph (`<p>`).
14
-
15
- <design-land-example-viewer-container example="article-meta"></design-land-example-viewer-container>
16
-
17
- ### Link
18
- The link style in an article uses the default browser link style.
19
-
20
- <design-land-example-viewer-container example="article-link"></design-land-example-viewer-container>
21
-
22
- ### Table
23
- <design-land-example-viewer-container example="article-table"></design-land-example-viewer-container>
24
-
25
- ### Lists
26
-
27
- #### Unordered list
28
- <design-land-example-viewer-container example="article-ul"></design-land-example-viewer-container>
29
-
30
- #### Ordered list
31
- <design-land-example-viewer-container example="article-ol"></design-land-example-viewer-container>
32
-
33
- ### Code
34
- These are styles for inline and multiline blocks of code. By default, a copy button is added to all code blocks. Disable this by adding a `nocopy` attribute to the `pre` element.
35
-
36
- #### Inline code
37
- <design-land-example-viewer-container example="article-code-inline"></design-land-example-viewer-container>
38
-
39
- #### Code blocks
40
- <design-land-example-viewer-container example="article-code-block"></design-land-example-viewer-container>
41
-
42
- ### Horizontal rules
43
- <design-land-example-viewer-container example="article-hr"></design-land-example-viewer-container>
44
-
45
- ### Blockquote
46
- <design-land-example-viewer-container example="article-blockquote"></design-land-example-viewer-container>
47
-
48
- ## Encapsulation
49
- Articles also support other custom "non-native" components like [accordions](/libs/design/accordion/README.md), [media galleries](/libs/design/media-gallery/README.md), and [lists](/libs/design/list/README.md). Unlike typical HTML (`<p>`, `<ol>`, `<ul>`, etc) content, these components must be style encaspulated to prevent article styles bleeding down from the article into their content. Many Daffodil components support this out of the box. If you have a custom component that you would like to place inside an article, you can use the `DaffArticleEncapsulatedDirective` on your component to prevent article styles bleeding into your component.
5
+ Article is designed for content pages that display large blocks of text-driven information.
50
6
 
51
7
  ## Usage
52
8
 
@@ -88,4 +44,68 @@ import { CustomComponent } from './custom.component';
88
44
  export class CustomComponentModule { }
89
45
  ```
90
46
 
47
+ > **Warning**
48
+ >
91
49
  > This method is deprecated. It's recommended to update all custom components to standalone.
50
+
51
+ ## Custom elements
52
+
53
+ ### Meta
54
+ Meta displays article metadata such as author name and date. It's a custom directive, not a native element selector. To use it, add `daffArticleMeta` to a paragraph (`<p>`).
55
+
56
+ <daff-docs-example-viewer example="article-meta"></daff-docs-example-viewer>
57
+
58
+ ## Features
59
+
60
+ ### Heading anchor
61
+ `<h2>`, `<h3>`, and `<h4>` headings include an anchor link that directs users to that section and a copy button that copies the heading URL to the clipboard. To disable this, add a `nolink` attribute to the heading element.
62
+
63
+ <daff-docs-example-viewer example="article-headings"></daff-docs-example-viewer>
64
+
65
+ ### Code copy
66
+ Code blocks include a copy button by default. To disable this, add a `nocopy` attribute to the `pre` element.
67
+
68
+ #### Inline code
69
+ <daff-docs-example-viewer example="article-code-inline"></daff-docs-example-viewer>
70
+
71
+ #### Code blocks
72
+ <daff-docs-example-viewer example="article-code-block"></daff-docs-example-viewer>
73
+
74
+ ### Encapsulation
75
+ Articles support custom components like [accordion](/libs/design/accordion/README.md), [hero](/libs/design/hero/README.md), or [callout](/libs/design/callout/README.md). Unlike typical HTML elements (`<p>`, `<ol>`, `<ul>`, etc), these components must be style encapsulated to prevent article styles from bleeding into their content.
76
+
77
+ The following Daffodil Design components are already encapsulated and can be used directiy:
78
+ - Accordion
79
+ - Breadcrumb
80
+ - Button
81
+ - Callout
82
+ - Card
83
+ - Hero
84
+ - Link Set
85
+ - List
86
+ - Media Gallery
87
+ - Notification
88
+ - Tag
89
+ - Toast
90
+ - Tree
91
+
92
+ For custom components, use the `DaffArticleEncapsulatedDirective` to prevent article styles from bleeding in.
93
+
94
+ ## Styled HTML elements
95
+
96
+ ### Table
97
+ <daff-docs-example-viewer example="article-table"></daff-docs-example-viewer>
98
+
99
+ ### Lists
100
+
101
+ #### Unordered list
102
+ <daff-docs-example-viewer example="article-ul"></daff-docs-example-viewer>
103
+
104
+ #### Ordered list
105
+ <daff-docs-example-viewer example="article-ol"></daff-docs-example-viewer>
106
+
107
+ ### Horizontal rules
108
+ <daff-docs-example-viewer example="article-hr"></daff-docs-example-viewer>
109
+
110
+ ### Blockquote
111
+ <daff-docs-example-viewer example="article-blockquote"></daff-docs-example-viewer>
@@ -19,12 +19,33 @@ declare class DaffArticleCopyButtonService {
19
19
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffArticleCopyButtonService>;
20
20
  }
21
21
 
22
+ declare class DaffArticleHeadingLinkService {
23
+ private links;
24
+ /**
25
+ * Finds all h2, h3, and h4 elements and wraps their text content with heading link components.
26
+ * @param hostElement - The host element to search for heading elements.
27
+ * @param viewContainerRef - The view container to create the heading link components.
28
+ */
29
+ addLinksToHeadings(hostElement: HTMLElement, viewContainerRef: ViewContainerRef): void;
30
+ /**
31
+ * Cleanup heading link references
32
+ */
33
+ cleanup(): void;
34
+ /**
35
+ * Generates a URL-friendly fragment from heading text
36
+ */
37
+ private generateFragment;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffArticleHeadingLinkService, never>;
39
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffArticleHeadingLinkService>;
40
+ }
41
+
22
42
  /**
23
43
  * A component for creating articles within your page.
24
44
  */
25
45
  declare class DaffArticleComponent {
26
46
  private copyButtonService;
27
- constructor(copyButtonService: DaffArticleCopyButtonService);
47
+ private headingLinkService;
48
+ constructor(copyButtonService: DaffArticleCopyButtonService, headingLinkService: DaffArticleHeadingLinkService);
28
49
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffArticleComponent, never>;
29
50
  static ɵcmp: i0.ɵɵComponentDeclaration<DaffArticleComponent, "daff-article", never, {}, {}, never, ["*"], true, never>;
30
51
  }
@@ -90,6 +90,12 @@
90
90
  }
91
91
  }
92
92
  }
93
+
94
+ .daff-article-heading-link {
95
+ &__button {
96
+ color: daff-color($neutral, 70);
97
+ }
98
+ }
93
99
  }
94
100
 
95
101
  @include dark($mode) {
@@ -168,6 +174,12 @@
168
174
  }
169
175
  }
170
176
  }
177
+
178
+ .daff-article-heading-link {
179
+ &__button {
180
+ color: daff-color($neutral, 30);
181
+ }
182
+ }
171
183
  }
172
184
  }
173
185
  }
@@ -4,7 +4,7 @@ A breadcrumb is a secondary navigation pattern that shows users their current lo
4
4
  ## Overview
5
5
  Breadcrumbs visually represent the navigational structure of a site or app and help 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.
6
6
 
7
- <design-land-example-viewer-container example="basic-breadcrumb"></design-land-example-viewer-container>
7
+ <daff-docs-example-viewer example="basic-breadcrumb"></daff-docs-example-viewer>
8
8
 
9
9
  ## Best practices
10
10
 
@@ -79,6 +79,11 @@ A breadcrumb consists of the following components:
79
79
  </ol>
80
80
  ```
81
81
 
82
+ ## Features
83
+
84
+ ### Truncation
85
+ Breadcrumbs are automatically truncated into an overflow menu on mobile viewports. On desktop, truncation occurs when more than five items are present.
86
+
82
87
  ## Accessibility
83
88
  Breadcrumb follows the [Breadcrumb WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/).
84
89
 
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ChangeDetectorRef, AfterContentInit, DestroyRef, QueryList } from '@angular/core';
2
+ import { TemplateRef, ChangeDetectorRef, AfterContentInit, DestroyRef, QueryList } from '@angular/core';
3
+ import { BreakpointObserver } from '@angular/cdk/layout';
3
4
  import * as i1 from '@daffodil/design';
4
5
 
5
6
  /**
@@ -12,15 +13,32 @@ import * as i1 from '@daffodil/design';
12
13
  * </li>
13
14
  * ```
14
15
  */
15
- declare class DaffBreadcrumbItemDirective {
16
+ declare class DaffBreadcrumbItemComponent {
16
17
  private cdRef;
17
- private _active;
18
+ /**
19
+ * @docs-private
20
+ */
21
+ itemRef: TemplateRef<any>;
22
+ /**
23
+ * @docs-private
24
+ */
25
+ _active: boolean;
18
26
  constructor(cdRef: ChangeDetectorRef);
19
27
  /** Called by the DaffBreadcrumbComponent to set the active state */
20
28
  setActive(value: boolean): void;
21
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffBreadcrumbItemDirective, never>;
22
- static ɵdir: i0.ɵɵDirectiveDeclaration<DaffBreadcrumbItemDirective, "li[daffBreadcrumbItem]", never, {}, {}, never, never, true, never>;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffBreadcrumbItemComponent, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffBreadcrumbItemComponent, "li[daffBreadcrumbItem]", never, {}, {}, never, ["*"], true, never>;
31
+ }
32
+
33
+ interface DaffBreadcrumbRenderItem {
34
+ item: DaffBreadcrumbItemComponent;
35
+ type: 'breadcrumb';
36
+ }
37
+ interface DaffBreadcrumbRenderMenu {
38
+ type: 'menu';
39
+ target: 'mobileMenu' | 'desktopMenu';
23
40
  }
41
+ type DaffBreadcrumbRender = DaffBreadcrumbRenderItem | DaffBreadcrumbRenderMenu;
24
42
 
25
43
  /**
26
44
  * Groups breadcrumb items. Must be applied to a native `<ol>` element.
@@ -39,32 +57,68 @@ declare class DaffBreadcrumbItemDirective {
39
57
  */
40
58
  declare class DaffBreadcrumbComponent implements AfterContentInit {
41
59
  private destroyRef;
42
- constructor(destroyRef: DestroyRef);
60
+ private breakpointObserver;
61
+ constructor(destroyRef: DestroyRef, breakpointObserver: BreakpointObserver);
62
+ /**
63
+ * @docs-private
64
+ */
65
+ _isMobile: i0.WritableSignal<boolean>;
66
+ /**
67
+ * @docs-private
68
+ */
69
+ breadcrumbItems: QueryList<DaffBreadcrumbItemComponent>;
70
+ /**
71
+ * @docs-private
72
+ */
73
+ fullMenu: TemplateRef<unknown>;
74
+ /**
75
+ * @docs-private
76
+ */
77
+ partialMenu: TemplateRef<unknown>;
78
+ /**
79
+ * @docs-private
80
+ */
81
+ _breadcrumbItems: i0.Signal<readonly DaffBreadcrumbItemComponent[]>;
82
+ /**
83
+ * @docs-private
84
+ */
85
+ _partition: i0.Signal<{
86
+ visible: DaffBreadcrumbRender[];
87
+ menu: DaffBreadcrumbItemComponent[];
88
+ }>;
89
+ /**
90
+ * @docs-private
91
+ */
92
+ _computedBreadcrumbItems: i0.Signal<DaffBreadcrumbRender[]>;
93
+ /**
94
+ * @docs-private
95
+ */
96
+ _desktopMenuItems: i0.Signal<DaffBreadcrumbItemComponent[]>;
43
97
  /**
44
98
  * @docs-private
45
99
  */
46
- breadcrumbItems: QueryList<DaffBreadcrumbItemDirective>;
100
+ _mobileMenuItems: i0.Signal<DaffBreadcrumbItemComponent[]>;
47
101
  /**
48
102
  * @docs-private
49
103
  */
50
104
  ngAfterContentInit(): void;
51
105
  private updateActiveState;
52
106
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffBreadcrumbComponent, never>;
53
- static ɵcmp: i0.ɵɵComponentDeclaration<DaffBreadcrumbComponent, "ol[daff-breadcrumb]", never, {}, {}, ["breadcrumbItems"], ["[daffBreadcrumbItem]"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DaffSkeletonableDirective; inputs: { "skeleton": "skeleton"; }; outputs: {}; }]>;
107
+ static ɵcmp: i0.ɵɵComponentDeclaration<DaffBreadcrumbComponent, "ol[daff-breadcrumb]", never, {}, {}, ["_breadcrumbItems", "breadcrumbItems"], never, true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DaffSkeletonableDirective; inputs: { "skeleton": "skeleton"; }; outputs: {}; }]>;
54
108
  }
55
109
 
56
110
  /**
57
111
  * @docs-private
58
112
  */
59
- declare const DAFF_BREADCRUMB_COMPONENTS: readonly [typeof DaffBreadcrumbComponent, typeof DaffBreadcrumbItemDirective];
113
+ declare const DAFF_BREADCRUMB_COMPONENTS: readonly [typeof DaffBreadcrumbComponent, typeof DaffBreadcrumbItemComponent];
60
114
 
61
115
  /**
62
116
  * @deprecated in favor of {@link DAFF_BREADCRUMB_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
63
117
  */
64
118
  declare class DaffBreadcrumbModule {
65
119
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffBreadcrumbModule, never>;
66
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffBreadcrumbModule, never, [typeof DaffBreadcrumbComponent, typeof DaffBreadcrumbItemDirective], [typeof DaffBreadcrumbComponent, typeof DaffBreadcrumbItemDirective]>;
120
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffBreadcrumbModule, never, [typeof DaffBreadcrumbComponent, typeof DaffBreadcrumbItemComponent], [typeof DaffBreadcrumbComponent, typeof DaffBreadcrumbItemComponent]>;
67
121
  static ɵinj: i0.ɵɵInjectorDeclaration<DaffBreadcrumbModule>;
68
122
  }
69
123
 
70
- export { DAFF_BREADCRUMB_COMPONENTS, DaffBreadcrumbComponent, DaffBreadcrumbItemDirective, DaffBreadcrumbModule };
124
+ export { DAFF_BREADCRUMB_COMPONENTS, DaffBreadcrumbComponent, DaffBreadcrumbItemComponent, DaffBreadcrumbModule };
@@ -5,7 +5,7 @@
5
5
  $mode: daff-get-theme-mode($theme);
6
6
 
7
7
  .daff-breadcrumb__item {
8
- a {
8
+ a, .daff-breadcrumb__menu-activator {
9
9
  @include light($mode) {
10
10
  color: daff-color($neutral, 80);
11
11
  text-decoration-color: daff-color($neutral, 80);
package/button/README.md CHANGED
@@ -2,7 +2,7 @@
2
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
- Button supports five variants that change its visual style, each applied as an attribute:
5
+ Button supports four variants that change its visual style, each applied as an attribute:
6
6
 
7
7
  | Attribute | Description |
8
8
  | --------- | ----------- |
@@ -10,7 +10,6 @@ Button supports five variants that change its visual style, each applied as an a
10
10
  | `daff-flat-button`| Rectangular button with no outline or background color |
11
11
  | `daff-icon-button` | Icon only button used with icon fonts |
12
12
  | `daff-stroked-button` | Rectangular button with oultline, no background color |
13
- | `daff-underline-button` | Text button with underline styling |
14
13
 
15
14
  Native `<button>` or `<a>` elements should always be used in order to provide an easy, accessible experience for users.
16
15
 
@@ -18,24 +17,21 @@ Native `<button>` or `<a>` elements should always be used in order to provide an
18
17
  - Use `<button>` for actions performed within the same page.
19
18
 
20
19
  **Basic button**
21
- <design-land-example-viewer-container example="basic-button"></design-land-example-viewer-container>
20
+ <daff-docs-example-viewer example="basic-button"></daff-docs-example-viewer>
22
21
 
23
22
  **Flat button**
24
- <design-land-example-viewer-container example="flat-button"></design-land-example-viewer-container>
23
+ <daff-docs-example-viewer example="flat-button"></daff-docs-example-viewer>
25
24
 
26
25
  **Stroked button**
27
- <design-land-example-viewer-container example="stroked-button"></design-land-example-viewer-container>
26
+ <daff-docs-example-viewer example="stroked-button"></daff-docs-example-viewer>
28
27
 
29
28
  > `dark`, `light`, and `theme` should be used with caution to ensure that there is sufficient contrast.
30
29
 
31
30
  **Icon button**
32
- <design-land-example-viewer-container example="icon-button"></design-land-example-viewer-container>
31
+ <daff-docs-example-viewer example="icon-button"></daff-docs-example-viewer>
33
32
 
34
33
  > `dark`, `light`, and `theme` should be used with caution to ensure that there is sufficient contrast.
35
34
 
36
- **Underline button**
37
- <design-land-example-viewer-container example="underline-button"></design-land-example-viewer-container>
38
-
39
35
  ## Usage
40
36
 
41
37
  ### Within a standalone component
@@ -46,7 +42,6 @@ Available imports:
46
42
  - `DAFF_FLAT_BUTTON_COMPONENTS`
47
43
  - `DAFF_ICON_BUTTON_COMPONENTS`
48
44
  - `DAFF_STROKED_BUTTON_COMPONENTS`
49
- - `DAFF_UNDERLINE_BUTTON_COMPONENTS`
50
45
  - `DAFF_BUTTON_COMPONENTS` (all types)
51
46
 
52
47
  ```ts
@@ -92,43 +87,51 @@ Buttons should always have a label, unless you are only using an icon that is un
92
87
  ### Icon support
93
88
  An icon can be rendered on either side of the button text content with the `daffPrefix` and `daffSuffix` selectors. Avoid using both simultaneously.
94
89
 
95
- ```html
96
- <button daff-button>
97
- <fa-icon [faIcon]="faUser" daffPrefix></fa-icon>
98
- Button label
99
- </button>
100
-
101
- <button daff-button>
102
- Button label
103
- <fa-icon [faIcon]="faArrowRight" daffPrefix></fa-icon>
104
- </button>
105
- ```
106
-
107
- ## Sizes
108
- Use the `size` property to control button dimensions. The default size is `md`.
90
+ <daff-docs-example-viewer example="button-with-icon"></daff-docs-example-viewer>
109
91
 
110
- <design-land-example-viewer-container example="sizeable-button"></design-land-example-viewer-container>
92
+ ## Features
111
93
 
112
- ## Colors
94
+ ### Colors
113
95
  Use the `color` property to change the color of a button.
114
96
 
115
97
  > Note: `dark`, `light`, and `theme` should be used on appropriate backgrounds for sufficient contrast.
116
98
 
117
- ## Status indicators
99
+ ### Elevation
100
+ Add shadows to buttons with the `elevated` property.
101
+
102
+ > Note: The `elevated` property is not supported for flat, icon, and underline buttons.
103
+
104
+ <daff-docs-example-viewer example="elevated-button"></daff-docs-example-viewer>
105
+
106
+ ### Sizes
107
+ Use the `size` property to control button dimensions. The default size is `md`.
108
+
109
+ <daff-docs-example-viewer example="button-sizes"></daff-docs-example-viewer>
110
+
111
+ ### Status indicators
118
112
  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.
119
113
 
120
- <design-land-example-viewer-container example="statusable-button"></design-land-example-viewer-container>
114
+ <daff-docs-example-viewer example="statusable-button"></daff-docs-example-viewer>
121
115
 
122
- ## Elevation
123
- Add shadows to buttons with the `elevated` property.
116
+ ## States
124
117
 
125
- > Note: The `elevated` property is not supported for flat, icon, and underline buttons.
118
+ ### Disabled
119
+ Use the `disabled` property to disable a button that shouldn't be actionable. The button will appear faded and won't respond to user interaction.
120
+
121
+ <daff-docs-example-viewer example="disabled-button"></daff-docs-example-viewer>
126
122
 
127
- <design-land-example-viewer-container example="elevated-button"></design-land-example-viewer-container>
123
+ ### Loading
124
+ Use the `loading` property to indicate that an action is being processed. When `loading` is set to `true`, the button displays a spinner.
125
+
126
+ <daff-docs-example-viewer example="loading-button"></daff-docs-example-viewer>
128
127
 
129
128
  ## Accessbility
130
129
  Daffodil uses native `<a>` and `<button>` HTML elements to ensure an accessible experience by default.
131
130
 
132
131
  - Use `<a>` for navigation to new pages or different sections.
133
132
  - Use `<button>` for actions performed within the same page.
134
- - Icon only buttons (`<daff-icon-button>`) need to be given meaningful labels using `aria-label` or `aria-labelledby`.
133
+ - Icon only buttons (`<daff-icon-button>`) need to be given meaningful labels using `aria-label` or `aria-labelledby`.
134
+
135
+ ## Deprecations
136
+ - `<daff-raised-button>` is deprecated and will be removed in v1.0.0. Use the `elevated` property instead.
137
+ - `<daff-underline-button>` is deprecated and will be removed in v1.0.0.