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