@daffodil/design 0.92.3-rc.2 → 0.93.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/accordion/README.md +4 -4
  2. package/breadcrumb/README.md +13 -35
  3. package/button/README.md +28 -50
  4. package/card/README.md +8 -22
  5. package/card/src/card/stroked/stroked-theme.scss +8 -1
  6. package/card/src/card-base-theme.scss +12 -1
  7. package/container/README.md +4 -26
  8. package/fesm2022/daffodil-design-accordion.mjs +15 -15
  9. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  10. package/fesm2022/daffodil-design-article.mjs +30 -30
  11. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  12. package/fesm2022/daffodil-design-breadcrumb.mjs +20 -20
  13. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  14. package/fesm2022/daffodil-design-button.mjs +37 -49
  15. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  16. package/fesm2022/daffodil-design-callout.mjs +22 -22
  17. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  18. package/fesm2022/daffodil-design-card.mjs +31 -31
  19. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-checkbox.mjs +13 -13
  21. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-container.mjs +7 -7
  23. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-form-field.mjs +13 -12
  25. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-form.mjs +9 -9
  27. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-hero.mjs +22 -22
  29. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-image.mjs +8 -8
  31. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-input.mjs +12 -11
  33. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-link-set.mjs +16 -16
  35. package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-list.mjs +20 -17
  37. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-loading-icon.mjs +7 -7
  39. package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
  41. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  42. package/fesm2022/daffodil-design-menu.mjs +20 -20
  43. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-modal.mjs +32 -26
  45. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-native-select.mjs +5 -3
  47. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-navbar.mjs +9 -9
  49. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  50. package/fesm2022/daffodil-design-notification.mjs +16 -16
  51. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-paginator.mjs +8 -8
  53. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
  55. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-quantity-field.mjs +13 -13
  57. package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-radio.mjs +16 -16
  59. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-select.mjs +11 -11
  61. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-sidebar.mjs +35 -29
  63. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-spinner.mjs +7 -7
  65. package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-switch.mjs +3 -3
  67. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-tabs.mjs +17 -25
  69. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-tag.mjs +20 -20
  71. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-testing.mjs +19 -0
  73. package/fesm2022/daffodil-design-testing.mjs.map +1 -0
  74. package/fesm2022/daffodil-design-text-snippet.mjs +3 -3
  75. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  76. package/fesm2022/daffodil-design-textarea.mjs +3 -3
  77. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-toast.mjs +21 -21
  79. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-tree.mjs +27 -25
  81. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-youtube-player.mjs +22 -11
  83. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  84. package/fesm2022/daffodil-design.mjs +110 -149
  85. package/fesm2022/daffodil-design.mjs.map +1 -1
  86. package/form/README.md +15 -6
  87. package/hero/README.md +14 -49
  88. package/image/README.md +6 -29
  89. package/input/README.md +8 -34
  90. package/list/README.md +29 -55
  91. package/list/src/list-theme.scss +16 -2
  92. package/media-gallery/README.md +36 -43
  93. package/menu/README.md +24 -55
  94. package/menu/src/menu-theme.scss +12 -2
  95. package/modal/README.md +15 -45
  96. package/native-select/README.md +8 -6
  97. package/navbar/README.md +18 -27
  98. package/notification/README.md +14 -49
  99. package/package.json +1 -1
  100. package/paginator/README.md +11 -31
  101. package/paginator/src/paginator-theme.scss +16 -2
  102. package/progress-bar/README.md +14 -41
  103. package/scss/global.scss +21 -2
  104. package/select/README.md +5 -6
  105. package/select/src/select-theme.scss +10 -2
  106. package/sidebar/README.md +1 -1
  107. package/spinner/README.md +15 -9
  108. package/switch/README.md +17 -6
  109. package/tabs/README.md +39 -39
  110. package/tag/README.md +24 -28
  111. package/textarea/README.md +9 -7
  112. package/toast/README.md +55 -52
  113. package/tree/README.md +12 -43
  114. package/tree/src/tree-theme.scss +8 -4
  115. package/{accordion/index.d.ts → types/daffodil-design-accordion.d.ts} +1 -1
  116. package/{button/index.d.ts → types/daffodil-design-button.d.ts} +7 -8
  117. package/{input/index.d.ts → types/daffodil-design-input.d.ts} +4 -1
  118. package/{list/index.d.ts → types/daffodil-design-list.d.ts} +4 -1
  119. package/{menu/index.d.ts → types/daffodil-design-menu.d.ts} +3 -3
  120. package/{modal/index.d.ts → types/daffodil-design-modal.d.ts} +11 -5
  121. package/{native-select/index.d.ts → types/daffodil-design-native-select.d.ts} +3 -1
  122. package/{sidebar/index.d.ts → types/daffodil-design-sidebar.d.ts} +9 -3
  123. package/{tabs/index.d.ts → types/daffodil-design-tabs.d.ts} +0 -6
  124. package/{tag/index.d.ts → types/daffodil-design-tag.d.ts} +9 -8
  125. package/types/daffodil-design-testing.d.ts +11 -0
  126. package/{tree/index.d.ts → types/daffodil-design-tree.d.ts} +2 -0
  127. package/{youtube-player/index.d.ts → types/daffodil-design-youtube-player.d.ts} +15 -0
  128. package/{index.d.ts → types/daffodil-design.d.ts} +17 -64
  129. /package/{article/index.d.ts → types/daffodil-design-article.d.ts} +0 -0
  130. /package/{breadcrumb/index.d.ts → types/daffodil-design-breadcrumb.d.ts} +0 -0
  131. /package/{callout/index.d.ts → types/daffodil-design-callout.d.ts} +0 -0
  132. /package/{card/index.d.ts → types/daffodil-design-card.d.ts} +0 -0
  133. /package/{checkbox/index.d.ts → types/daffodil-design-checkbox.d.ts} +0 -0
  134. /package/{container/index.d.ts → types/daffodil-design-container.d.ts} +0 -0
  135. /package/{form-field/index.d.ts → types/daffodil-design-form-field.d.ts} +0 -0
  136. /package/{form/index.d.ts → types/daffodil-design-form.d.ts} +0 -0
  137. /package/{hero/index.d.ts → types/daffodil-design-hero.d.ts} +0 -0
  138. /package/{image/index.d.ts → types/daffodil-design-image.d.ts} +0 -0
  139. /package/{link-set/index.d.ts → types/daffodil-design-link-set.d.ts} +0 -0
  140. /package/{loading-icon/index.d.ts → types/daffodil-design-loading-icon.d.ts} +0 -0
  141. /package/{media-gallery/index.d.ts → types/daffodil-design-media-gallery.d.ts} +0 -0
  142. /package/{navbar/index.d.ts → types/daffodil-design-navbar.d.ts} +0 -0
  143. /package/{notification/index.d.ts → types/daffodil-design-notification.d.ts} +0 -0
  144. /package/{paginator/index.d.ts → types/daffodil-design-paginator.d.ts} +0 -0
  145. /package/{progress-bar/index.d.ts → types/daffodil-design-progress-bar.d.ts} +0 -0
  146. /package/{quantity-field/index.d.ts → types/daffodil-design-quantity-field.d.ts} +0 -0
  147. /package/{radio/index.d.ts → types/daffodil-design-radio.d.ts} +0 -0
  148. /package/{select/index.d.ts → types/daffodil-design-select.d.ts} +0 -0
  149. /package/{spinner/index.d.ts → types/daffodil-design-spinner.d.ts} +0 -0
  150. /package/{switch/index.d.ts → types/daffodil-design-switch.d.ts} +0 -0
  151. /package/{text-snippet/index.d.ts → types/daffodil-design-text-snippet.d.ts} +0 -0
  152. /package/{textarea/index.d.ts → types/daffodil-design-textarea.d.ts} +0 -0
  153. /package/{toast/index.d.ts → types/daffodil-design-toast.d.ts} +0 -0
