@daffodil/design 0.92.3 → 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.
- package/accordion/README.md +4 -4
- package/breadcrumb/README.md +13 -35
- package/button/README.md +28 -50
- package/card/README.md +8 -22
- package/card/src/card/stroked/stroked-theme.scss +8 -1
- package/card/src/card-base-theme.scss +12 -1
- package/container/README.md +4 -26
- package/fesm2022/daffodil-design-accordion.mjs +15 -15
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +30 -30
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +20 -20
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +37 -49
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +22 -22
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +31 -31
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +13 -13
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +7 -7
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +13 -12
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +9 -9
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +22 -22
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +8 -8
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +12 -11
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-link-set.mjs +16 -16
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +20 -17
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +7 -7
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +20 -20
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +32 -26
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +5 -3
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +9 -9
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +16 -16
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +8 -8
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +13 -13
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +16 -16
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +11 -11
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +35 -29
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +7 -7
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +3 -3
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +17 -25
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +20 -20
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-testing.mjs +19 -0
- package/fesm2022/daffodil-design-testing.mjs.map +1 -0
- package/fesm2022/daffodil-design-text-snippet.mjs +3 -3
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +3 -3
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +21 -21
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +27 -25
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +22 -11
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +110 -149
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form/README.md +15 -6
- package/hero/README.md +14 -49
- package/image/README.md +6 -29
- package/input/README.md +8 -34
- package/list/README.md +29 -55
- package/list/src/list-theme.scss +16 -2
- package/media-gallery/README.md +36 -43
- package/menu/README.md +24 -55
- package/menu/src/menu-theme.scss +12 -2
- package/modal/README.md +15 -45
- package/native-select/README.md +8 -6
- package/navbar/README.md +18 -27
- package/notification/README.md +14 -49
- package/package.json +1 -1
- package/paginator/README.md +11 -31
- package/paginator/src/paginator-theme.scss +16 -2
- package/progress-bar/README.md +14 -41
- package/scss/global.scss +21 -2
- package/select/README.md +5 -6
- package/select/src/select-theme.scss +10 -2
- package/sidebar/README.md +1 -1
- package/spinner/README.md +15 -9
- package/switch/README.md +17 -6
- package/tabs/README.md +39 -39
- package/tag/README.md +24 -28
- package/textarea/README.md +9 -7
- package/toast/README.md +55 -52
- package/tree/README.md +12 -43
- package/tree/src/tree-theme.scss +8 -4
- package/{accordion/index.d.ts → types/daffodil-design-accordion.d.ts} +1 -1
- package/{button/index.d.ts → types/daffodil-design-button.d.ts} +7 -8
- package/{input/index.d.ts → types/daffodil-design-input.d.ts} +4 -1
- package/{list/index.d.ts → types/daffodil-design-list.d.ts} +4 -1
- package/{menu/index.d.ts → types/daffodil-design-menu.d.ts} +3 -3
- package/{modal/index.d.ts → types/daffodil-design-modal.d.ts} +11 -5
- package/{native-select/index.d.ts → types/daffodil-design-native-select.d.ts} +3 -1
- package/{sidebar/index.d.ts → types/daffodil-design-sidebar.d.ts} +9 -3
- package/{tabs/index.d.ts → types/daffodil-design-tabs.d.ts} +0 -6
- package/{tag/index.d.ts → types/daffodil-design-tag.d.ts} +9 -8
- package/types/daffodil-design-testing.d.ts +11 -0
- package/{tree/index.d.ts → types/daffodil-design-tree.d.ts} +2 -0
- package/{youtube-player/index.d.ts → types/daffodil-design-youtube-player.d.ts} +15 -0
- package/{index.d.ts → types/daffodil-design.d.ts} +17 -64
- /package/{article/index.d.ts → types/daffodil-design-article.d.ts} +0 -0
- /package/{breadcrumb/index.d.ts → types/daffodil-design-breadcrumb.d.ts} +0 -0
- /package/{callout/index.d.ts → types/daffodil-design-callout.d.ts} +0 -0
- /package/{card/index.d.ts → types/daffodil-design-card.d.ts} +0 -0
- /package/{checkbox/index.d.ts → types/daffodil-design-checkbox.d.ts} +0 -0
- /package/{container/index.d.ts → types/daffodil-design-container.d.ts} +0 -0
- /package/{form-field/index.d.ts → types/daffodil-design-form-field.d.ts} +0 -0
- /package/{form/index.d.ts → types/daffodil-design-form.d.ts} +0 -0
- /package/{hero/index.d.ts → types/daffodil-design-hero.d.ts} +0 -0
- /package/{image/index.d.ts → types/daffodil-design-image.d.ts} +0 -0
- /package/{link-set/index.d.ts → types/daffodil-design-link-set.d.ts} +0 -0
- /package/{loading-icon/index.d.ts → types/daffodil-design-loading-icon.d.ts} +0 -0
- /package/{media-gallery/index.d.ts → types/daffodil-design-media-gallery.d.ts} +0 -0
- /package/{navbar/index.d.ts → types/daffodil-design-navbar.d.ts} +0 -0
- /package/{notification/index.d.ts → types/daffodil-design-notification.d.ts} +0 -0
- /package/{paginator/index.d.ts → types/daffodil-design-paginator.d.ts} +0 -0
- /package/{progress-bar/index.d.ts → types/daffodil-design-progress-bar.d.ts} +0 -0
- /package/{quantity-field/index.d.ts → types/daffodil-design-quantity-field.d.ts} +0 -0
- /package/{radio/index.d.ts → types/daffodil-design-radio.d.ts} +0 -0
- /package/{select/index.d.ts → types/daffodil-design-select.d.ts} +0 -0
- /package/{spinner/index.d.ts → types/daffodil-design-spinner.d.ts} +0 -0
- /package/{switch/index.d.ts → types/daffodil-design-switch.d.ts} +0 -0
- /package/{text-snippet/index.d.ts → types/daffodil-design-text-snippet.d.ts} +0 -0
- /package/{textarea/index.d.ts → types/daffodil-design-textarea.d.ts} +0 -0
- /package/{toast/index.d.ts → types/daffodil-design-toast.d.ts} +0 -0
package/modal/README.md
CHANGED
|
@@ -18,8 +18,7 @@ Modals are used to capture information or attention. They overlay the main conte
|
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
To use modal in a standalone component, import `DAFF_MODAL_COMPONENTS` directly into your custom component:
|
|
21
|
+
Import `DAFF_MODAL_COMPONENTS` into your component:
|
|
23
22
|
|
|
24
23
|
```ts
|
|
25
24
|
import { DAFF_MODAL_COMPONENTS } from '@daffodil/design/modal';
|
|
@@ -34,49 +33,13 @@ import { DAFF_MODAL_COMPONENTS } from '@daffodil/design/modal';
|
|
|
34
33
|
export class CustomComponent {}
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
import { NgModule } from '@angular/core';
|
|
42
|
-
import { DaffModalModule } from '@daffodil/design/modal';
|
|
43
|
-
import { CustomComponent } from './custom.component';
|
|
44
|
-
|
|
45
|
-
@NgModule({
|
|
46
|
-
declarations: [
|
|
47
|
-
CustomComponent,
|
|
48
|
-
],
|
|
49
|
-
exports: [
|
|
50
|
-
CustomComponent,
|
|
51
|
-
],
|
|
52
|
-
imports: [
|
|
53
|
-
DaffModalModule,
|
|
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
|
+
> `DaffModalModule` is deprecated. Use the standalone component imports instead.
|
|
60
39
|
|
|
61
40
|
## Anatomy
|
|
62
|
-
A modal
|
|
63
|
-
|
|
64
|
-
### Header
|
|
65
|
-
**`<daff-modal-header>`**: The header section containing the title and optional close button.
|
|
66
|
-
|
|
67
|
-
#### Title
|
|
68
|
-
**`[daffModalTitle]`**: The primary text summarizing the modal.
|
|
69
|
-
|
|
70
|
-
#### Close button
|
|
71
|
-
The close button in the header is shown by default but can be hidden by setting the `dismissible` property to `false` on the header.
|
|
41
|
+
A modal is composed of a header, content, and actions, displayed in the order listed:
|
|
72
42
|
|
|
73
|
-
### Content
|
|
74
|
-
**`<daff-modal-content>`**: The scrollable container for the modal's main content. Use this once per modal to wrap all body content.
|
|
75
|
-
|
|
76
|
-
### Actions
|
|
77
|
-
**`<daff-modal-actions>`**: The container for action buttons, positioned at the bottom of the modal with right-aligned buttons. If two buttons are needed, place the primary button the left and the secondary button on the right.
|
|
78
|
-
|
|
79
|
-
### Basic structure
|
|
80
43
|
```html
|
|
81
44
|
<daff-modal-header>
|
|
82
45
|
<h2 daffModalTitle>Modal Title</h2>
|
|
@@ -90,7 +53,14 @@ The close button in the header is shown by default but can be hidden by setting
|
|
|
90
53
|
</daff-modal-actions>
|
|
91
54
|
```
|
|
92
55
|
|
|
93
|
-
|
|
56
|
+
- **`<daff-modal-header>`**: The header section containing the title and optional close button.
|
|
57
|
+
- **`[daffModalTitle]`**: The primary text summarizing the modal.
|
|
58
|
+
- **`<daff-modal-content>`**: The scrollable container for the modal's main content. Use this once per modal to wrap all body content.
|
|
59
|
+
- **`<daff-modal-actions>`**: The container for action buttons, positioned at the bottom of the modal with right-aligned buttons. If two buttons are needed, place the primary button on the left and the secondary button on the right.
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
### Dismissal
|
|
94
64
|
A modal can be dismissed via:
|
|
95
65
|
- The close button in the header (shown by default)
|
|
96
66
|
- The `ESC` key
|
|
@@ -104,7 +74,7 @@ To hide the close button, set `dismissible` to `false` on `<daff-modal-header>`:
|
|
|
104
74
|
</daff-modal-header>
|
|
105
75
|
```
|
|
106
76
|
|
|
107
|
-
### Position
|
|
77
|
+
### Position
|
|
108
78
|
By default, modals are horizontally and vertically centered on the screen. You can position a modal at the top of the screen by passing a `position` configuration when opening the modal:
|
|
109
79
|
|
|
110
80
|
```ts
|
|
@@ -143,7 +113,7 @@ showModal() {
|
|
|
143
113
|
## Accessibility
|
|
144
114
|
Modal implements the [Dialog (Modal) WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/).
|
|
145
115
|
|
|
146
|
-
###
|
|
116
|
+
### Built-in behavior
|
|
147
117
|
- `role="dialog"`
|
|
148
118
|
- `aria-modal="true"`
|
|
149
119
|
- `aria-labelledby` linked to the `[daffModalTitle]` element
|
package/native-select/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Native select has the same functionality as a native HTML select element, with a
|
|
|
7
7
|
<daff-docs-example-viewer example="basic-native-select"></daff-docs-example-viewer>
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
|
-
|
|
10
|
+
Import `DAFF_NATIVE_SELECT_COMPONENTS` into your component:
|
|
11
11
|
|
|
12
12
|
```ts
|
|
13
13
|
import { DAFF_NATIVE_SELECT_COMPONENTS } from '@daffodil/design/native-select';
|
|
@@ -25,7 +25,6 @@ export class CustomComponent {}
|
|
|
25
25
|
## Anatomy
|
|
26
26
|
Native select 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).
|
|
27
27
|
|
|
28
|
-
### Basic structure
|
|
29
28
|
```html
|
|
30
29
|
<daff-form-field>
|
|
31
30
|
<daff-form-label>Sort By</daff-form-label>
|
|
@@ -37,7 +36,7 @@ Native select must be used inside `<daff-form-field>` to enable proper state man
|
|
|
37
36
|
</daff-form-field>
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
##
|
|
39
|
+
## Features
|
|
41
40
|
|
|
42
41
|
### Disabled
|
|
43
42
|
Native select can be disabled in two ways: using Angular's reactive forms with `FormControl` or with the native HTML `disabled` attribute.
|
|
@@ -51,12 +50,15 @@ Native select supports validation and error messages through Angular's form vali
|
|
|
51
50
|
|
|
52
51
|
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.
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
### Hints
|
|
55
54
|
Hints provide additional context or instructions to help users complete the select field correctly. Use `<daff-hint>` within the form field to display helpful information below the select. Unlike error messages, hints are always visible and provide guidance rather than validation feedback.
|
|
56
55
|
|
|
57
56
|
<daff-docs-example-viewer example="native-select-hint"></daff-docs-example-viewer>
|
|
58
57
|
|
|
59
58
|
## Accessibility
|
|
60
|
-
When `<daff-form-label>` is used within `<daff-form-field>`, the label automatically associates with the select using the `for` and `id` attributes.
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
### Built-in behavior
|
|
61
|
+
- When `<daff-form-label>` is used within `<daff-form-field>`, the label automatically associates with the select using the `for` and `id` attributes.
|
|
62
|
+
|
|
63
|
+
### Developer responsibilities
|
|
64
|
+
- 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/navbar/README.md
CHANGED
|
@@ -8,8 +8,7 @@ The navbar contains minimal layout styles, allowing the content within it to be
|
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
To use navbar in a standalone component, import `DAFF_NAVBAR_COMPONENTS` directly into your custom component:
|
|
11
|
+
Import`DAFF_NAVBAR_COMPONENTS` into your component:
|
|
13
12
|
|
|
14
13
|
```ts
|
|
15
14
|
import { DAFF_NAVBAR_COMPONENTS } from '@daffodil/design/navbar';
|
|
@@ -24,29 +23,20 @@ import { DAFF_NAVBAR_COMPONENTS } from '@daffodil/design/navbar';
|
|
|
24
23
|
export class CustomComponent {}
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
> **Deprecation notice:**
|
|
27
|
+
>
|
|
28
|
+
> `DaffNavbarModule` is deprecated. Use the standalone component imports instead.
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
import { DaffNavbarModule } from '@daffodil/design/navbar';
|
|
33
|
-
import { CustomComponent } from './custom.component';
|
|
30
|
+
## Anatomy
|
|
31
|
+
A navbar is a directive applied to a native `<nav>` element:
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
exports: [
|
|
40
|
-
CustomComponent,
|
|
41
|
-
],
|
|
42
|
-
imports: [
|
|
43
|
-
DaffNavbarModule,
|
|
44
|
-
],
|
|
45
|
-
})
|
|
46
|
-
export class CustomComponentModule { }
|
|
33
|
+
```html
|
|
34
|
+
<nav daff-navbar>
|
|
35
|
+
<!-- navigation items -->
|
|
36
|
+
</nav>
|
|
47
37
|
```
|
|
48
38
|
|
|
49
|
-
|
|
39
|
+
- **`nav[daff-navbar]`**: The directive applied to a native `<nav>` element. Provides flexbox layout and styling for navigation content.
|
|
50
40
|
|
|
51
41
|
## Features
|
|
52
42
|
|
|
@@ -62,11 +52,7 @@ Use the `blurred` property to add a semi-transparent background effect to the na
|
|
|
62
52
|
|
|
63
53
|
Both `elevated` and `blurred` can be combined for a layered effect:
|
|
64
54
|
|
|
65
|
-
|
|
66
|
-
<nav daff-navbar [elevated]="true" [blurred]="true">
|
|
67
|
-
<!-- navigation items -->
|
|
68
|
-
</nav>
|
|
69
|
-
```
|
|
55
|
+
<daff-docs-example-viewer example="blurred-elevated-navbar"></daff-docs-example-viewer>
|
|
70
56
|
|
|
71
57
|
### Contained navbar
|
|
72
58
|
A navbar can be contained to a specific width by using the [container](/libs/design/container/README.md) component. The layout styles set on the navbar will automatically be passed down to the container.
|
|
@@ -74,7 +60,12 @@ A navbar can be contained to a specific width by using the [container](/libs/des
|
|
|
74
60
|
<daff-docs-example-viewer example="contained-navbar"></daff-docs-example-viewer>
|
|
75
61
|
|
|
76
62
|
## Accessibility
|
|
77
|
-
|
|
63
|
+
|
|
64
|
+
### Built-in behavior
|
|
65
|
+
- Enforces the use of the native `<nav>` element so each navbar is recognized as a navigation landmark by assistive technology
|
|
66
|
+
|
|
67
|
+
### Developer responsibilities
|
|
68
|
+
- If more than one navbar is used on the page, give each one a meaningful `aria-label` to distinguish them
|
|
78
69
|
|
|
79
70
|
```html
|
|
80
71
|
<nav daff-navbar aria-label="main navigation">
|
package/notification/README.md
CHANGED
|
@@ -17,8 +17,7 @@ Notifications should not be used to display app-level alerts. For global message
|
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
To use notification in a standalone component, import `DAFF_NOTIFICATION_COMPONENTS` directly into your custom component:
|
|
20
|
+
Import `DAFF_NOTIFICATION_COMPONENTS` into your component:
|
|
22
21
|
|
|
23
22
|
```ts
|
|
24
23
|
import { DAFF_NOTIFICATION_COMPONENTS } from '@daffodil/design/notification';
|
|
@@ -33,49 +32,13 @@ import { DAFF_NOTIFICATION_COMPONENTS } from '@daffodil/design/notification';
|
|
|
33
32
|
export class CustomComponent {}
|
|
34
33
|
```
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
```ts
|
|
40
|
-
import { NgModule } from '@angular/core';
|
|
41
|
-
import { DaffNotificationModule } from '@daffodil/design/notification';
|
|
42
|
-
import { CustomComponent } from './custom.component';
|
|
43
|
-
|
|
44
|
-
@NgModule({
|
|
45
|
-
declarations: [
|
|
46
|
-
CustomComponent,
|
|
47
|
-
],
|
|
48
|
-
exports: [
|
|
49
|
-
CustomComponent,
|
|
50
|
-
],
|
|
51
|
-
imports: [
|
|
52
|
-
DaffNotificationModule,
|
|
53
|
-
],
|
|
54
|
-
})
|
|
55
|
-
export class CustomComponentModule { }
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
> This method is deprecated. It's recommended to update all custom components to standalone.
|
|
35
|
+
> **Deprecation notice:**
|
|
36
|
+
>
|
|
37
|
+
> `DaffNotificationModule` is deprecated. Use the standalone component imports instead.
|
|
59
38
|
|
|
60
39
|
## Anatomy
|
|
61
|
-
A notification
|
|
62
|
-
|
|
63
|
-
### Container
|
|
64
|
-
**`<daff-notification>`**: The wrapper component that contains all notification content.
|
|
65
|
-
|
|
66
|
-
### Icon
|
|
67
|
-
Use the `[daffPrefix]` element to add a decorative icon that provides a quick visual cue about the notification's purpose.
|
|
68
|
-
|
|
69
|
-
### Title
|
|
70
|
-
**`[daffNotificationTitle]`**: The primary text summarizing the notification.
|
|
40
|
+
A notification is composed of a container with a title, message, and optional icon and actions:
|
|
71
41
|
|
|
72
|
-
### Message
|
|
73
|
-
**`[daffNotificationMessage]`**: Provides additional details or context. Keep this brief—ideally one to two short sentences.
|
|
74
|
-
|
|
75
|
-
### Actions
|
|
76
|
-
**`[daffNotificationActions]`**: Include actionable buttons related to the notification (e.g., dismiss, navigate). A maximum of two buttons is recommended to keep the notification concise.
|
|
77
|
-
|
|
78
|
-
### Basic structure
|
|
79
42
|
```html
|
|
80
43
|
<daff-notification>
|
|
81
44
|
<fa-icon daffPrefix></fa-icon>
|
|
@@ -88,6 +51,12 @@ Use the `[daffPrefix]` element to add a decorative icon that provides a quick vi
|
|
|
88
51
|
</daff-notification>
|
|
89
52
|
```
|
|
90
53
|
|
|
54
|
+
- **`<daff-notification>`**: The wrapper component that contains all notification content.
|
|
55
|
+
- **`[daffPrefix]`**: A decorative icon that provides a quick visual cue about the notification's purpose.
|
|
56
|
+
- **`[daffNotificationTitle]`**: The primary text summarizing the notification.
|
|
57
|
+
- **`[daffNotificationMessage]`**: Additional details or context. Keep this brief—ideally one to two short sentences.
|
|
58
|
+
- **`[daffNotificationActions]`**: Actionable buttons related to the notification (e.g. dismiss, navigate). A maximum of two buttons is recommended to keep the notification concise.
|
|
59
|
+
|
|
91
60
|
## Features
|
|
92
61
|
|
|
93
62
|
### Status
|
|
@@ -100,7 +69,7 @@ Use the `orientation` property to stack notification content either `vertical` (
|
|
|
100
69
|
|
|
101
70
|
<daff-docs-example-viewer example="notification-orientations"></daff-docs-example-viewer>
|
|
102
71
|
|
|
103
|
-
###
|
|
72
|
+
### Dismissable notification
|
|
104
73
|
Notifications are persistent by default. To display a close button, set the `dismissible` property to `true`.
|
|
105
74
|
|
|
106
75
|
> Avoid making critical notifications dismissible to ensure users can read or interact with the necessary information.
|
|
@@ -108,11 +77,7 @@ Notifications are persistent by default. To display a close button, set the `dis
|
|
|
108
77
|
<daff-docs-example-viewer example="dismissible-notification"></daff-docs-example-viewer>
|
|
109
78
|
|
|
110
79
|
## Accessibility
|
|
111
|
-
**Live region roles:**
|
|
112
|
-
- Notifications with `critical` or `warn` status use `role="alert"` for immediate announcement by assistive technologies.
|
|
113
|
-
- All other notifications use `role="status"` for non-interruptive announcements.
|
|
114
|
-
|
|
115
|
-
See [live region roles](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#4._live_region_roles) for more information.
|
|
116
80
|
|
|
117
|
-
|
|
81
|
+
### Built-in behavior
|
|
82
|
+
- Notifications with `critical` or `warn` status use `role="alert"` for immediate announcement by assistive technologies, while all other notifications use `role="status"` for non-interruptive announcements. See [live region roles](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#4._live_region_roles) for more information.
|
|
118
83
|
- Notifications include `tabindex="0"` so they can be discovered by keyboard users.
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@daffodil/design","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/design"]}}},"version":"0.
|
|
1
|
+
{"name":"@daffodil/design","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/design"]}}},"version":"0.93.0","author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","description":"An Angular component library built to support ecommerce applications with accessible UI components and theming. Part of the Daffodil ecommerce framework.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"peerDependencies":{"@angular/animations":"^21","@angular/common":"^21","@angular/core":"^21","@angular/forms":"^21","@angular/cdk":"^21","@daffodil/core":"0.93.0","@fortawesome/angular-fontawesome":"^4.0.0","@fortawesome/fontawesome-svg-core":"^7.1.0","@fortawesome/free-solid-svg-icons":"^7.1.0","@fortawesome/free-brands-svg-icons":"^7.1.0","@fortawesome/free-regular-svg-icons":"^7.1.0","modern-normalize":"^3.0.1","rxjs":"^7.0.0"},"optionalDependencies":{"@faker-js/faker":"^10.3.0"},"exports":{"./scss/global":{"sass":"./scss/global.scss"},"./scss/theme":{"sass":"./scss/theme.scss"},"./scss/utilities":{"sass":"./scss/utilities.scss"},"./scss/typography":{"sass":"./scss/typography/_index.scss"},"./package.json":{"default":"./package.json"},".":{"types":"./types/daffodil-design.d.ts","default":"./fesm2022/daffodil-design.mjs"},"./accordion":{"types":"./types/daffodil-design-accordion.d.ts","default":"./fesm2022/daffodil-design-accordion.mjs"},"./article":{"types":"./types/daffodil-design-article.d.ts","default":"./fesm2022/daffodil-design-article.mjs"},"./breadcrumb":{"types":"./types/daffodil-design-breadcrumb.d.ts","default":"./fesm2022/daffodil-design-breadcrumb.mjs"},"./button":{"types":"./types/daffodil-design-button.d.ts","default":"./fesm2022/daffodil-design-button.mjs"},"./callout":{"types":"./types/daffodil-design-callout.d.ts","default":"./fesm2022/daffodil-design-callout.mjs"},"./card":{"types":"./types/daffodil-design-card.d.ts","default":"./fesm2022/daffodil-design-card.mjs"},"./checkbox":{"types":"./types/daffodil-design-checkbox.d.ts","default":"./fesm2022/daffodil-design-checkbox.mjs"},"./container":{"types":"./types/daffodil-design-container.d.ts","default":"./fesm2022/daffodil-design-container.mjs"},"./form":{"types":"./types/daffodil-design-form.d.ts","default":"./fesm2022/daffodil-design-form.mjs"},"./form-field":{"types":"./types/daffodil-design-form-field.d.ts","default":"./fesm2022/daffodil-design-form-field.mjs"},"./hero":{"types":"./types/daffodil-design-hero.d.ts","default":"./fesm2022/daffodil-design-hero.mjs"},"./image":{"types":"./types/daffodil-design-image.d.ts","default":"./fesm2022/daffodil-design-image.mjs"},"./input":{"types":"./types/daffodil-design-input.d.ts","default":"./fesm2022/daffodil-design-input.mjs"},"./link-set":{"types":"./types/daffodil-design-link-set.d.ts","default":"./fesm2022/daffodil-design-link-set.mjs"},"./list":{"types":"./types/daffodil-design-list.d.ts","default":"./fesm2022/daffodil-design-list.mjs"},"./loading-icon":{"types":"./types/daffodil-design-loading-icon.d.ts","default":"./fesm2022/daffodil-design-loading-icon.mjs"},"./media-gallery":{"types":"./types/daffodil-design-media-gallery.d.ts","default":"./fesm2022/daffodil-design-media-gallery.mjs"},"./menu":{"types":"./types/daffodil-design-menu.d.ts","default":"./fesm2022/daffodil-design-menu.mjs"},"./modal":{"types":"./types/daffodil-design-modal.d.ts","default":"./fesm2022/daffodil-design-modal.mjs"},"./native-select":{"types":"./types/daffodil-design-native-select.d.ts","default":"./fesm2022/daffodil-design-native-select.mjs"},"./navbar":{"types":"./types/daffodil-design-navbar.d.ts","default":"./fesm2022/daffodil-design-navbar.mjs"},"./notification":{"types":"./types/daffodil-design-notification.d.ts","default":"./fesm2022/daffodil-design-notification.mjs"},"./paginator":{"types":"./types/daffodil-design-paginator.d.ts","default":"./fesm2022/daffodil-design-paginator.mjs"},"./progress-bar":{"types":"./types/daffodil-design-progress-bar.d.ts","default":"./fesm2022/daffodil-design-progress-bar.mjs"},"./quantity-field":{"types":"./types/daffodil-design-quantity-field.d.ts","default":"./fesm2022/daffodil-design-quantity-field.mjs"},"./radio":{"types":"./types/daffodil-design-radio.d.ts","default":"./fesm2022/daffodil-design-radio.mjs"},"./select":{"types":"./types/daffodil-design-select.d.ts","default":"./fesm2022/daffodil-design-select.mjs"},"./sidebar":{"types":"./types/daffodil-design-sidebar.d.ts","default":"./fesm2022/daffodil-design-sidebar.mjs"},"./spinner":{"types":"./types/daffodil-design-spinner.d.ts","default":"./fesm2022/daffodil-design-spinner.mjs"},"./switch":{"types":"./types/daffodil-design-switch.d.ts","default":"./fesm2022/daffodil-design-switch.mjs"},"./tabs":{"types":"./types/daffodil-design-tabs.d.ts","default":"./fesm2022/daffodil-design-tabs.mjs"},"./tag":{"types":"./types/daffodil-design-tag.d.ts","default":"./fesm2022/daffodil-design-tag.mjs"},"./testing":{"types":"./types/daffodil-design-testing.d.ts","default":"./fesm2022/daffodil-design-testing.mjs"},"./text-snippet":{"types":"./types/daffodil-design-text-snippet.d.ts","default":"./fesm2022/daffodil-design-text-snippet.mjs"},"./textarea":{"types":"./types/daffodil-design-textarea.d.ts","default":"./fesm2022/daffodil-design-textarea.mjs"},"./toast":{"types":"./types/daffodil-design-toast.d.ts","default":"./fesm2022/daffodil-design-toast.mjs"},"./tree":{"types":"./types/daffodil-design-tree.d.ts","default":"./fesm2022/daffodil-design-tree.mjs"},"./youtube-player":{"types":"./types/daffodil-design-youtube-player.d.ts","default":"./fesm2022/daffodil-design-youtube-player.mjs"}},"module":"fesm2022/daffodil-design.mjs","typings":"types/daffodil-design.d.ts","sideEffects":false,"type":"module","dependencies":{"tslib":"^2.6.2"}}
|
package/paginator/README.md
CHANGED
|
@@ -14,12 +14,11 @@ Pagination can be used with a data table or on a page. It automatically truncate
|
|
|
14
14
|
- Breaking up long-form content into manageable sections
|
|
15
15
|
|
|
16
16
|
**When not to use**
|
|
17
|
-
- Do not use it to display linear journeys, for example, in a form progression. Instead, use the [
|
|
17
|
+
- Do not use it to display linear journeys, for example, in a form progression. Instead, use the [Progress Bar](/libs/design/progress-bar/README.md) or [Button](/libs/design/button/README.md) components to navigate forward and backward.
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
To use paginator in a standalone component, import `DAFF_PAGINATOR_COMPONENTS` directly into your custom component:
|
|
21
|
+
Import `DAFF_PAGINATOR_COMPONENTS` into your component:
|
|
23
22
|
|
|
24
23
|
```ts
|
|
25
24
|
import { DAFF_PAGINATOR_COMPONENTS } from '@daffodil/design/paginator';
|
|
@@ -34,33 +33,13 @@ import { DAFF_PAGINATOR_COMPONENTS } from '@daffodil/design/paginator';
|
|
|
34
33
|
export class CustomComponent {}
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
> **Deprecation notice:**
|
|
37
|
+
>
|
|
38
|
+
> `DaffPaginatorModule` is deprecated. Use the standalone component imports instead.
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
import { DaffPaginatorModule } from '@daffodil/design/paginator';
|
|
43
|
-
import { CustomComponent } from './custom.component';
|
|
44
|
-
|
|
45
|
-
@NgModule({
|
|
46
|
-
declarations: [
|
|
47
|
-
CustomComponent,
|
|
48
|
-
],
|
|
49
|
-
exports: [
|
|
50
|
-
CustomComponent,
|
|
51
|
-
],
|
|
52
|
-
imports: [
|
|
53
|
-
DaffPaginatorModule,
|
|
54
|
-
],
|
|
55
|
-
})
|
|
56
|
-
export class CustomComponentModule { }
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
> **Warning**
|
|
60
|
-
>
|
|
61
|
-
> This method is deprecated. It's recommended to update all custom components to standalone.
|
|
40
|
+
## Anatomy
|
|
41
|
+
A paginator is a single navigation element labeled for the content it controls:
|
|
62
42
|
|
|
63
|
-
## Basic structure
|
|
64
43
|
```html
|
|
65
44
|
<daff-paginator aria-label="Search results page"></daff-paginator>
|
|
66
45
|
```
|
|
@@ -72,11 +51,12 @@ Ellipses are used to truncate page numbers when the total number of pages exceed
|
|
|
72
51
|
|
|
73
52
|
## Accessibility
|
|
74
53
|
|
|
75
|
-
###
|
|
76
|
-
`role="navigation"` on the paginator element to ensure proper semantic structure
|
|
54
|
+
### Built-in behavior
|
|
55
|
+
- `role="navigation"` on the paginator element to ensure proper semantic structure
|
|
77
56
|
|
|
78
57
|
### Developer responsibilities
|
|
79
|
-
Use `aria-label` or `aria-labelledby` to give a meaningful label
|
|
58
|
+
- Use `aria-label` or `aria-labelledby` to give `<daff-paginator>` a meaningful label that describes the content it controls
|
|
59
|
+
- If more than one paginator is used on a page, give each one a unique `aria-label`
|
|
80
60
|
|
|
81
61
|
```html
|
|
82
62
|
<daff-paginator aria-label="Product list paginator">
|
|
@@ -16,7 +16,14 @@
|
|
|
16
16
|
|
|
17
17
|
@include light($mode) {
|
|
18
18
|
&__page-link {
|
|
19
|
-
|
|
19
|
+
@media (hover: hover) {
|
|
20
|
+
&:hover {
|
|
21
|
+
&::after {
|
|
22
|
+
background: daff-color($neutral, 20);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
&.selected {
|
|
21
28
|
&::after {
|
|
22
29
|
background: daff-color($neutral, 20);
|
|
@@ -27,7 +34,14 @@
|
|
|
27
34
|
|
|
28
35
|
@include dark($mode) {
|
|
29
36
|
&__page-link {
|
|
30
|
-
|
|
37
|
+
@media (hover: hover) {
|
|
38
|
+
&:hover {
|
|
39
|
+
&::after {
|
|
40
|
+
background: daff-color($neutral, 90);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
31
45
|
&.selected {
|
|
32
46
|
&::after {
|
|
33
47
|
background: daff-color($neutral, 90);
|
package/progress-bar/README.md
CHANGED
|
@@ -13,10 +13,12 @@ Progress bars help users understand the status of ongoing processes or tasks. Th
|
|
|
13
13
|
- Indicating completion of multi-step processes
|
|
14
14
|
- Displaying loading states for time-consuming operations
|
|
15
15
|
|
|
16
|
+
**When not to use**
|
|
17
|
+
- The operation is short or instantaneous. Use the [spinner](/libs/design/spinner/README.md) component instead.
|
|
18
|
+
|
|
16
19
|
## Usage
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
To use progress bar in a standalone component, import `DAFF_PROGRESS_BAR_COMPONENTS` directly into your custom component:
|
|
21
|
+
Import `DAFF_PROGRESS_BAR_COMPONENTS` into your component:
|
|
20
22
|
|
|
21
23
|
```ts
|
|
22
24
|
import { DAFF_PROGRESS_BAR_COMPONENTS } from '@daffodil/design/progress-bar';
|
|
@@ -31,60 +33,31 @@ import { DAFF_PROGRESS_BAR_COMPONENTS } from '@daffodil/design/progress-bar';
|
|
|
31
33
|
export class CustomComponent {}
|
|
32
34
|
```
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```ts
|
|
38
|
-
import { NgModule } from '@angular/core';
|
|
39
|
-
import { DaffProgressBarModule } from '@daffodil/design/progress-bar';
|
|
40
|
-
import { CustomComponent } from './custom.component';
|
|
41
|
-
|
|
42
|
-
@NgModule({
|
|
43
|
-
declarations: [
|
|
44
|
-
CustomComponent,
|
|
45
|
-
],
|
|
46
|
-
exports: [
|
|
47
|
-
CustomComponent,
|
|
48
|
-
],
|
|
49
|
-
imports: [
|
|
50
|
-
DaffProgressBarModule,
|
|
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
|
+
> `DaffProgressBarModule` is deprecated. Use the standalone component imports instead.
|
|
57
39
|
|
|
58
40
|
## Anatomy
|
|
59
|
-
A progress bar
|
|
60
|
-
|
|
61
|
-
### Container
|
|
62
|
-
**`<daff-progress-bar>`**: The main progress bar component that displays the progress indicator.
|
|
41
|
+
A progress bar is composed of a container and an optional label:
|
|
63
42
|
|
|
64
|
-
### Label
|
|
65
|
-
**`<daff-progress-bar-label>`**: Label that helps users understand what the progress represents. The label is automatically associated with the progress bar for accessibility.
|
|
66
|
-
|
|
67
|
-
### Basic structure
|
|
68
43
|
```html
|
|
69
44
|
<daff-progress-bar>
|
|
70
45
|
<daff-progress-bar-label>File upload</daff-progress-bar-label>
|
|
71
46
|
</daff-progress-bar>
|
|
72
47
|
```
|
|
73
48
|
|
|
74
|
-
|
|
49
|
+
- **`<daff-progress-bar>`**: The wrapper component that displays the progress indicator.
|
|
50
|
+
- **`<daff-progress-bar-label>`**: A label that describes what the progress represents. The label is automatically associated with the progress bar for accessibility.
|
|
75
51
|
|
|
76
|
-
|
|
52
|
+
If a label is not provided, add an `aria-label` to `<daff-progress-bar>` to ensure an accessible experience.
|
|
77
53
|
|
|
78
|
-
|
|
79
|
-
Use determinate progress bars when the percentage of completion is known. This is the default type.
|
|
54
|
+
## Features
|
|
80
55
|
|
|
81
56
|
### Indeterminate
|
|
82
|
-
Use indeterminate progress
|
|
57
|
+
Use an indeterminate progress bar when the percentage of completion is unknown or cannot be calculated. Set the `indeterminate` property to `true`.
|
|
83
58
|
|
|
84
59
|
<daff-docs-example-viewer example="progress-bar-indeterminate"></daff-docs-example-viewer>
|
|
85
60
|
|
|
86
|
-
## Features
|
|
87
|
-
|
|
88
61
|
### Colors
|
|
89
62
|
The default color is `primary`. Use the `color` property to change a progress bar's color.
|
|
90
63
|
|
|
@@ -95,7 +68,7 @@ The default color is `primary`. Use the `color` property to change a progress ba
|
|
|
95
68
|
## Accessibility
|
|
96
69
|
Progress bar implements the ARIA `role="progressbar"` pattern.
|
|
97
70
|
|
|
98
|
-
###
|
|
71
|
+
### Built-in behavior
|
|
99
72
|
- `role="progressbar"` on the progress element
|
|
100
73
|
- `aria-valuemin="0"` and `aria-valuemax="100"` set by default
|
|
101
74
|
- `aria-valuenow` reflecting current progress (for determinate mode)
|
package/scss/global.scss
CHANGED
|
@@ -27,6 +27,23 @@ html {
|
|
|
27
27
|
-moz-osx-font-smoothing: grayscale;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
body {
|
|
31
|
+
::-webkit-scrollbar-track {
|
|
32
|
+
background: rgba(var(--daff-theme-rgb), 0);
|
|
33
|
+
// stylelint-disable-next-line daffodil/no-direct-cursor-pointer
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
::-webkit-scrollbar {
|
|
37
|
+
width: 0.375rem;
|
|
38
|
+
height: 0.375rem;
|
|
39
|
+
}
|
|
40
|
+
::-webkit-scrollbar-thumb {
|
|
41
|
+
border-radius: 0.5rem;
|
|
42
|
+
transition: background-color 300ms ease;
|
|
43
|
+
background-color: rgba(var(--daff-theme-contrast-rgb), 0.1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
30
47
|
html {
|
|
31
48
|
scroll-behavior: smooth;
|
|
32
49
|
}
|
|
@@ -34,8 +51,10 @@ html {
|
|
|
34
51
|
a {
|
|
35
52
|
color: currentColor;
|
|
36
53
|
|
|
37
|
-
|
|
38
|
-
|
|
54
|
+
@media (hover: hover) {
|
|
55
|
+
&:hover {
|
|
56
|
+
text-decoration: none;
|
|
57
|
+
}
|
|
39
58
|
}
|
|
40
59
|
}
|
|
41
60
|
|
package/select/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Use select when you need users to pick one option from a list. It works like a s
|
|
|
7
7
|
<daff-docs-example-viewer example="basic-select"></daff-docs-example-viewer>
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
|
-
|
|
10
|
+
Import `DAFF_SELECT_COMPONENTS` and `DAFF_FORM_FIELD_COMPONENTS` into your component:
|
|
11
11
|
|
|
12
12
|
```ts
|
|
13
13
|
import { DAFF_SELECT_COMPONENTS } from '@daffodil/design/select';
|
|
@@ -27,7 +27,6 @@ export class CustomComponent {}
|
|
|
27
27
|
## Anatomy
|
|
28
28
|
Select 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).
|
|
29
29
|
|
|
30
|
-
### Basic structure
|
|
31
30
|
Use `daffSelectOption` to render a list of options in the select panel:
|
|
32
31
|
|
|
33
32
|
```html
|
|
@@ -43,7 +42,7 @@ Use `daffSelectOption` to render a list of options in the select panel:
|
|
|
43
42
|
</daff-form-field>
|
|
44
43
|
```
|
|
45
44
|
|
|
46
|
-
##
|
|
45
|
+
## Features
|
|
47
46
|
|
|
48
47
|
### Disabled
|
|
49
48
|
Select can be disabled using Angular's reactive forms with `FormControl`.
|
|
@@ -57,15 +56,15 @@ Select supports validation and error messages through Angular's form validation
|
|
|
57
56
|
|
|
58
57
|
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.
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
Hints provide additional context or instructions to help users complete the select field correctly. Use `<daff-hint>` within the form field to display helpful information below the
|
|
59
|
+
### Hints
|
|
60
|
+
Hints provide additional context or instructions to help users complete the select field correctly. Use `<daff-hint>` within the form field to display helpful information below the select. Unlike error messages, hints are always visible and provide guidance rather than validation feedback.
|
|
62
61
|
|
|
63
62
|
<daff-docs-example-viewer example="select-with-hint"></daff-docs-example-viewer>
|
|
64
63
|
|
|
65
64
|
## Accessibility
|
|
66
65
|
Select follows the [Combobox WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/). The combobox activator is combined with an inner `role="listbox"` element opened in a popup.
|
|
67
66
|
|
|
68
|
-
###
|
|
67
|
+
### Built-in behavior
|
|
69
68
|
- Automatic focus trapping when select panel is open
|
|
70
69
|
- `aria-labelledby` associated with the `<daff-form-label>`
|
|
71
70
|
- `aria-expanded` state management
|