@daffodil/design 0.82.0 → 0.84.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/src/accordion-theme.scss +28 -6
- package/article/src/article-theme.scss +118 -64
- package/atoms/form/checkbox/cva/checkbox-cva.directive.d.ts +3 -0
- package/atoms/form/error-message/error-message.component.d.ts +4 -1
- package/atoms/form/error-message/error-message.module.d.ts +4 -1
- package/atoms/form/form-field/form-field/form-field.component.d.ts +23 -29
- package/atoms/form/form-field/form-field-control.d.ts +18 -4
- package/atoms/form/form-field/form-field-state.d.ts +7 -0
- package/atoms/form/form-field/form-field.d.ts +10 -0
- package/atoms/form/form-field/form-field.module.d.ts +6 -4
- package/atoms/form/form-field/public_api.d.ts +2 -1
- package/atoms/form/form-label/form-label.directive.d.ts +4 -1
- package/atoms/form/form-label/form-label.module.d.ts +4 -1
- package/atoms/form/hint/hint.component.d.ts +9 -0
- package/atoms/form/hint/public_api.d.ts +1 -0
- package/atoms/form/input/input.component.d.ts +15 -19
- package/atoms/form/input/input.module.d.ts +4 -2
- package/atoms/form/native-select/native-select.component.d.ts +5 -1
- package/atoms/form/quantity-field/quantity-field.component.d.ts +2 -1
- package/atoms/form/quantity-field/quantity-field.module.d.ts +3 -3
- package/atoms/form/quantity-field/quantity-input/quantity-input.component.d.ts +3 -0
- package/atoms/form/radio/cva/radio-cva.directive.d.ts +3 -0
- package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +3 -0
- package/breadcrumb/src/breadcrumb-theme.scss +12 -3
- package/button/button/button-base.directive.d.ts +6 -23
- package/button/src/button/basic/button-theme.scss +17 -40
- package/button/src/button/button-base.scss +32 -5
- package/button/src/button/flat/flat-theme.scss +4 -38
- package/button/src/button/icon/icon-theme.scss +157 -79
- package/button/src/button/raised/raised-theme.scss +2 -2
- package/button/src/button/stroked/stroked-theme.scss +7 -39
- package/button/src/button/underline/underline-theme.scss +4 -18
- package/callout/src/callout-theme.scss +27 -10
- package/card/card/basic/basic.component.d.ts +3 -0
- package/card/card/raised/raised.component.d.ts +3 -0
- package/card/card/stroked/stroked.component.d.ts +3 -0
- package/card/examples/card-theming/card-theming.component.d.ts +2 -1
- package/card/examples/public_api.d.ts +1 -1
- package/card/src/card/stroked/stroked-theme.scss +102 -13
- package/card/src/card-base-theme.scss +126 -55
- package/checkbox/examples/basic-checkbox/basic-checkbox.component.d.ts +3 -0
- package/checkbox/examples/checkbox-set/checkbox-set.component.d.ts +3 -0
- package/core/article-encapsulated/article-encapsulated.directive.d.ts +3 -0
- package/core/colorable/colorable.directive.d.ts +8 -0
- package/core/manage-container-layout/manage-container-layout.directive.d.ts +3 -0
- package/core/openable/openable.directive.d.ts +3 -0
- package/core/prefix-suffix/prefix-suffix.module.d.ts +1 -1
- package/core/prefix-suffix/prefix.directive.d.ts +4 -1
- package/core/prefix-suffix/public_api.d.ts +0 -4
- package/core/prefix-suffix/suffix.directive.d.ts +4 -1
- package/core/sizable/sizable.directive.d.ts +8 -0
- package/core/statusable/statusable.directive.d.ts +2 -0
- package/core/text-alignable/text-alignable.directive.d.ts +6 -1
- package/fesm2022/daffodil-design-accordion.mjs +2 -2
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +5 -2
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button-examples.mjs +21 -17
- package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +25 -32
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-card-examples.mjs +14 -12
- package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +9 -0
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox-examples.mjs +6 -0
- package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +2 -2
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input-examples.mjs +45 -22
- package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +57 -18
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +23 -10
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +33 -0
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +2 -2
- package/fesm2022/daffodil-design-notification-examples.mjs +8 -12
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +32 -5
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +2 -2
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar-examples.mjs +2 -2
- package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +18 -3
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field-examples.mjs +9 -9
- package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +3 -8
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch-examples.mjs +6 -6
- package/fesm2022/daffodil-design-switch-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +35 -11
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +27 -8
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast-examples.mjs +6 -0
- package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +17 -18
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +21 -7
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +3 -0
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +301 -224
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/src/hero-theme.scss +27 -10
- package/input/examples/examples.d.ts +2 -2
- package/input/examples/input-disabled/input-disabled.component.d.ts +2 -0
- package/input/examples/input-hint/input-hint.component.d.ts +5 -0
- package/input/examples/input-with-form-field/input-with-form-field.component.d.ts +2 -0
- package/list/list/list.component.d.ts +1 -1
- package/list/src/list-theme.scss +16 -20
- package/media-gallery/README.md +3 -3
- package/media-gallery/media-gallery/media-gallery.component.d.ts +21 -5
- package/media-gallery/public_api.d.ts +3 -3
- package/media-gallery/thumbnail/thumbnail.directive.d.ts +23 -6
- package/menu/menu/menu.component.d.ts +15 -0
- package/menu/menu-activator/menu-activator.component.d.ts +3 -0
- package/menu/src/menu-theme.scss +29 -10
- package/modal/modal/modal.component.d.ts +21 -0
- package/modal/modal-actions/modal-actions.component.d.ts +3 -0
- package/modal/modal-close/modal-close.directive.d.ts +3 -0
- package/modal/modal-content/modal-content.component.d.ts +3 -0
- package/modal/modal-title/modal-title.directive.d.ts +3 -0
- package/navbar/src/navbar-theme.scss +8 -3
- package/notification/README.md +11 -12
- package/notification/notification/notification.component.d.ts +17 -2
- package/notification/notification-actions/notification-actions.directive.d.ts +3 -0
- package/notification/notification-message/notification-message.directive.d.ts +3 -0
- package/notification/notification-subtitle/notification-subtitle.directive.d.ts +3 -0
- package/notification/notification-title/notification-title.directive.d.ts +3 -0
- package/notification/notification.d.ts +2 -2
- package/notification/src/notification-theme.scss +62 -23
- package/package.json +1 -1
- package/paginator/src/paginator-theme.scss +22 -17
- package/progress-bar/README.md +2 -4
- package/progress-bar/progress-bar-label/progress-bar-label.directive.d.ts +3 -0
- package/progress-bar/progress-bar.component.d.ts +15 -3
- package/progress-bar/src/progress-bar-theme.scss +17 -8
- package/public_api.d.ts +1 -0
- package/scss/state/skeleton/_mixins.scss +19 -9
- package/scss/theme.scss +2 -0
- package/sidebar/public_api.d.ts +10 -11
- package/sidebar/sidebar.d.ts +1 -2
- package/sidebar/sidebar.module.d.ts +1 -2
- package/src/atoms/form/error-message/error-message-theme.scss +4 -1
- package/src/atoms/form/form-field/form-field/form-field-theme.scss +22 -10
- package/src/atoms/form/hint/hint-theme.scss +17 -0
- package/src/atoms/form/input/input-theme.scss +1 -5
- package/switch/src/switch-theme.scss +29 -10
- package/switch/switch/switch.component.d.ts +31 -6
- package/switch/switch.d.ts +2 -2
- package/tabs/src/tabs-theme.scss +31 -13
- package/tabs/tabs/tab-activator/tab-activator.component.d.ts +15 -0
- package/tabs/tabs/tab-label/tab-label.component.d.ts +2 -5
- package/tabs/tabs/tabs.component.d.ts +3 -0
- package/toast/examples/default-toast/default-toast.component.d.ts +3 -0
- package/toast/examples/toast-positions/toast-positions.component.d.ts +3 -0
- package/toast/src/toast-theme.scss +80 -33
- package/toast/toast/toast-template.component.d.ts +3 -1
- package/toast/toast/toast.component.d.ts +3 -5
- package/tree/interfaces/tree-data.d.ts +15 -0
- package/tree/interfaces/tree-render-mode.d.ts +2 -2
- package/tree/src/tree-theme.scss +39 -13
- package/tree/tree/tree-notifier.service.d.ts +3 -3
- package/tree/tree/tree.component.d.ts +13 -3
- package/tree/tree-item/tree-item.directive.d.ts +6 -0
- package/youtube-player/youtube-player.component.d.ts +3 -0
- package/core/prefix-suffix/prefixable/prefixable-interface.d.ts +0 -7
- package/core/prefix-suffix/prefixable/prefixable.d.ts +0 -11
- package/core/prefix-suffix/suffixable/suffixable-interface.d.ts +0 -7
- package/core/prefix-suffix/suffixable/suffixable.d.ts +0 -11
- package/input/examples/basic-input/basic-input.component.d.ts +0 -5
package/hero/src/hero-theme.scss
CHANGED
@@ -16,22 +16,39 @@
|
|
16
16
|
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
|
17
17
|
$white: core.daff-map-get($theme, 'core', 'white');
|
18
18
|
$black: core.daff-map-get($theme, 'core', 'black');
|
19
|
+
$type: core.daff-map-get($theme, 'core', 'type');
|
19
20
|
|
20
21
|
.daff-hero {
|
21
|
-
@include
|
22
|
-
theming.daff-
|
23
|
-
);
|
22
|
+
@include theming.light($type) {
|
23
|
+
@include daff-hero-theme-variant(theming.daff-color($neutral, 10));
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
&.daff-primary {
|
26
|
+
@include daff-hero-theme-variant(theming.daff-color($primary));
|
27
|
+
}
|
28
|
+
|
29
|
+
&.daff-secondary {
|
30
|
+
@include daff-hero-theme-variant(theming.daff-color($secondary));
|
31
|
+
}
|
28
32
|
|
29
|
-
|
30
|
-
|
33
|
+
&.daff-tertiary {
|
34
|
+
@include daff-hero-theme-variant(theming.daff-color($tertiary));
|
35
|
+
}
|
31
36
|
}
|
32
37
|
|
33
|
-
|
34
|
-
@include daff-hero-theme-variant(theming.daff-color($
|
38
|
+
@include theming.dark($type) {
|
39
|
+
@include daff-hero-theme-variant(theming.daff-color($neutral, 90));
|
40
|
+
|
41
|
+
&.daff-primary {
|
42
|
+
@include daff-hero-theme-variant(theming.daff-color($primary, 60));
|
43
|
+
}
|
44
|
+
|
45
|
+
&.daff-secondary {
|
46
|
+
@include daff-hero-theme-variant(theming.daff-color($secondary, 60));
|
47
|
+
}
|
48
|
+
|
49
|
+
&.daff-tertiary {
|
50
|
+
@include daff-hero-theme-variant(theming.daff-color($tertiary, 60));
|
51
|
+
}
|
35
52
|
}
|
36
53
|
|
37
54
|
&.daff-theme {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const INPUT_EXAMPLES: (typeof
|
1
|
+
import { InputHintComponent } from './input-hint/input-hint.component';
|
2
|
+
export declare const INPUT_EXAMPLES: (typeof InputHintComponent)[];
|
@@ -1,5 +1,7 @@
|
|
1
|
+
import { UntypedFormControl } from '@angular/forms';
|
1
2
|
import * as i0 from "@angular/core";
|
2
3
|
export declare class InputDisabledComponent {
|
4
|
+
disabled: UntypedFormControl;
|
3
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputDisabledComponent, never>;
|
4
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputDisabledComponent, "input-disabled", never, {}, {}, never, never, true, never>;
|
5
7
|
}
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class InputWithFormFieldComponent {
|
3
|
+
faUser: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
4
|
+
faCircleXmark: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
3
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputWithFormFieldComponent, never>;
|
4
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputWithFormFieldComponent, "input-with-form-field", never, {}, {}, never, never, true, never>;
|
5
7
|
}
|
@@ -22,7 +22,7 @@ export declare class DaffListComponent {
|
|
22
22
|
*
|
23
23
|
* @docs-private
|
24
24
|
*/
|
25
|
-
get role(): "
|
25
|
+
get role(): "navigation" | "list";
|
26
26
|
private _getHostElement;
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffListComponent, never>;
|
28
28
|
static ɵcmp: i0.ɵɵComponentDeclaration<DaffListComponent, "daff-list,daff-nav-list", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.DaffArticleEncapsulatedDirective; inputs: {}; outputs: {}; }]>;
|
package/list/src/list-theme.scss
CHANGED
@@ -7,22 +7,7 @@
|
|
7
7
|
$neutral: core.daff-map-get($theme, 'core', 'neutral');
|
8
8
|
$base: core.daff-map-get($theme, 'core', 'base');
|
9
9
|
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
|
10
|
-
|
11
|
-
.daff-list {
|
12
|
-
.daff-list-item {
|
13
|
-
&__content {
|
14
|
-
// stylelint-disable-next-line scss/selector-nest-combinators
|
15
|
-
*:nth-child(1) {
|
16
|
-
color: $base-contrast;
|
17
|
-
}
|
18
|
-
|
19
|
-
// stylelint-disable-next-line scss/selector-nest-combinators
|
20
|
-
*:nth-child(n + 2) {
|
21
|
-
color: theming.daff-illuminate($base-contrast, $neutral, 3);
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
25
|
-
}
|
10
|
+
$type: core.daff-map-get($theme, 'core', 'type');
|
26
11
|
|
27
12
|
.daff-nav-list {
|
28
13
|
.daff-list-item {
|
@@ -30,10 +15,21 @@
|
|
30
15
|
background-color: $base;
|
31
16
|
}
|
32
17
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
18
|
+
@include theming.light($type) {
|
19
|
+
&:hover,
|
20
|
+
&.active {
|
21
|
+
&::after {
|
22
|
+
background-color: rgba(theming.daff-color($neutral, 20), 0.5);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
@include theming.dark($type) {
|
28
|
+
&:hover,
|
29
|
+
&.active {
|
30
|
+
&::after {
|
31
|
+
background-color: rgba(theming.daff-color($neutral, 20), 0.08);
|
32
|
+
}
|
37
33
|
}
|
38
34
|
}
|
39
35
|
}
|
package/media-gallery/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Media
|
1
|
+
# Media gallery
|
2
2
|
Media gallery is used to display a group of thumbnails in a gallery format.
|
3
3
|
|
4
4
|
## Overview
|
@@ -62,11 +62,11 @@ It should never be used as a standalone component. The first thumbnail is select
|
|
62
62
|
<design-land-example-viewer-container example="basic-media-gallery"></design-land-example-viewer-container>
|
63
63
|
|
64
64
|
## Image aspect ratio
|
65
|
-
It's recommended to utilize the same aspect ratio for all images in the same media gallery. Otherwise, the height and width of the media gallery may change with every different aspect ratio presented by the selected thumbnail as
|
65
|
+
It's recommended to utilize the same aspect ratio for all images in the same media gallery. Otherwise, the height and width of the media gallery may change with every different aspect ratio presented by the selected thumbnail as shown in the example.
|
66
66
|
|
67
67
|
The thumbnail dimension is set to a square, so the recommended aspect ratio is `1:1`. However, it is not required since the thumbnail will horizontally and vertically center align images within a thumbnail.
|
68
68
|
|
69
69
|
<design-land-example-viewer-container example="mismatched-sizes-media-gallery"></design-land-example-viewer-container>
|
70
70
|
|
71
71
|
## Accessibility
|
72
|
-
Accessibility considerations for media gallery is handled by the `DaffImageComponent`. The `alt` attribute must be defined in `<daff-image>`. It specifies an alternate text for an image. An error will appear if it's not defined. This is important because it allows screen readers to describe what's in the image for visually impaired people. See
|
72
|
+
Accessibility considerations for media gallery is handled by the `DaffImageComponent`. The `alt` attribute must be defined in `<daff-image>`. It specifies an alternate text for an image. An error will appear if it's not defined. This is important because it allows screen readers to describe what's in the image for visually impaired people. See [Image](/libs/design/image/README.md) for more information.
|
@@ -5,8 +5,14 @@ import { DaffThumbnailDirective } from '../thumbnail/thumbnail.directive';
|
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
import * as i1 from "@daffodil/design";
|
7
7
|
/**
|
8
|
+
* The `DaffMediaGalleryComonent` is used to display a group of thumbnails in a gallery format.
|
9
|
+
*
|
8
10
|
* ```html
|
9
|
-
* <daff-media-gallery
|
11
|
+
* <daff-media-gallery>
|
12
|
+
* <ng-template daffThumbnail thumbnailSrc="/thumbnail-path.jpg" label="Your description">
|
13
|
+
* <daff-image src="/image-path.jpg" alt="Your description" width="100" height="100"></daff-image>
|
14
|
+
* </ng-template>
|
15
|
+
* </daff-media-gallery>
|
10
16
|
* ```
|
11
17
|
*/
|
12
18
|
export declare class DaffMediaGalleryComponent implements DaffMediaGalleryRegistration {
|
@@ -16,11 +22,11 @@ export declare class DaffMediaGalleryComponent implements DaffMediaGalleryRegist
|
|
16
22
|
*/
|
17
23
|
role: string;
|
18
24
|
/**
|
19
|
-
* The internal
|
25
|
+
* The internal ID of the gallery.
|
20
26
|
*/
|
21
27
|
private _id;
|
22
28
|
/**
|
23
|
-
*
|
29
|
+
* Custom ID for the media gallery that overrides the auto-generated one. When using this input, it is your responsibility to ensure that the ID is unique.
|
24
30
|
*/
|
25
31
|
get id(): string | undefined | null;
|
26
32
|
set id(val: string | undefined | null);
|
@@ -59,23 +65,33 @@ export declare class DaffMediaGalleryComponent implements DaffMediaGalleryRegist
|
|
59
65
|
private _selectedIndex;
|
60
66
|
private focusSelected;
|
61
67
|
/**
|
62
|
-
* Select a specific entry in the media gallery by its index
|
68
|
+
* Select a specific entry in the media gallery by its index.
|
69
|
+
*
|
70
|
+
* @param index The index to set, starting at 0.
|
63
71
|
*/
|
64
72
|
selectIndex(index: number): void;
|
65
73
|
/**
|
66
74
|
* Navigate to the next element in the list of thumbnails.
|
75
|
+
*
|
76
|
+
* @param focus Whether to move focus to the newly selected item.
|
67
77
|
*/
|
68
78
|
next(focus?: boolean): void;
|
69
79
|
/**
|
70
80
|
* Navigate to the previous element in the list of thumbnails.
|
81
|
+
*
|
82
|
+
* @param focus Whether to move focus to the newly selected item.
|
71
83
|
*/
|
72
84
|
previous(focus?: boolean): void;
|
73
85
|
/**
|
74
|
-
* Select the first element
|
86
|
+
* Select the first element.
|
87
|
+
*
|
88
|
+
* @param focus Whether to move focus to the newly selected item.
|
75
89
|
*/
|
76
90
|
selectFirst(focus?: boolean): void;
|
77
91
|
/**
|
78
92
|
* Select the last element of the gallery.
|
93
|
+
*
|
94
|
+
* @param Whether to move focus to the newly selected item.
|
79
95
|
*/
|
80
96
|
selectLast(focus?: boolean): void;
|
81
97
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMediaGalleryComponent, never>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export
|
2
|
-
export
|
3
|
-
export
|
1
|
+
export { DaffMediaGalleryComponent } from './media-gallery/media-gallery.component';
|
2
|
+
export { DaffMediaGalleryModule } from './media-gallery.module';
|
3
|
+
export { DaffThumbnailDirective } from './thumbnail/thumbnail.directive';
|
4
4
|
export { DAFF_MEDIA_GALLERY_COMPONENTS } from './media-gallery';
|
@@ -2,36 +2,53 @@ import { TemplateRef, OnInit } from '@angular/core';
|
|
2
2
|
import { DaffMediaGalleryRegistration } from '../helpers/media-gallery-registration.interface';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
/**
|
5
|
-
*
|
5
|
+
* DaffThumbnailDirective is a structural directive used to mark elements as thumbnails within the `DaffMediaGalleryComponent`.
|
6
6
|
*
|
7
7
|
* ```html
|
8
8
|
* <ng-template daffThumbnail></ng-template>
|
9
9
|
* ```
|
10
10
|
*/
|
11
11
|
export declare class DaffThumbnailDirective implements OnInit {
|
12
|
+
/**
|
13
|
+
* @docs-private
|
14
|
+
*/
|
12
15
|
gallery: DaffMediaGalleryRegistration;
|
16
|
+
/**
|
17
|
+
* @docs-private
|
18
|
+
*/
|
13
19
|
templateRef: TemplateRef<unknown>;
|
20
|
+
private _increment;
|
14
21
|
/**
|
15
|
-
*
|
22
|
+
* @docs-private
|
23
|
+
*
|
24
|
+
* The autogenerated unique id for a thumbnail.
|
16
25
|
*/
|
17
26
|
get id(): string;
|
18
27
|
/**
|
19
|
-
*
|
28
|
+
* @docs-private
|
29
|
+
*
|
30
|
+
* The unique id of the selected thumbnail.
|
20
31
|
*/
|
21
|
-
get
|
32
|
+
get selectedThumbnailId(): string;
|
22
33
|
/**
|
23
34
|
* The file path to a thumbnail, presumably an image.
|
24
35
|
*/
|
25
36
|
thumbnailSrc: any;
|
26
37
|
/**
|
27
|
-
*
|
38
|
+
* Provides an accessible label for a thumbnail.
|
28
39
|
*/
|
29
40
|
label: string;
|
41
|
+
/** Indicates whether the thumbnail represents a video. */
|
30
42
|
isVideo: boolean;
|
43
|
+
constructor(
|
44
|
+
/**
|
45
|
+
* @docs-private
|
46
|
+
*/
|
47
|
+
gallery: DaffMediaGalleryRegistration,
|
31
48
|
/**
|
32
49
|
* @docs-private
|
33
50
|
*/
|
34
|
-
|
51
|
+
templateRef: TemplateRef<unknown>);
|
35
52
|
/**
|
36
53
|
* @docs-private
|
37
54
|
*/
|
@@ -7,12 +7,27 @@ export declare class DaffMenuComponent implements AfterContentInit, AfterViewIni
|
|
7
7
|
private _ngZone;
|
8
8
|
private _elementRef;
|
9
9
|
private menuService;
|
10
|
+
/**
|
11
|
+
* @docs-private
|
12
|
+
*/
|
10
13
|
class: boolean;
|
14
|
+
/**
|
15
|
+
* @docs-private
|
16
|
+
*/
|
11
17
|
tabindex: number;
|
18
|
+
/**
|
19
|
+
* @docs-private
|
20
|
+
*/
|
12
21
|
role: string;
|
13
22
|
private _focusTrap;
|
14
23
|
constructor(_focusTrapFactory: ConfigurableFocusTrapFactory, _ngZone: NgZone, _elementRef: ElementRef<HTMLElement>, menuService: DaffMenuService);
|
24
|
+
/**
|
25
|
+
* @docs-private
|
26
|
+
*/
|
15
27
|
ngAfterContentInit(): void;
|
28
|
+
/**
|
29
|
+
* @docs-private
|
30
|
+
*/
|
16
31
|
ngAfterViewInit(): void;
|
17
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMenuComponent, never>;
|
18
33
|
static ɵcmp: i0.ɵɵComponentDeclaration<DaffMenuComponent, "daff-menu", never, {}, {}, never, ["[daff-menu-item]"], true, never>;
|
@@ -7,6 +7,9 @@ export declare class DaffMenuActivatorDirective implements OnDestroy {
|
|
7
7
|
private cdRef;
|
8
8
|
private _destroyed$;
|
9
9
|
private _open;
|
10
|
+
/**
|
11
|
+
* @docs-private
|
12
|
+
*/
|
10
13
|
get openClass(): boolean;
|
11
14
|
daffMenuActivator: Type<unknown> | TemplateRef<unknown>;
|
12
15
|
constructor(service: DaffMenuService, viewContainerRef: ViewContainerRef, cdRef: ChangeDetectorRef);
|
package/menu/src/menu-theme.scss
CHANGED
@@ -2,24 +2,43 @@
|
|
2
2
|
@use '../../scss/theming';
|
3
3
|
|
4
4
|
@mixin daff-menu-theme($theme) {
|
5
|
-
$white: core.daff-map-get($theme, 'core', 'white');
|
6
5
|
$black: core.daff-map-get($theme, 'core', 'black');
|
7
6
|
$neutral: core.daff-map-get($theme, 'core', 'neutral');
|
8
7
|
$base: core.daff-map-get($theme, 'core', 'base');
|
9
8
|
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
|
9
|
+
$type: core.daff-map-get($theme, 'core', 'type');
|
10
10
|
|
11
|
-
.
|
12
|
-
|
13
|
-
|
11
|
+
@include theming.light($type) {
|
12
|
+
.daff-menu {
|
13
|
+
background: $base;
|
14
|
+
box-shadow: 0 0 24px rgb($black, 0.12);
|
15
|
+
}
|
16
|
+
|
17
|
+
.daff-menu-item {
|
18
|
+
background: $base;
|
19
|
+
color: $base-contrast;
|
20
|
+
|
21
|
+
&:hover,
|
22
|
+
&:focus {
|
23
|
+
background: rgba(theming.daff-color($neutral, 20), 0.5);
|
24
|
+
}
|
25
|
+
}
|
14
26
|
}
|
15
27
|
|
16
|
-
.
|
17
|
-
|
18
|
-
|
28
|
+
@include theming.dark($type) {
|
29
|
+
.daff-menu {
|
30
|
+
background: $base;
|
31
|
+
box-shadow: 0 0 24px rgb($black, 0.12);
|
32
|
+
}
|
33
|
+
|
34
|
+
.daff-menu-item {
|
35
|
+
background: $base;
|
36
|
+
color: $base-contrast;
|
19
37
|
|
20
|
-
|
21
|
-
|
22
|
-
|
38
|
+
&:hover,
|
39
|
+
&:focus {
|
40
|
+
background: rgba(theming.daff-color($neutral, 20), 0.08);
|
41
|
+
}
|
23
42
|
}
|
24
43
|
}
|
25
44
|
}
|
@@ -14,14 +14,23 @@ export declare class DaffModalComponent implements AfterContentInit, AfterViewIn
|
|
14
14
|
/**
|
15
15
|
* Sets a class of .daff-modal to the host element.
|
16
16
|
*/
|
17
|
+
/**
|
18
|
+
* @docs-private
|
19
|
+
*/
|
17
20
|
modalClass: boolean;
|
18
21
|
/**
|
19
22
|
* Sets the role to dialog.
|
20
23
|
*/
|
24
|
+
/**
|
25
|
+
* @docs-private
|
26
|
+
*/
|
21
27
|
role: string;
|
22
28
|
/**
|
23
29
|
* Sets aria-modal to true.
|
24
30
|
*/
|
31
|
+
/**
|
32
|
+
* @docs-private
|
33
|
+
*/
|
25
34
|
ariaModal: boolean;
|
26
35
|
private _ariaLabelledBy;
|
27
36
|
/**
|
@@ -29,6 +38,9 @@ export declare class DaffModalComponent implements AfterContentInit, AfterViewIn
|
|
29
38
|
* {@link DaffModalTitleDirective} when it is used.
|
30
39
|
*
|
31
40
|
*/
|
41
|
+
/**
|
42
|
+
* @docs-private
|
43
|
+
*/
|
32
44
|
get ariaLabelledBy(): string;
|
33
45
|
set ariaLabelledBy(value: string);
|
34
46
|
/**
|
@@ -49,13 +61,22 @@ export declare class DaffModalComponent implements AfterContentInit, AfterViewIn
|
|
49
61
|
onEscape(): void;
|
50
62
|
private _focusTrap;
|
51
63
|
constructor(modalService: DaffModalService, _focusTrapFactory: ConfigurableFocusTrapFactory, elementRef: ElementRef<HTMLElement>, openDirective: DaffOpenableDirective);
|
64
|
+
/**
|
65
|
+
* @docs-private
|
66
|
+
*/
|
52
67
|
ngAfterContentInit(): void;
|
68
|
+
/**
|
69
|
+
* @docs-private
|
70
|
+
*/
|
53
71
|
ngAfterViewInit(): void;
|
54
72
|
/**
|
55
73
|
* Helper method to attach portable content to modal.
|
56
74
|
*/
|
57
75
|
attachContent(portal: ComponentPortal<any>): any;
|
58
76
|
/** Animation hook that controls the entrance and exit animations of the modal. */
|
77
|
+
/**
|
78
|
+
* @docs-private
|
79
|
+
*/
|
59
80
|
get fadeState(): string;
|
60
81
|
/**
|
61
82
|
* Animation event that can used to hook into when
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class DaffModalActionsComponent {
|
3
|
+
/**
|
4
|
+
* @docs-private
|
5
|
+
*/
|
3
6
|
class: boolean;
|
4
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffModalActionsComponent, never>;
|
5
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<DaffModalActionsComponent, "daff-modal-actions", never, {}, {}, never, ["*"], true, never>;
|
@@ -18,6 +18,9 @@ export declare class DaffModalCloseDirective {
|
|
18
18
|
/**
|
19
19
|
* Sets the button type attribute to button.
|
20
20
|
*/
|
21
|
+
/**
|
22
|
+
* @docs-private
|
23
|
+
*/
|
21
24
|
typeAttribute: string;
|
22
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffModalCloseDirective, [null, { optional: true; }]>;
|
23
26
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DaffModalCloseDirective, "button[daffModalClose]", never, {}, {}, never, never, true, never>;
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class DaffModalContentComponent {
|
3
|
+
/**
|
4
|
+
* @docs-private
|
5
|
+
*/
|
3
6
|
class: boolean;
|
4
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffModalContentComponent, never>;
|
5
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<DaffModalContentComponent, "daff-modal-content", never, {}, {}, never, ["*"], true, never>;
|
@@ -13,6 +13,9 @@ export declare class DaffModalTitleDirective {
|
|
13
13
|
/**
|
14
14
|
* The html `id` of the modal title.
|
15
15
|
*/
|
16
|
+
/**
|
17
|
+
* @docs-private
|
18
|
+
*/
|
16
19
|
get uniqueId(): string;
|
17
20
|
constructor(modal: DaffModalComponent);
|
18
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffModalTitleDirective, [{ optional: true; }]>;
|
@@ -16,11 +16,16 @@
|
|
16
16
|
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
|
17
17
|
$white: core.daff-map-get($theme, 'core', 'white');
|
18
18
|
$black: core.daff-map-get($theme, 'core', 'black');
|
19
|
+
$type: core.daff-map-get($theme, 'core', 'type');
|
19
20
|
|
20
21
|
.daff-navbar {
|
21
|
-
@include
|
22
|
-
theming.daff-
|
23
|
-
|
22
|
+
@include theming.light($type) {
|
23
|
+
@include daff-navbar-theme-variant(theming.daff-color($neutral, 10));
|
24
|
+
}
|
25
|
+
|
26
|
+
@include theming.dark($type) {
|
27
|
+
@include daff-navbar-theme-variant(theming.daff-color($neutral, 90));
|
28
|
+
}
|
24
29
|
|
25
30
|
&--raised {
|
26
31
|
box-shadow: 0 4px 10px rgba($black, 0.08);
|
package/notification/README.md
CHANGED
@@ -52,27 +52,24 @@ export class CustomComponentModule { }
|
|
52
52
|
## Supported Content Types
|
53
53
|
|
54
54
|
### Icon
|
55
|
-
An icon can be used to
|
55
|
+
An icon can be used to provide users with a quick visual cue about the purpose of a notification. Place the icon before the title and subtitle using the `[daffPrefix]` selector.
|
56
56
|
|
57
57
|
### Title
|
58
|
-
|
58
|
+
The title provides a quick overview of what the notification's content. Add it using the `[daffNotificationTitle]` selector.
|
59
59
|
|
60
60
|
### Subtitle
|
61
|
-
|
61
|
+
The subtitle provides additional details about the notification. It should be limited to one or two sentences. Add it using the `[daffNotificationSubtitle]` selector.
|
62
62
|
|
63
63
|
### Actions
|
64
|
-
Buttons can be included in notifications to
|
64
|
+
Buttons can be included in notifications to dismiss them or navigate them to a page with more information. Use the `[daffNotificationActions]` selector to include these actions.
|
65
65
|
|
66
66
|
<design-land-example-viewer-container example="notification-with-actions"></design-land-example-viewer-container>
|
67
67
|
|
68
68
|
## Properties
|
69
69
|
|
70
|
-
###
|
71
|
-
The status
|
70
|
+
### Status
|
71
|
+
The status property is used to visually distinguish between different notification types. Use the `status` property to set the status.
|
72
72
|
|
73
|
-
Supported statuses: `warn | critical | success`
|
74
|
-
|
75
|
-
#### Notification with statuses
|
76
73
|
<design-land-example-viewer-container example="notification-status"></design-land-example-viewer-container>
|
77
74
|
|
78
75
|
### Orientation
|
@@ -81,11 +78,13 @@ Orientation dictates how a notification's content is stacked — `vertical` or `
|
|
81
78
|
<design-land-example-viewer-container example="notification-orientations"></design-land-example-viewer-container>
|
82
79
|
|
83
80
|
### Dismissing a notification
|
84
|
-
|
81
|
+
By default, notifications are not dismissible and remain visible until the user takes an action to resolve them.
|
85
82
|
|
86
|
-
|
83
|
+
To show a close button, set the `dismissible` property to `true`. Avoid making critical notifications dismissible to ensure users can read or interact with the necessary information.
|
87
84
|
|
88
85
|
<design-land-example-viewer-container example="dismissible-notification"></design-land-example-viewer-container>
|
89
86
|
|
90
87
|
## Accessibility
|
91
|
-
Notifications with a `critical` or `warn` status have a `role="alert"` so that it can be announced by assistive technologies. See [live region roles](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#4._live_region_roles) for more information. All other notifications have a `role="status"`.
|
88
|
+
Notifications with a `critical` or `warn` status have a `role="alert"` so that it can be announced by assistive technologies. See [live region roles](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#4._live_region_roles) for more information. All other notifications have a `role="status"`.
|
89
|
+
|
90
|
+
Notifications have a `tabindex="0"` so users can discover them while tabbing through a page.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
2
|
-
import {
|
2
|
+
import { DaffPrefixDirective, DaffStatusableDirective } from '@daffodil/design';
|
3
3
|
import { DaffNotificationActionsDirective } from '../notification-actions/notification-actions.directive';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
import * as i1 from "@daffodil/design";
|
@@ -8,19 +8,34 @@ export type DaffNotificationOrientation = 'horizontal' | 'vertical';
|
|
8
8
|
* DaffNotificationComponent provides a way to display and communicate
|
9
9
|
* information related to user actions within a page's content.
|
10
10
|
*/
|
11
|
-
export declare class DaffNotificationComponent
|
11
|
+
export declare class DaffNotificationComponent {
|
12
12
|
private statusDirective;
|
13
13
|
faTimes: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
14
14
|
_prefix: DaffPrefixDirective;
|
15
15
|
_actions: DaffNotificationActionsDirective;
|
16
|
+
/**
|
17
|
+
* @docs-private
|
18
|
+
*/
|
16
19
|
class: boolean;
|
20
|
+
/**
|
21
|
+
* @docs-private
|
22
|
+
*/
|
17
23
|
tabindex: string;
|
18
24
|
/**
|
19
25
|
* Sets role to alert when `status="warn"` or `status="critical"`.
|
20
26
|
* Sets role to status on all other instances.
|
21
27
|
*/
|
28
|
+
/**
|
29
|
+
* @docs-private
|
30
|
+
*/
|
22
31
|
get role(): "status" | "alert";
|
32
|
+
/**
|
33
|
+
* @docs-private
|
34
|
+
*/
|
23
35
|
get verticalOrientation(): boolean;
|
36
|
+
/**
|
37
|
+
* @docs-private
|
38
|
+
*/
|
24
39
|
get horizontalOrientation(): boolean;
|
25
40
|
/** Whether or not a notification is closable */
|
26
41
|
dismissible: boolean;
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class DaffNotificationActionsDirective {
|
3
|
+
/**
|
4
|
+
* @docs-private
|
5
|
+
*/
|
3
6
|
class: boolean;
|
4
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffNotificationActionsDirective, never>;
|
5
8
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DaffNotificationActionsDirective, "[daffNotificationActions]", never, {}, {}, never, never, true, never>;
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class DaffNotificationMessageDirective {
|
3
|
+
/**
|
4
|
+
* @docs-private
|
5
|
+
*/
|
3
6
|
class: boolean;
|
4
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffNotificationMessageDirective, never>;
|
5
8
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DaffNotificationMessageDirective, "[daffNotificationMessage]", never, {}, {}, never, never, true, never>;
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class DaffNotificationSubtitleDirective {
|
3
|
+
/**
|
4
|
+
* @docs-private
|
5
|
+
*/
|
3
6
|
class: boolean;
|
4
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffNotificationSubtitleDirective, never>;
|
5
8
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DaffNotificationSubtitleDirective, "[daffNotificationSubtitle]", never, {}, {}, never, never, true, never>;
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
export declare class DaffNotificationTitleDirective {
|
3
|
+
/**
|
4
|
+
* @docs-private
|
5
|
+
*/
|
3
6
|
class: boolean;
|
4
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffNotificationTitleDirective, never>;
|
5
8
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DaffNotificationTitleDirective, "[daffNotificationTitle]", never, {}, {}, never, never, true, never>;
|