package/hero/README.md CHANGED
@@ -14,14 +14,12 @@ Heroes are the first visual element users see on a page and are intended to make
14
14
  - Highlighting promotional content or key features
15
15
  - Creating an impactful landing page experience
16
16
 
17
- ## When not to use
18
- Avoid heroes when:
19
- - Trying to make a visual highlight that's not at the top of a page (use [callout](/libs/design/callout/README.md) instead)
17
+ **When not to use**
18
+ - Making a visual highlight that's not at the top of a page (use [callout](/libs/design/callout/README.md) instead)
20
19
 
21
20
  ## Usage
22
21
 
23
- ### Within a standalone component
24
- To use the hero components, import `DAFF_HERO_COMPONENTS` directly into your custom component:
22
+ Import `DAFF_HERO_COMPONENTS` into your component:
25
23
 
26
24
  ```ts
27
25
  import { DAFF_HERO_COMPONENTS } from '@daffodil/design/hero';
@@ -36,52 +34,12 @@ import { DAFF_HERO_COMPONENTS } from '@daffodil/design/hero';
36
34
  export class CustomComponent {}
37
35
  ```
38
36
 
39
- ### Within a module (deprecated)
40
- To use hero in a module, import `DaffHeroModule` into your custom module:
41
-
42
- ```ts
43
- import { NgModule } from '@angular/core';
44
- import { DaffHeroModule } from '@daffodil/design/hero';
45
- import { CustomComponent } from './custom.component';
46
-
47
- @NgModule({
48
- declarations: [
49
- CustomComponent,
50
- ],
51
- exports: [
52
- CustomComponent,
53
- ],
54
- imports: [
55
- DaffHeroModule,
56
- ],
57
- })
58
- export class CustomComponentModule { }
59
- ```
60
-
61
- > This method is deprecated. It's recommended to update all custom components to standalone.
37
+ > **Deprecation notice:**
38
+ >
39
+ > `DaffHeroModule` is deprecated. Use the standalone component imports instead.
62
40
 
63
41
  ## Anatomy
64
- A hero consists of the following components, displayed in the order listed:
65
-
66
- ### Container
67
- **`<daff-hero>`**: The main wrapper that holds all hero content.
68
-
69
- ### Icon
70
- **`[daffHeroIcon]`**: Displays visual or branding element. Avoid using for interactive icons.
71
-
72
- ### Tagline
73
- **`[daffHeroTagline]`**: Short, memorable phrase that provides quick context.
74
-
75
- ### Title
76
- **`[daffHeroTitle]`**: The primary heading text. Applied to heading elements (`<h1>`).
77
-
78
- ### Subtitle
79
- **`[daffHeroSubtitle]`**: Secondary descriptive text displayed beneath the title.
80
-
81
- ### Body
82
- **`[daffHeroBody]`**: Flexible container for additional content or actions. It's unstyled except for spacing and should only be used once per hero.
83
-
84
- ### Basic structure
42
+ A hero is composed of a wrapper, icon, tagline, title, subtitle, and body, displayed in the order listed:
85
43
 
86
44
  ```html
87
45
  <daff-hero>
@@ -98,6 +56,13 @@ A hero consists of the following components, displayed in the order listed:
98
56
  </daff-hero>
99
57
  ```
100
58
 
59
+ - **`<daff-hero>`**: The wrapper component that holds all hero content.
60
+ - **`[daffHeroIcon]`**: Displays a visual or branding element. Avoid using for interactive or actionable icons.
61
+ - **`[daffHeroTagline]`**: Short, memorable phrase that provides quick context.
62
+ - **`[daffHeroTitle]`**: The primary heading text. Applied to heading elements (`<h1>`).
63
+ - **`[daffHeroSubtitle]`**: Secondary descriptive text displayed beneath the title.
64
+ - **`[daffHeroBody]`**: Flexible container for additional content or actions. It's unstyled except for spacing and **should only be used once per hero**.
65
+
101
66
  ## Features
102
67
 
103
68
  ### Colors
package/image/README.md CHANGED
@@ -12,8 +12,7 @@ Image builds on Angular's [`NgOptimizedImage`](https://angular.dev/guide/image-o
12
12
 
13
13
  ## Usage
14
14
 
15
- ### Within a standalone component
16
- To use image in a standalone component, import `DAFF_IMAGE_COMPONENTS` directly into your custom component:
15
+ Import `DAFF_IMAGE_COMPONENTS` into your component:
17
16
 
18
17
  ```ts
19
18
  import { Component } from '@angular/core';
@@ -29,31 +28,9 @@ import { DAFF_IMAGE_COMPONENTS } from '@daffodil/design/image';
29
28
  export class CustomComponent {}
30
29
  ```
31
30
 
32
- ### Within a module (deprecated)
33
- To use image in a module, import `DaffImageModule` into your custom module:
34
-
35
- ```ts
36
- import { NgModule } from '@angular/core';
37
- import { DaffImageModule } from '@daffodil/design/image';
38
- import { CustomComponent } from './custom.component';
39
-
40
- @NgModule({
41
- declarations: [
42
- CustomComponent,
43
- ],
44
- exports: [
45
- CustomComponent,
46
- ],
47
- imports: [
48
- DaffImageModule,
49
- ],
50
- })
51
- export class CustomComponentModule { }
52
- ```
53
-
54
- > **Warning**
55
- >
56
- > This method is deprecated. It's recommended to update all custom components to standalone.
31
+ > **Deprecation notice:**
32
+ >
33
+ > `DaffImageModule` is deprecated. Use the standalone component imports instead.
57
34
 
58
35
  ## Required attributes
59
36
  All four of the following attributes are required and will throw an error if missing:
@@ -67,12 +44,12 @@ All four of the following attributes are required and will throw an error if mis
67
44
 
68
45
  ## Features
69
46
 
70
- ## Skeleton screen
47
+ ### Skeleton screen
71
48
  Use the `skeleton` property to display a placeholder skeleton screen that helps reduce load-time frustration.
72
49
 
73
50
  <daff-docs-example-viewer example="skeleton-image"></daff-docs-example-viewer>
74
51
 
75
- ## Priority loading
52
+ ### Priority loading
76
53
  Use the `priority` property to mark an image as a priority for loading. Priority images are loaded eagerly and not lazy-loaded.
77
54
 
78
55
  ## Accessibility
package/input/README.md CHANGED
@@ -7,9 +7,7 @@ Input has the same functionality as a native HTML input element, with additional
7
7
  <daff-docs-example-viewer example="input-with-form-field"></daff-docs-example-viewer>
8
8
 
9
9
  ## Usage
10
-
11
- ### Within a standalone component
12
- To use input in a standalone component, import `DaffInputComponent` directly into your custom component:
10
+ Import `DaffInputComponent` into your component:
13
11
 
14
12
  ```ts
15
13
  import { DaffInputComponent } from '@daffodil/design/input';
@@ -24,36 +22,9 @@ import { DaffInputComponent } from '@daffodil/design/input';
24
22
  export class CustomComponent {}
25
23
  ```
26
24
 
27
- ### Within a module (deprecated)
28
- To use input in a module, import `DaffInputModule` into your custom module:
29
-
30
- ```ts
31
- import { NgModule } from '@angular/core';
32
- import { DaffInputModule } from '@daffodil/design/input';
33
- import { CustomComponent } from './custom.component';
34
-
35
- @NgModule({
36
- declarations: [
37
- CustomComponent,
38
- ],
39
- exports: [
40
- CustomComponent,
41
- ],
42
- imports: [
43
- DaffInputModule,
44
- ],
45
- })
46
- export class CustomComponentModule { }
47
- ```
48
-
49
- > **Warning**
50
- >
51
- > This method is deprecated. It's recommended to update all custom components to standalone.
52
-
53
25
  ## Anatomy
54
26
  Input must be used inside `<daff-form-field>` to enable proper state management and provide enhanced UI features such as hints, error messages, prefixes, and suffixes. The form field component also ensures accessibility compliance. For more details, see the [form field documentation](/libs/design/form-field/README.md).
55
27
 
56
- ### Basic structure
57
28
  ```html
58
29
  <daff-form-field>
59
30
  <daff-form-label>First Name</daff-form-label>
@@ -61,7 +32,7 @@ Input must be used inside `<daff-form-field>` to enable proper state management
61
32
  </daff-form-field>
62
33
  ```
63
34
 
64
- ## States
35
+ ## Features
65
36
 
66
37
  ### Disabled
67
38
  Input can be disabled in two ways: using Angular's reactive forms with `FormControl` or with the native HTML `disabled` attribute.
@@ -75,12 +46,15 @@ Input supports validation and error messages through Angular's form validation s
75
46
 
76
47
  Multiple error messages can be displayed conditionally based on the type of validation error. The form field component handles the styling and positioning of error messages.
77
48
 
78
- ## Hints
49
+ ### Hints
79
50
  Hints provide additional context or instructions to help users complete the input field correctly. Use `<daff-hint>` within the form field to display helpful information below the input. Unlike error messages, hints are always visible and provide guidance rather than validation feedback.
80
51
 
81
52
  <daff-docs-example-viewer example="input-hint"></daff-docs-example-viewer>
82
53
 
83
54
  ## Accessibility
84
- When `<daff-form-label>` is used within `<daff-form-field>`, the label automatically associates with the input using the `for` and `id` attributes.
85
55
 
86
- If a `<daff-form-label>` is not specified, use the `<label>` element to associate text with form elements explicitly. The `for` attribute of the label must exactly match the `id` of the form control.
56
+ ### Built-in behavior
57
+ - When `<daff-form-label>` is used within `<daff-form-field>`, the label automatically associates with the input using the `for` and `id` attributes.
58
+
59
+ ### Developer responsibilities
60
+ - If a `<daff-form-label>` is not specified, use the `<label>` element to associate text with form elements explicitly. The `for` attribute of the label must exactly match the `id` of the form control.
package/list/README.md CHANGED
@@ -2,21 +2,23 @@
2
2
  A list is a stylized container used to vertically group a series of related content.
3
3
 
4
4
  ## Overview
5
- List supports two main variants:
5
+ Lists help organize content into a clear, scannable vertical structure. There are two variants: **default** (`daff-list`) for generic content and **navigation** (`daff-nav-list`) for groups of links.
6
6
 
7
- | Attribute | Description |
8
- | --------- | ----------- |
9
- | `daff-list` | A standard list used for grouping generic content. |
10
- | `daff-nav-list` | A navigation list intended for use with anchor elements (`<a>`). |
7
+ <daff-docs-example-viewer example="basic-list"></daff-docs-example-viewer>
8
+
9
+ ## Best practices
10
+
11
+ **When to use**
12
+ - Grouping related items that share a common theme or category
13
+ - Displaying a series of links for navigation menus
11
14
 
12
15
  ## Usage
13
16
 
14
- ### Within a standalone component
15
- To use list in a standalone component, import each list type directly into your custom component.
17
+ Import the list style(s) you need into your component:
16
18
 
17
19
  Available imports:
18
- - `DAFF_LIST_COMPONENTS`
19
- - `DAFF_NAV_LIST_COMPONENTS`
20
+ - Default lists: `DAFF_LIST_COMPONENTS`
21
+ - Navigation lists: `DAFF_NAV_LIST_COMPONENTS`
20
22
 
21
23
  ```ts
22
24
  import { DAFF_LIST_COMPONENTS } from '@daffodil/design/list';
@@ -31,42 +33,13 @@ import { DAFF_LIST_COMPONENTS } from '@daffodil/design/list';
31
33
  export class CustomComponent {}
32
34
  ```
33
35
 
34
- ### Within a module (deprecated)
35
- To use list in a module, import `DaffListModule` into your custom module:
36
-
37
- ```ts
38
- import { NgModule } from '@angular/core';
39
- import { DaffListModule } from '@daffodil/design/list';
40
- import { CustomComponent } from './custom.component';
41
-
42
- @NgModule({
43
- declarations: [
44
- CustomComponent,
45
- ],
46
- exports: [
47
- CustomComponent,
48
- ],
49
- imports: [
50
- DaffListModule,
51
- ],
52
- })
53
- export class CustomComponentModule { }
54
- ```
55
-
56
- > This method is deprecated. It's recommended to update all custom components to standalone.
36
+ > **Deprecation notice:**
37
+ >
38
+ > `DaffListModule` is deprecated. Use the standalone component imports instead.
57
39
 
58
40
  ## Anatomy
59
- A list consists of the following components:
60
-
61
- ### Container
62
- **`<daff-list>`**: A standard list wrapper used for grouping generic content items.
41
+ A list is composed of a container and one or more items:
63
42
 
64
- **`<daff-nav-list>`**: A navigation list container intended for use with anchor elements (`<a>`).
65
-
66
- ### Item
67
- **`<daff-list-item>`**: Individual list items that contain the content for each row in the list.
68
-
69
- ### Basic structure
70
43
  ```html
71
44
  <daff-list>
72
45
  <daff-list-item>Content item</daff-list-item>
@@ -75,31 +48,32 @@ A list consists of the following components:
75
48
  </daff-list>
76
49
  ```
77
50
 
78
- ```html
79
- <daff-nav-list>
80
- <a href="/" daff-list-item>Navigation link</a>
81
- <a href="/" daff-list-item>Navigation link</a>
82
- <a href="/" daff-list-item>Navigation link</a>
83
- </daff-nav-list>
84
- ```
51
+ - **`<daff-list>`** or **`<daff-nav-list>`**: The wrapper component that holds all list items.
52
+ - **`<daff-list-item>`**: An individual item within the list. Use the `[daff-list-item]` attribute on `<a>` elements inside a `<daff-nav-list>`.
85
53
 
86
54
  ## Features
87
55
 
88
- ### Icon support
89
- Use the `[daffPrefix]` element to display a leading visual icon for a list item.
56
+ ### Navigation lists
57
+ Use `<daff-nav-list>` with anchor elements to create a list of links. This is useful for menus, sidebars, and footers.
90
58
 
91
- <daff-docs-example-viewer example="icon-list"></daff-docs-example-viewer>
59
+ <daff-docs-example-viewer example="nav-list"></daff-docs-example-viewer>
92
60
 
93
61
  ### Multi-line lists
94
62
  For list items that contain multiple lines of text, use the `[daffListItemTitle]` element to identify the primary title. Additional supporting content can be added using `<div>` or `<p>` elements.
95
63
 
96
64
  <daff-docs-example-viewer example="multiline-list"></daff-docs-example-viewer>
97
65
 
66
+ ### Icon support
67
+ Use the `[daffPrefix]` element to display a leading visual icon for a list item.
68
+
69
+ <daff-docs-example-viewer example="icon-list"></daff-docs-example-viewer>
70
+
98
71
  ## Accessibility
99
- By default, list includes appropriate ARIA roles by default to support screen readers and provide an accessible experience.
100
72
 
73
+ ### Built-in behavior
101
74
  - `<daff-list>` is assigned `role="list"` to identify a list of items.
75
+ - `<daff-nav-list>` is assigned `role="navigation"` to indicate that the list is used for navigation.
102
76
  - `<daff-list-item>` within a `<daff-list>` is assigned `role="listitem"` to identify a list item contained inside the list.
103
- - `<daff-nav-list>`is assigned `role="navigation"` to indicate that the list is used for navigation.
104
77
 
105
- > Always provide an accessible label for `<daff-nav-list>` via `aria-label` or `aria-labelledby` to describe its purpose (e.g. `"Footer links"` or `"Sidebar links"`).
78
+ ### Developer responsibilities
79
+ - Always provide an accessible label for `<daff-nav-list>` via `aria-label` or `aria-labelledby` to describe its purpose (e.g. `"Footer links"` or `"Sidebar links"`).
@@ -19,21 +19,35 @@
19
19
  }
20
20
 
21
21
  @include light($mode) {
22
- &:hover,
23
22
  &.active {
24
23
  &::after {
25
24
  background-color: rgba(daff-color($neutral, 20), 0.5);
26
25
  }
27
26
  }
27
+
28
+ @media (hover: hover) {
29
+ &:hover {
30
+ &::after {
31
+ background-color: rgba(daff-color($neutral, 20), 0.5);
32
+ }
33
+ }
34
+ }
28
35
  }
29
36
 
30
37
  @include dark($mode) {
31
- &:hover,
32
38
  &.active {
33
39
  &::after {
34
40
  background-color: rgba(daff-color($neutral, 20), 0.08);
35
41
  }
36
42
  }
43
+
44
+ @media (hover: hover) {
45
+ &:hover {
46
+ &::after {
47
+ background-color: rgba(daff-color($neutral, 20), 0.08);
48
+ }
49
+ }
50
+ }
37
51
  }
38
52
  }
39
53
  }
@@ -13,13 +13,12 @@ Media galleries are ideal for showcasing multiple images or other media related
13
13
  - Providing an interactive way to browse through visual content
14
14
 
15
15
  **When not to use**
16
- - You only have one image (use an [Image](/libs/design/image/README.md) instead)
16
+ - You only have one image (use the [image](/libs/design/image/README.md) component instead)
17
17
  - The images are unrelated to each other
18
18
 
19
19
  ## Usage
20
20
 
21
- ### Within a standalone component
22
- To use media gallery in a standalone component, import `DAFF_MEDIA_GALLERY_COMPONENTS` into your custom component:
21
+ Import `DAFF_MEDIA_GALLERY_COMPONENTS` into your component:
23
22
 
24
23
  ```ts
25
24
  import { DAFF_MEDIA_GALLERY_COMPONENTS } from '@daffodil/design/media-gallery';
@@ -34,40 +33,13 @@ import { DAFF_MEDIA_GALLERY_COMPONENTS } from '@daffodil/design/media-gallery';
34
33
  export class CustomComponent {}
35
34
  ```
36
35
 
37
- ### Within a module (deprecated)
38
- To use media gallery in a module, import `DaffMediaGalleryModule` into your custom module:
39
-
40
- ```ts
41
- import { NgModule } from '@angular/core';
42
- import { DaffMediaGalleryModule } from '@daffodil/design/media-gallery';
43
- import { CustomComponent } from './custom.component';
44
-
45
- @NgModule({
46
- declarations: [
47
- CustomComponent,
48
- ],
49
- exports: [
50
- CustomComponent,
51
- ],
52
- imports: [
53
- DaffMediaGalleryModule,
54
- ],
55
- })
56
- export class CustomComponentModule { }
57
- ```
58
-
59
- > This method is deprecated. It's recommended to update all custom components to standalone.
36
+ > **Deprecation notice:**
37
+ >
38
+ > `DaffMediaGalleryModule` is deprecated. Use the standalone component imports instead.
60
39
 
61
40
  ## Anatomy
62
- A media gallery consists of the following components:
63
-
64
- ### Container
65
- **`<daff-media-gallery>`**: The wrapper component that contains all thumbnails and manages the display area.
66
-
67
- ### Thumbnail
68
- **`[daffThumbnail]`**: A **structural directive** that defines both the preview image and the content to display when selected. Thumbnails can contain any content type, not just images.
41
+ A media gallery is composed of a container and one or more thumbnails:
69
42
 
70
- ### Basic structure
71
43
  ```html
72
44
  <daff-media-gallery>
73
45
  <ng-template daffThumbnail thumbnailSrc="/thumbnail-path.jpg" label="Your description">
@@ -76,19 +48,36 @@ A media gallery consists of the following components:
76
48
  </daff-media-gallery>
77
49
  ```
78
50
 
79
- ## Thumbnail configuration
51
+ - **`<daff-media-gallery>`**: The wrapper component that contains all thumbnails and manages the display area.
52
+ - **`[daffThumbnail]`**: A **structural directive** that defines both the preview image and the content to display when selected. Thumbnails can contain any content type, not just images.
53
+
54
+ ### Thumbnail configuration
80
55
  - `thumbnailSrc` is used for the preview image rendered in the thumbnail strip.
81
- - The content inside the template will be shown as the primary view when selected.
82
- - You must include the full content for each thumbnail inside the template, even if it appears to duplicate the thumbnail image since this is what renders in the main display area when selected.
83
- - Always provide an accessible label for a thumbnail using `label`.
84
- - The `isVideo` property can be used to display a video icon on the thumbnail.
56
+ - The content inside the template is shown as the primary view when selected.
57
+ - Include the full content for each thumbnail inside the template, even if it appears to duplicate the thumbnail image, since this is what renders in the main display area when selected.
58
+ - Always provide an accessible `label` for a thumbnail.
85
59
  - The first thumbnail is selected by default.
86
60
 
87
- > Never use `[daffThumbnail]` as a standalone element. It must be placed within a `<daff-media-gallery>`.
61
+ > Never use `[daffThumbnail]` as a standalone element. It must be placed within a `<daff-media-gallery>`.
62
+
63
+ ## Features
64
+
65
+ ### Video thumbnails
66
+ Set the `isVideo` property on a thumbnail to display a video icon on its preview, signaling that the content opens a video.
88
67
 
89
68
  <daff-docs-example-viewer example="media-gallery-with-video"></daff-docs-example-viewer>
90
69
 
91
- ## Aspect ratio
70
+ ### Iterating thumbnails
71
+ Use a control-flow block such as `@for` to generate thumbnails from a collection of media.
72
+
73
+ <daff-docs-example-viewer example="iterated-media-gallery"></daff-docs-example-viewer>
74
+
75
+ ### Skeleton screen
76
+ Set the `skeleton` property to `true` to display a placeholder skeleton screen that helps reduce load-time frustration.
77
+
78
+ <daff-docs-example-viewer example="skeleton-media-gallery"></daff-docs-example-viewer>
79
+
80
+ ### Aspect ratio
92
81
  Use a consistent aspect ratio across all content to avoid layout shifts. Mismatched content sizes can cause the primary content area to shift as different thumbnails are selected.
93
82
 
94
83
  Thumbnails are rendered in a square by default, so a 1:1 ratio is recommended, but not required since thumbnails are automatically centered horizontally and vertically.
@@ -96,6 +85,10 @@ Thumbnails are rendered in a square by default, so a 1:1 ratio is recommended, b
96
85
  <daff-docs-example-viewer example="mismatched-sizes-media-gallery"></daff-docs-example-viewer>
97
86
 
98
87
  ## Accessibility
99
- - Always provide an accessible label for each thumbnail using the `label` attribute.
88
+
89
+ ### Built-in behavior
100
90
  - Each thumbnail is rendered as a button with an autogenerated `aria-controls` value that matches the `id` of the content container displayed when the thumbnail is selected.
101
- - These `id` values are autogenerated but can be overridden by providing a custom id to the `<daff-media-gallery>` element.
91
+ - These `id` values are autogenerated but can be overridden by providing a custom id to the `<daff-media-gallery>` element.
92
+
93
+ ### Developer responsibilities
94
+ - Always provide an accessible label for each thumbnail using the `label` attribute.
package/menu/README.md CHANGED
@@ -19,8 +19,7 @@ Menus appear when users interact with a menu activator button. Use menus for sec
19
19
 
20
20
  ## Usage
21
21
 
22
- ### Within a standalone component
23
- To use menu in a standalone component, import `DAFF_MENU_COMPONENTS` directly into your custom component:
22
+ Import `DAFF_MENU_COMPONENTS` into your component:
24
23
 
25
24
  ```ts
26
25
  import { DAFF_MENU_COMPONENTS } from '@daffodil/design/menu';
@@ -35,52 +34,19 @@ import { DAFF_MENU_COMPONENTS } from '@daffodil/design/menu';
35
34
  export class CustomComponent {}
36
35
  ```
37
36
 
38
- ### Within a module (deprecated)
39
- To use menu in a module, import `DaffMenuModule` into your custom module:
40
-
41
- ```ts
42
- import { NgModule } from '@angular/core';
43
- import { DaffMenuModule } from '@daffodil/design/menu';
44
- import { CustomComponent } from './custom.component';
45
-
46
- @NgModule({
47
- declarations: [
48
- CustomComponent,
49
- ],
50
- exports: [
51
- CustomComponent,
52
- ],
53
- imports: [
54
- DaffMenuModule,
55
- ],
56
- })
57
- export class CustomComponentModule { }
58
- ```
59
-
60
- > This method is deprecated. It's recommended to update all custom components to standalone.
37
+ > **Deprecation notice:**
38
+ >
39
+ > `DaffMenuModule` is deprecated. Use the standalone component imports instead.
61
40
 
62
41
  ## Anatomy
63
- A menu component consists of the following parts:
64
-
65
- ### Menu Activator
66
- **`[daffMenuActivator]`**: A directive attached to a button that triggers the menu to open. The selector doubles as an input for the menu content to display.
67
-
68
- ### Menu
69
- **`<daff-menu>`**: The container component that holds menu items.
70
-
71
- ### Menu Item
72
- **`<daff-menu-item>`**: Represents a single action or navigation item within the menu. Should be used with an anchor or button HTML element.
73
-
74
- ### Icon
75
- Use the `[daffPrefix]` directive to add a decorative icon before the menu item content.
42
+ A menu is composed of an activator, a container, and one or more items:
76
43
 
77
- ### Basic structure
78
44
  ```html
79
- <button [daffMenuActivator]="menu">
80
- Open Menu
45
+ <button [daffMenuActivator]="actionsMenu">
46
+ Actions
81
47
  </button>
82
48
 
83
- <ng-template #menu>
49
+ <ng-template #actionsMenu>
84
50
  <daff-menu>
85
51
  <button daff-menu-item>
86
52
  <fa-icon [icon]="faEdit" daffPrefix></fa-icon>
@@ -98,29 +64,37 @@ Use the `[daffPrefix]` directive to add a decorative icon before the menu item c
98
64
  </ng-template>
99
65
  ```
100
66
 
67
+ - **`[daffMenuActivator]`**: A directive attached to a button that triggers the menu to open. The selector doubles as an input for the menu content to display.
68
+ - **`<daff-menu>`**: The container component that holds all menu items.
69
+ - **`<daff-menu-item>`**: A single action or navigation item within the menu. Use with an anchor or button element.
70
+ - **`[daffPrefix]`**: Adds a decorative icon before the menu item content.
71
+
101
72
  ## Features
102
73
 
103
- ### Accessing menu state
104
- The menu activator provides an `isOpen` property that tracks whether the menu is currently open or closed. Use this to update your UI based on the menu state, such as changing icons or styling.
74
+ ### Menu state
75
+ Use the actiavtor's `isOpen` property to track whether the menu is currently open or closed. Use this to update your UI based on the menu state, such as changing icons or styling.
105
76
 
106
77
  <daff-docs-example-viewer example="menu-with-icon-toggle"></daff-docs-example-viewer>
107
78
 
108
-
109
- ### Setting an ID
110
-
111
- The menu activator accepts an optional `id` input. When set, the opened menu's `id` is derived as `{id}-menu`. When no `id` is provided, a unique ID is auto-generated.
79
+ ### Custom IDs
80
+ Menus generate a unique id automatically. To set your own, add an `id` to the activator and the menu becomes `{id}-menu`.
112
81
 
113
82
  <daff-docs-example-viewer example="menu-with-id"></daff-docs-example-viewer>
114
83
 
115
84
  ## Accessibility
116
85
  Menu follows the [Menu and Menubar WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/).
117
86
 
118
- ### Daffodil provides
87
+ ### Built-in behavior
119
88
  - `role="menu"` and `role="menuitem"` on appropriate elements
120
89
  - Focus management when menu opens and closes
121
90
  - `aria-expanded` on the activator indicating the menu state
122
91
 
123
- #### Keyboard interactions
92
+ ### Developer responsibilities
93
+ - Provide a meaningful label on the menu activator
94
+ - Ensure menu items have descriptive text or labels
95
+ - Use appropriate HTML elements (`<button>` for actions, `<a>` for navigation)
96
+
97
+ ### Keyboard interactions
124
98
  Keyboard focus is placed on the first item when a menu is opened.
125
99
 
126
100
  | Key | Action |
@@ -131,8 +105,3 @@ Keyboard focus is placed on the first item when a menu is opened.
131
105
  | `Up Arrow` | Moves focus to the previous item. If focus is on the first item, focus moves to the last item |
132
106
  | `Home` | Moves focus to the first item |
133
107
  | `End` | Moves focus to the last item |
134
-
135
- ### Developer responsibilities
136
- - Provide a meaningful label on the menu activator
137
- - Ensure menu items have descriptive text or labels
138
- - Use appropriate HTML elements (`<button>` for actions, `<a>` for navigation)
@@ -17,7 +17,12 @@
17
17
  background: $base;
18
18
  color: $base-contrast;
19
19
 
20
- &:hover,
20
+ @media (hover: hover) {
21
+ &:hover {
22
+ background: rgba(daff-color($neutral, 20), 0.5);
23
+ }
24
+ }
25
+
21
26
  &:focus {
22
27
  background: rgba(daff-color($neutral, 20), 0.5);
23
28
  }
@@ -34,7 +39,12 @@
34
39
  background: $base;
35
40
  color: $base-contrast;
36
41
 
37
- &:hover,
42
+ @media (hover: hover) {
43
+ &:hover {
44
+ background: rgba(daff-color($neutral, 20), 0.08);
45
+ }
46
+ }
47
+
38
48
  &:focus {
39
49
  background: rgba(daff-color($neutral, 20), 0.08);
40
50
  }