@daffodil/design 0.68.0 → 0.69.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/esm2022/article/article/article.component.mjs +2 -2
- package/esm2022/article/examples/article-headings/article-headings.component.mjs +3 -4
- package/esm2022/loading-icon/examples/loading-icon-color/loading-icon-color.component.mjs +3 -3
- package/esm2022/loading-icon/loading-icon/loading-icon.component.mjs +3 -3
- package/esm2022/modal/service/modal.service.mjs +2 -3
- package/esm2022/public_api.mjs +1 -2
- package/esm2022/sidebar/public_api.mjs +2 -1
- package/esm2022/sidebar/sidebar-viewport/sidebar-viewport.component.mjs +12 -4
- package/esm2022/sidebar/sidebar-viewport-backdrop/animation/backdrop-animation-state.mjs +2 -0
- package/esm2022/sidebar/sidebar-viewport-backdrop/animation/backdrop-animation.mjs +20 -0
- package/esm2022/sidebar/sidebar-viewport-backdrop/sidebar-viewport-backdrop.component.mjs +91 -0
- package/esm2022/sidebar/sidebar.module.mjs +10 -9
- package/esm2022/toast/daffodil-design-toast.mjs +5 -0
- package/esm2022/toast/examples/daffodil-design-toast-examples.mjs +5 -0
- package/esm2022/toast/examples/default-toast/default-toast.component.mjs +38 -0
- package/esm2022/toast/examples/default-toast/default-toast.module.mjs +36 -0
- package/esm2022/toast/examples/index.mjs +2 -0
- package/esm2022/toast/examples/public_api.mjs +15 -0
- package/esm2022/toast/examples/toast-positions/toast-positions.component.mjs +42 -0
- package/esm2022/toast/examples/toast-positions/toast-positions.module.mjs +57 -0
- package/esm2022/toast/examples/toast-status/toast-status.component.mjs +45 -0
- package/esm2022/toast/examples/toast-status/toast-status.module.mjs +40 -0
- package/esm2022/toast/examples/toast-with-custom-duration/toast-with-custom-duration.component.mjs +26 -0
- package/esm2022/toast/examples/toast-with-custom-duration/toast-with-custom-duration.module.mjs +32 -0
- package/esm2022/toast/index.mjs +2 -0
- package/esm2022/toast/interfaces/toast-action.mjs +2 -0
- package/esm2022/toast/interfaces/toast.mjs +2 -0
- package/esm2022/toast/options/daff-toast-options.mjs +16 -0
- package/esm2022/toast/public_api.mjs +9 -0
- package/esm2022/toast/service/changes-focus.mjs +2 -0
- package/esm2022/toast/service/position-strategy.mjs +29 -0
- package/esm2022/toast/service/position.service.mjs +33 -0
- package/esm2022/toast/service/toast.service.mjs +116 -0
- package/esm2022/toast/toast/toast-config.mjs +2 -0
- package/esm2022/toast/toast/toast-template.component.mjs +262 -0
- package/esm2022/toast/toast/toast.component.mjs +82 -0
- package/esm2022/toast/toast-actions/toast-actions.directive.mjs +19 -0
- package/esm2022/toast/toast-message/toast-message.directive.mjs +19 -0
- package/esm2022/toast/toast-title/toast-title.directive.mjs +19 -0
- package/esm2022/toast/toast.module.mjs +70 -0
- package/esm2022/tree/examples/basic-tree/basic-tree.component.mjs +1 -1
- package/esm2022/tree/interfaces/tree-render-mode.mjs +2 -0
- package/esm2022/tree/public_api.mjs +2 -1
- package/esm2022/tree/tree/tree.component.mjs +43 -36
- package/esm2022/tree/utils/flatten-tree.mjs +26 -14
- package/esm2022/tree/utils/transform.mjs +25 -0
- package/fesm2022/daffodil-design-article-examples.mjs +2 -2
- package/fesm2022/daffodil-design-article-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +2 -2
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon-examples.mjs +2 -2
- package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +2 -2
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +1 -2
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +131 -14
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast-examples.mjs +287 -0
- package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -0
- package/fesm2022/daffodil-design-toast.mjs +625 -0
- package/fesm2022/daffodil-design-toast.mjs.map +1 -0
- package/fesm2022/daffodil-design-tree-examples.mjs +1 -1
- package/fesm2022/daffodil-design-tree-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +92 -48
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +1 -125
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/loading-icon/src/loading-icon-theme.scss +24 -8
- package/navbar/README.md +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +0 -1
- package/scss/theme.scss +2 -0
- package/sidebar/public_api.d.ts +1 -0
- package/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +3 -2
- package/sidebar/sidebar-viewport-backdrop/animation/backdrop-animation-state.d.ts +2 -0
- package/{molecules/backdrop → sidebar/sidebar-viewport-backdrop}/animation/backdrop-animation.d.ts +1 -1
- package/{molecules/backdrop/backdrop/backdrop.component.d.ts → sidebar/sidebar-viewport-backdrop/sidebar-viewport-backdrop.component.d.ts} +5 -5
- package/sidebar/sidebar.module.d.ts +4 -4
- package/toast/README.md +115 -0
- package/toast/examples/default-toast/default-toast.component.d.ts +15 -0
- package/toast/examples/default-toast/default-toast.module.d.ts +11 -0
- package/toast/examples/index.d.ts +1 -0
- package/toast/examples/public_api.d.ts +2 -0
- package/toast/examples/toast-positions/toast-positions.component.d.ts +17 -0
- package/toast/examples/toast-positions/toast-positions.module.d.ts +12 -0
- package/toast/examples/toast-status/toast-status.component.d.ts +14 -0
- package/toast/examples/toast-status/toast-status.module.d.ts +12 -0
- package/toast/examples/toast-with-custom-duration/toast-with-custom-duration.component.d.ts +10 -0
- package/toast/examples/toast-with-custom-duration/toast-with-custom-duration.module.d.ts +10 -0
- package/toast/index.d.ts +1 -0
- package/toast/interfaces/toast-action.d.ts +38 -0
- package/toast/interfaces/toast.d.ts +20 -0
- package/toast/options/daff-toast-options.d.ts +15 -0
- package/toast/public_api.d.ts +11 -0
- package/toast/service/changes-focus.d.ts +2 -0
- package/toast/service/position-strategy.d.ts +3 -0
- package/toast/service/position.service.d.ts +15 -0
- package/toast/service/toast.service.d.ts +29 -0
- package/toast/src/toast-theme.scss +63 -0
- package/toast/toast/toast-config.d.ts +7 -0
- package/toast/toast/toast-template.component.d.ts +20 -0
- package/toast/toast/toast.component.d.ts +52 -0
- package/toast/toast-actions/toast-actions.directive.d.ts +6 -0
- package/toast/toast-message/toast-message.directive.d.ts +6 -0
- package/toast/toast-title/toast-title.directive.d.ts +6 -0
- package/toast/toast.module.d.ts +17 -0
- package/tree/README.md +1 -3
- package/tree/interfaces/tree-render-mode.d.ts +6 -0
- package/tree/public_api.d.ts +2 -0
- package/tree/tree/tree.component.d.ts +33 -11
- package/tree/utils/flatten-tree.d.ts +2 -1
- package/tree/utils/transform.d.ts +13 -0
- package/esm2022/molecules/backdrop/animation/backdrop-animation-state.mjs +0 -2
- package/esm2022/molecules/backdrop/animation/backdrop-animation.mjs +0 -20
- package/esm2022/molecules/backdrop/backdrop/backdrop.component.mjs +0 -87
- package/esm2022/molecules/backdrop/backdrop.module.mjs +0 -24
- package/esm2022/molecules/backdrop/public_api.mjs +0 -3
- package/molecules/backdrop/animation/backdrop-animation-state.d.ts +0 -2
- package/molecules/backdrop/backdrop.module.d.ts +0 -8
- package/molecules/backdrop/public_api.d.ts +0 -2
@@ -12,48 +12,64 @@
|
|
12
12
|
$black: core.daff-map-deep-get($theme, 'core.black');
|
13
13
|
|
14
14
|
.daff-loading-icon {
|
15
|
-
|
15
|
+
&__loader {
|
16
16
|
stroke: currentColor;
|
17
17
|
}
|
18
18
|
|
19
|
+
&__bg {
|
20
|
+
stroke: rgba($black, 0.08);
|
21
|
+
}
|
22
|
+
|
19
23
|
&.daff-primary {
|
20
|
-
|
24
|
+
.daff-loading-icon__loader {
|
21
25
|
stroke: theming.daff-color($primary);
|
22
26
|
}
|
27
|
+
|
28
|
+
.daff-loading-icon__bg {
|
29
|
+
stroke: rgba(theming.daff-color($primary), 0.08);
|
30
|
+
}
|
23
31
|
}
|
24
32
|
|
25
33
|
&.daff-secondary {
|
26
|
-
|
34
|
+
.daff-loading-icon__loader {
|
27
35
|
stroke: theming.daff-color($secondary);
|
28
36
|
}
|
37
|
+
|
38
|
+
.daff-loading-icon__bg {
|
39
|
+
stroke: rgba(theming.daff-color($secondary), 0.08);
|
40
|
+
}
|
29
41
|
}
|
30
42
|
|
31
43
|
&.daff-tertiary {
|
32
|
-
|
44
|
+
.daff-loading-icon__loader {
|
33
45
|
stroke: theming.daff-color($tertiary);
|
34
46
|
}
|
47
|
+
|
48
|
+
.daff-loading-icon__bg {
|
49
|
+
stroke: rgba(theming.daff-color($tertiary), 0.08);
|
50
|
+
}
|
35
51
|
}
|
36
52
|
|
37
53
|
&.daff-theme {
|
38
|
-
|
54
|
+
.daff-loading-icon__loader {
|
39
55
|
stroke: $base;
|
40
56
|
}
|
41
57
|
}
|
42
58
|
|
43
59
|
&.daff-theme-contrast {
|
44
|
-
|
60
|
+
.daff-loading-icon__loader {
|
45
61
|
stroke: $base-contrast;
|
46
62
|
}
|
47
63
|
}
|
48
64
|
|
49
65
|
&.daff-black {
|
50
|
-
|
66
|
+
.daff-loading-icon__loader {
|
51
67
|
stroke: $black;
|
52
68
|
}
|
53
69
|
}
|
54
70
|
|
55
71
|
&.daff-white {
|
56
|
-
|
72
|
+
.daff-loading-icon__loader {
|
57
73
|
stroke: $white;
|
58
74
|
}
|
59
75
|
}
|
package/navbar/README.md
CHANGED
@@ -15,7 +15,7 @@ Supported colors: `primary | secondary | tertiary | black | white | theme | them
|
|
15
15
|
<design-land-example-viewer-container example="navbar-theming"></design-land-example-viewer-container>
|
16
16
|
|
17
17
|
## Contained Navbar
|
18
|
-
A navbar can be contained to a specific width by using
|
18
|
+
A navbar can be contained to a specific width by using the [Container](/libs/design/src/atoms/container/README.md) component. The layout styles set on the navbar will automatically be passed down to the container.
|
19
19
|
|
20
20
|
<design-land-example-viewer-container example="contained-navbar"></design-land-example-viewer-container>
|
21
21
|
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@daffodil/design","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/design"]}}},"version":"0.68.0","author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","description":"A consistent, sane api driver that works with different ecommerce systems.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"peerDependencies":{"@angular/animations":"^17.0.0","@angular/common":"^17.0.0","@angular/core":"^17.0.0","@angular/forms":"^17.0.0","@angular/cdk":"^17.0.0","@daffodil/core":"0.68.0","@fortawesome/angular-fontawesome":"^0.14.1","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","modern-normalize":"^0.5.0","rxjs":"7.8.1"},"optionalDependencies":{"@faker-js/faker":"^7.6.0"},"exports":{"./scss/daff-global":{"sass":"./scss/daff-global.scss"},"./scss/global":{"sass":"./scss/global.scss"},"./scss/theme":{"sass":"./scss/theme.scss"},"./scss/daff-util":{"sass":"./scss/daff-util.scss"},"./scss/utilities":{"sass":"./scss/utilities.scss"},"./scss/daff-typography":{"sass":"./scss/daff-typography.scss"},"./scss/typography/classes":{"sass":"./scss/typography/_classes.scss"},"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/daffodil-design.mjs","esm":"./esm2022/daffodil-design.mjs","default":"./fesm2022/daffodil-design.mjs"},"./accordion":{"types":"./accordion/index.d.ts","esm2022":"./esm2022/accordion/daffodil-design-accordion.mjs","esm":"./esm2022/accordion/daffodil-design-accordion.mjs","default":"./fesm2022/daffodil-design-accordion.mjs"},"./article":{"types":"./article/index.d.ts","esm2022":"./esm2022/article/daffodil-design-article.mjs","esm":"./esm2022/article/daffodil-design-article.mjs","default":"./fesm2022/daffodil-design-article.mjs"},"./button":{"types":"./button/index.d.ts","esm2022":"./esm2022/button/daffodil-design-button.mjs","esm":"./esm2022/button/daffodil-design-button.mjs","default":"./fesm2022/daffodil-design-button.mjs"},"./callout":{"types":"./callout/index.d.ts","esm2022":"./esm2022/callout/daffodil-design-callout.mjs","esm":"./esm2022/callout/daffodil-design-callout.mjs","default":"./fesm2022/daffodil-design-callout.mjs"},"./card":{"types":"./card/index.d.ts","esm2022":"./esm2022/card/daffodil-design-card.mjs","esm":"./esm2022/card/daffodil-design-card.mjs","default":"./fesm2022/daffodil-design-card.mjs"},"./container":{"types":"./container/index.d.ts","esm2022":"./esm2022/container/daffodil-design-container.mjs","esm":"./esm2022/container/daffodil-design-container.mjs","default":"./fesm2022/daffodil-design-container.mjs"},"./hero":{"types":"./hero/index.d.ts","esm2022":"./esm2022/hero/daffodil-design-hero.mjs","esm":"./esm2022/hero/daffodil-design-hero.mjs","default":"./fesm2022/daffodil-design-hero.mjs"},"./image":{"types":"./image/index.d.ts","esm2022":"./esm2022/image/daffodil-design-image.mjs","esm":"./esm2022/image/daffodil-design-image.mjs","default":"./fesm2022/daffodil-design-image.mjs"},"./link-set":{"types":"./link-set/index.d.ts","esm2022":"./esm2022/link-set/daffodil-design-link-set.mjs","esm":"./esm2022/link-set/daffodil-design-link-set.mjs","default":"./fesm2022/daffodil-design-link-set.mjs"},"./list":{"types":"./list/index.d.ts","esm2022":"./esm2022/list/daffodil-design-list.mjs","esm":"./esm2022/list/daffodil-design-list.mjs","default":"./fesm2022/daffodil-design-list.mjs"},"./loading-icon":{"types":"./loading-icon/index.d.ts","esm2022":"./esm2022/loading-icon/daffodil-design-loading-icon.mjs","esm":"./esm2022/loading-icon/daffodil-design-loading-icon.mjs","default":"./fesm2022/daffodil-design-loading-icon.mjs"},"./media-gallery":{"types":"./media-gallery/index.d.ts","esm2022":"./esm2022/media-gallery/daffodil-design-media-gallery.mjs","esm":"./esm2022/media-gallery/daffodil-design-media-gallery.mjs","default":"./fesm2022/daffodil-design-media-gallery.mjs"},"./menu":{"types":"./menu/index.d.ts","esm2022":"./esm2022/menu/daffodil-design-menu.mjs","esm":"./esm2022/menu/daffodil-design-menu.mjs","default":"./fesm2022/daffodil-design-menu.mjs"},"./modal":{"types":"./modal/index.d.ts","esm2022":"./esm2022/modal/daffodil-design-modal.mjs","esm":"./esm2022/modal/daffodil-design-modal.mjs","default":"./fesm2022/daffodil-design-modal.mjs"},"./navbar":{"types":"./navbar/index.d.ts","esm2022":"./esm2022/navbar/daffodil-design-navbar.mjs","esm":"./esm2022/navbar/daffodil-design-navbar.mjs","default":"./fesm2022/daffodil-design-navbar.mjs"},"./notification":{"types":"./notification/index.d.ts","esm2022":"./esm2022/notification/daffodil-design-notification.mjs","esm":"./esm2022/notification/daffodil-design-notification.mjs","default":"./fesm2022/daffodil-design-notification.mjs"},"./paginator":{"types":"./paginator/index.d.ts","esm2022":"./esm2022/paginator/daffodil-design-paginator.mjs","esm":"./esm2022/paginator/daffodil-design-paginator.mjs","default":"./fesm2022/daffodil-design-paginator.mjs"},"./sidebar":{"types":"./sidebar/index.d.ts","esm2022":"./esm2022/sidebar/daffodil-design-sidebar.mjs","esm":"./esm2022/sidebar/daffodil-design-sidebar.mjs","default":"./fesm2022/daffodil-design-sidebar.mjs"},"./tree":{"types":"./tree/index.d.ts","esm2022":"./esm2022/tree/daffodil-design-tree.mjs","esm":"./esm2022/tree/daffodil-design-tree.mjs","default":"./fesm2022/daffodil-design-tree.mjs"},"./accordion/examples":{"types":"./accordion/examples/index.d.ts","esm2022":"./esm2022/accordion/examples/daffodil-design-accordion-examples.mjs","esm":"./esm2022/accordion/examples/daffodil-design-accordion-examples.mjs","default":"./fesm2022/daffodil-design-accordion-examples.mjs"},"./article/examples":{"types":"./article/examples/index.d.ts","esm2022":"./esm2022/article/examples/daffodil-design-article-examples.mjs","esm":"./esm2022/article/examples/daffodil-design-article-examples.mjs","default":"./fesm2022/daffodil-design-article-examples.mjs"},"./button/examples":{"types":"./button/examples/index.d.ts","esm2022":"./esm2022/button/examples/daffodil-design-button-examples.mjs","esm":"./esm2022/button/examples/daffodil-design-button-examples.mjs","default":"./fesm2022/daffodil-design-button-examples.mjs"},"./callout/examples":{"types":"./callout/examples/index.d.ts","esm2022":"./esm2022/callout/examples/daffodil-design-callout-examples.mjs","esm":"./esm2022/callout/examples/daffodil-design-callout-examples.mjs","default":"./fesm2022/daffodil-design-callout-examples.mjs"},"./card/examples":{"types":"./card/examples/index.d.ts","esm2022":"./esm2022/card/examples/daffodil-design-card-examples.mjs","esm":"./esm2022/card/examples/daffodil-design-card-examples.mjs","default":"./fesm2022/daffodil-design-card-examples.mjs"},"./checkbox/examples":{"types":"./checkbox/examples/index.d.ts","esm2022":"./esm2022/checkbox/examples/daffodil-design-checkbox-examples.mjs","esm":"./esm2022/checkbox/examples/daffodil-design-checkbox-examples.mjs","default":"./fesm2022/daffodil-design-checkbox-examples.mjs"},"./container/examples":{"types":"./container/examples/index.d.ts","esm2022":"./esm2022/container/examples/daffodil-design-container-examples.mjs","esm":"./esm2022/container/examples/daffodil-design-container-examples.mjs","default":"./fesm2022/daffodil-design-container-examples.mjs"},"./hero/examples":{"types":"./hero/examples/index.d.ts","esm2022":"./esm2022/hero/examples/daffodil-design-hero-examples.mjs","esm":"./esm2022/hero/examples/daffodil-design-hero-examples.mjs","default":"./fesm2022/daffodil-design-hero-examples.mjs"},"./image/examples":{"types":"./image/examples/index.d.ts","esm2022":"./esm2022/image/examples/daffodil-design-image-examples.mjs","esm":"./esm2022/image/examples/daffodil-design-image-examples.mjs","default":"./fesm2022/daffodil-design-image-examples.mjs"},"./input/examples":{"types":"./input/examples/index.d.ts","esm2022":"./esm2022/input/examples/daffodil-design-input-examples.mjs","esm":"./esm2022/input/examples/daffodil-design-input-examples.mjs","default":"./fesm2022/daffodil-design-input-examples.mjs"},"./list/examples":{"types":"./list/examples/index.d.ts","esm2022":"./esm2022/list/examples/daffodil-design-list-examples.mjs","esm":"./esm2022/list/examples/daffodil-design-list-examples.mjs","default":"./fesm2022/daffodil-design-list-examples.mjs"},"./loading-icon/examples":{"types":"./loading-icon/examples/index.d.ts","esm2022":"./esm2022/loading-icon/examples/daffodil-design-loading-icon-examples.mjs","esm":"./esm2022/loading-icon/examples/daffodil-design-loading-icon-examples.mjs","default":"./fesm2022/daffodil-design-loading-icon-examples.mjs"},"./media-gallery/examples":{"types":"./media-gallery/examples/index.d.ts","esm2022":"./esm2022/media-gallery/examples/daffodil-design-media-gallery-examples.mjs","esm":"./esm2022/media-gallery/examples/daffodil-design-media-gallery-examples.mjs","default":"./fesm2022/daffodil-design-media-gallery-examples.mjs"},"./menu/examples":{"types":"./menu/examples/index.d.ts","esm2022":"./esm2022/menu/examples/daffodil-design-menu-examples.mjs","esm":"./esm2022/menu/examples/daffodil-design-menu-examples.mjs","default":"./fesm2022/daffodil-design-menu-examples.mjs"},"./modal/examples":{"types":"./modal/examples/index.d.ts","esm2022":"./esm2022/modal/examples/daffodil-design-modal-examples.mjs","esm":"./esm2022/modal/examples/daffodil-design-modal-examples.mjs","default":"./fesm2022/daffodil-design-modal-examples.mjs"},"./navbar/examples":{"types":"./navbar/examples/index.d.ts","esm2022":"./esm2022/navbar/examples/daffodil-design-navbar-examples.mjs","esm":"./esm2022/navbar/examples/daffodil-design-navbar-examples.mjs","default":"./fesm2022/daffodil-design-navbar-examples.mjs"},"./notification/examples":{"types":"./notification/examples/index.d.ts","esm2022":"./esm2022/notification/examples/daffodil-design-notification-examples.mjs","esm":"./esm2022/notification/examples/daffodil-design-notification-examples.mjs","default":"./fesm2022/daffodil-design-notification-examples.mjs"},"./paginator/examples":{"types":"./paginator/examples/index.d.ts","esm2022":"./esm2022/paginator/examples/daffodil-design-paginator-examples.mjs","esm":"./esm2022/paginator/examples/daffodil-design-paginator-examples.mjs","default":"./fesm2022/daffodil-design-paginator-examples.mjs"},"./quantity-field/examples":{"types":"./quantity-field/examples/index.d.ts","esm2022":"./esm2022/quantity-field/examples/daffodil-design-quantity-field-examples.mjs","esm":"./esm2022/quantity-field/examples/daffodil-design-quantity-field-examples.mjs","default":"./fesm2022/daffodil-design-quantity-field-examples.mjs"},"./radio/examples":{"types":"./radio/examples/index.d.ts","esm2022":"./esm2022/radio/examples/daffodil-design-radio-examples.mjs","esm":"./esm2022/radio/examples/daffodil-design-radio-examples.mjs","default":"./fesm2022/daffodil-design-radio-examples.mjs"},"./sidebar/examples":{"types":"./sidebar/examples/index.d.ts","esm2022":"./esm2022/sidebar/examples/daffodil-design-sidebar-examples.mjs","esm":"./esm2022/sidebar/examples/daffodil-design-sidebar-examples.mjs","default":"./fesm2022/daffodil-design-sidebar-examples.mjs"},"./tree/examples":{"types":"./tree/examples/index.d.ts","esm2022":"./esm2022/tree/examples/daffodil-design-tree-examples.mjs","esm":"./esm2022/tree/examples/daffodil-design-tree-examples.mjs","default":"./fesm2022/daffodil-design-tree-examples.mjs"}},"module":"fesm2022/daffodil-design.mjs","typings":"index.d.ts","sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
|
1
|
+
{"name":"@daffodil/design","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/design"]}}},"version":"0.69.0","author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","description":"A consistent, sane api driver that works with different ecommerce systems.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"peerDependencies":{"@angular/animations":"^17.0.0","@angular/common":"^17.0.0","@angular/core":"^17.0.0","@angular/forms":"^17.0.0","@angular/cdk":"^17.0.0","@daffodil/core":"0.69.0","@fortawesome/angular-fontawesome":"^0.14.1","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","modern-normalize":"^0.5.0","rxjs":"7.8.1"},"optionalDependencies":{"@faker-js/faker":"^7.6.0"},"exports":{"./scss/daff-global":{"sass":"./scss/daff-global.scss"},"./scss/global":{"sass":"./scss/global.scss"},"./scss/theme":{"sass":"./scss/theme.scss"},"./scss/daff-util":{"sass":"./scss/daff-util.scss"},"./scss/utilities":{"sass":"./scss/utilities.scss"},"./scss/daff-typography":{"sass":"./scss/daff-typography.scss"},"./scss/typography/classes":{"sass":"./scss/typography/_classes.scss"},"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/daffodil-design.mjs","esm":"./esm2022/daffodil-design.mjs","default":"./fesm2022/daffodil-design.mjs"},"./accordion":{"types":"./accordion/index.d.ts","esm2022":"./esm2022/accordion/daffodil-design-accordion.mjs","esm":"./esm2022/accordion/daffodil-design-accordion.mjs","default":"./fesm2022/daffodil-design-accordion.mjs"},"./article":{"types":"./article/index.d.ts","esm2022":"./esm2022/article/daffodil-design-article.mjs","esm":"./esm2022/article/daffodil-design-article.mjs","default":"./fesm2022/daffodil-design-article.mjs"},"./button":{"types":"./button/index.d.ts","esm2022":"./esm2022/button/daffodil-design-button.mjs","esm":"./esm2022/button/daffodil-design-button.mjs","default":"./fesm2022/daffodil-design-button.mjs"},"./callout":{"types":"./callout/index.d.ts","esm2022":"./esm2022/callout/daffodil-design-callout.mjs","esm":"./esm2022/callout/daffodil-design-callout.mjs","default":"./fesm2022/daffodil-design-callout.mjs"},"./card":{"types":"./card/index.d.ts","esm2022":"./esm2022/card/daffodil-design-card.mjs","esm":"./esm2022/card/daffodil-design-card.mjs","default":"./fesm2022/daffodil-design-card.mjs"},"./container":{"types":"./container/index.d.ts","esm2022":"./esm2022/container/daffodil-design-container.mjs","esm":"./esm2022/container/daffodil-design-container.mjs","default":"./fesm2022/daffodil-design-container.mjs"},"./hero":{"types":"./hero/index.d.ts","esm2022":"./esm2022/hero/daffodil-design-hero.mjs","esm":"./esm2022/hero/daffodil-design-hero.mjs","default":"./fesm2022/daffodil-design-hero.mjs"},"./image":{"types":"./image/index.d.ts","esm2022":"./esm2022/image/daffodil-design-image.mjs","esm":"./esm2022/image/daffodil-design-image.mjs","default":"./fesm2022/daffodil-design-image.mjs"},"./link-set":{"types":"./link-set/index.d.ts","esm2022":"./esm2022/link-set/daffodil-design-link-set.mjs","esm":"./esm2022/link-set/daffodil-design-link-set.mjs","default":"./fesm2022/daffodil-design-link-set.mjs"},"./list":{"types":"./list/index.d.ts","esm2022":"./esm2022/list/daffodil-design-list.mjs","esm":"./esm2022/list/daffodil-design-list.mjs","default":"./fesm2022/daffodil-design-list.mjs"},"./loading-icon":{"types":"./loading-icon/index.d.ts","esm2022":"./esm2022/loading-icon/daffodil-design-loading-icon.mjs","esm":"./esm2022/loading-icon/daffodil-design-loading-icon.mjs","default":"./fesm2022/daffodil-design-loading-icon.mjs"},"./media-gallery":{"types":"./media-gallery/index.d.ts","esm2022":"./esm2022/media-gallery/daffodil-design-media-gallery.mjs","esm":"./esm2022/media-gallery/daffodil-design-media-gallery.mjs","default":"./fesm2022/daffodil-design-media-gallery.mjs"},"./menu":{"types":"./menu/index.d.ts","esm2022":"./esm2022/menu/daffodil-design-menu.mjs","esm":"./esm2022/menu/daffodil-design-menu.mjs","default":"./fesm2022/daffodil-design-menu.mjs"},"./modal":{"types":"./modal/index.d.ts","esm2022":"./esm2022/modal/daffodil-design-modal.mjs","esm":"./esm2022/modal/daffodil-design-modal.mjs","default":"./fesm2022/daffodil-design-modal.mjs"},"./navbar":{"types":"./navbar/index.d.ts","esm2022":"./esm2022/navbar/daffodil-design-navbar.mjs","esm":"./esm2022/navbar/daffodil-design-navbar.mjs","default":"./fesm2022/daffodil-design-navbar.mjs"},"./notification":{"types":"./notification/index.d.ts","esm2022":"./esm2022/notification/daffodil-design-notification.mjs","esm":"./esm2022/notification/daffodil-design-notification.mjs","default":"./fesm2022/daffodil-design-notification.mjs"},"./paginator":{"types":"./paginator/index.d.ts","esm2022":"./esm2022/paginator/daffodil-design-paginator.mjs","esm":"./esm2022/paginator/daffodil-design-paginator.mjs","default":"./fesm2022/daffodil-design-paginator.mjs"},"./sidebar":{"types":"./sidebar/index.d.ts","esm2022":"./esm2022/sidebar/daffodil-design-sidebar.mjs","esm":"./esm2022/sidebar/daffodil-design-sidebar.mjs","default":"./fesm2022/daffodil-design-sidebar.mjs"},"./toast":{"types":"./toast/index.d.ts","esm2022":"./esm2022/toast/daffodil-design-toast.mjs","esm":"./esm2022/toast/daffodil-design-toast.mjs","default":"./fesm2022/daffodil-design-toast.mjs"},"./tree":{"types":"./tree/index.d.ts","esm2022":"./esm2022/tree/daffodil-design-tree.mjs","esm":"./esm2022/tree/daffodil-design-tree.mjs","default":"./fesm2022/daffodil-design-tree.mjs"},"./accordion/examples":{"types":"./accordion/examples/index.d.ts","esm2022":"./esm2022/accordion/examples/daffodil-design-accordion-examples.mjs","esm":"./esm2022/accordion/examples/daffodil-design-accordion-examples.mjs","default":"./fesm2022/daffodil-design-accordion-examples.mjs"},"./article/examples":{"types":"./article/examples/index.d.ts","esm2022":"./esm2022/article/examples/daffodil-design-article-examples.mjs","esm":"./esm2022/article/examples/daffodil-design-article-examples.mjs","default":"./fesm2022/daffodil-design-article-examples.mjs"},"./button/examples":{"types":"./button/examples/index.d.ts","esm2022":"./esm2022/button/examples/daffodil-design-button-examples.mjs","esm":"./esm2022/button/examples/daffodil-design-button-examples.mjs","default":"./fesm2022/daffodil-design-button-examples.mjs"},"./callout/examples":{"types":"./callout/examples/index.d.ts","esm2022":"./esm2022/callout/examples/daffodil-design-callout-examples.mjs","esm":"./esm2022/callout/examples/daffodil-design-callout-examples.mjs","default":"./fesm2022/daffodil-design-callout-examples.mjs"},"./card/examples":{"types":"./card/examples/index.d.ts","esm2022":"./esm2022/card/examples/daffodil-design-card-examples.mjs","esm":"./esm2022/card/examples/daffodil-design-card-examples.mjs","default":"./fesm2022/daffodil-design-card-examples.mjs"},"./checkbox/examples":{"types":"./checkbox/examples/index.d.ts","esm2022":"./esm2022/checkbox/examples/daffodil-design-checkbox-examples.mjs","esm":"./esm2022/checkbox/examples/daffodil-design-checkbox-examples.mjs","default":"./fesm2022/daffodil-design-checkbox-examples.mjs"},"./container/examples":{"types":"./container/examples/index.d.ts","esm2022":"./esm2022/container/examples/daffodil-design-container-examples.mjs","esm":"./esm2022/container/examples/daffodil-design-container-examples.mjs","default":"./fesm2022/daffodil-design-container-examples.mjs"},"./hero/examples":{"types":"./hero/examples/index.d.ts","esm2022":"./esm2022/hero/examples/daffodil-design-hero-examples.mjs","esm":"./esm2022/hero/examples/daffodil-design-hero-examples.mjs","default":"./fesm2022/daffodil-design-hero-examples.mjs"},"./image/examples":{"types":"./image/examples/index.d.ts","esm2022":"./esm2022/image/examples/daffodil-design-image-examples.mjs","esm":"./esm2022/image/examples/daffodil-design-image-examples.mjs","default":"./fesm2022/daffodil-design-image-examples.mjs"},"./input/examples":{"types":"./input/examples/index.d.ts","esm2022":"./esm2022/input/examples/daffodil-design-input-examples.mjs","esm":"./esm2022/input/examples/daffodil-design-input-examples.mjs","default":"./fesm2022/daffodil-design-input-examples.mjs"},"./list/examples":{"types":"./list/examples/index.d.ts","esm2022":"./esm2022/list/examples/daffodil-design-list-examples.mjs","esm":"./esm2022/list/examples/daffodil-design-list-examples.mjs","default":"./fesm2022/daffodil-design-list-examples.mjs"},"./loading-icon/examples":{"types":"./loading-icon/examples/index.d.ts","esm2022":"./esm2022/loading-icon/examples/daffodil-design-loading-icon-examples.mjs","esm":"./esm2022/loading-icon/examples/daffodil-design-loading-icon-examples.mjs","default":"./fesm2022/daffodil-design-loading-icon-examples.mjs"},"./media-gallery/examples":{"types":"./media-gallery/examples/index.d.ts","esm2022":"./esm2022/media-gallery/examples/daffodil-design-media-gallery-examples.mjs","esm":"./esm2022/media-gallery/examples/daffodil-design-media-gallery-examples.mjs","default":"./fesm2022/daffodil-design-media-gallery-examples.mjs"},"./menu/examples":{"types":"./menu/examples/index.d.ts","esm2022":"./esm2022/menu/examples/daffodil-design-menu-examples.mjs","esm":"./esm2022/menu/examples/daffodil-design-menu-examples.mjs","default":"./fesm2022/daffodil-design-menu-examples.mjs"},"./modal/examples":{"types":"./modal/examples/index.d.ts","esm2022":"./esm2022/modal/examples/daffodil-design-modal-examples.mjs","esm":"./esm2022/modal/examples/daffodil-design-modal-examples.mjs","default":"./fesm2022/daffodil-design-modal-examples.mjs"},"./navbar/examples":{"types":"./navbar/examples/index.d.ts","esm2022":"./esm2022/navbar/examples/daffodil-design-navbar-examples.mjs","esm":"./esm2022/navbar/examples/daffodil-design-navbar-examples.mjs","default":"./fesm2022/daffodil-design-navbar-examples.mjs"},"./notification/examples":{"types":"./notification/examples/index.d.ts","esm2022":"./esm2022/notification/examples/daffodil-design-notification-examples.mjs","esm":"./esm2022/notification/examples/daffodil-design-notification-examples.mjs","default":"./fesm2022/daffodil-design-notification-examples.mjs"},"./paginator/examples":{"types":"./paginator/examples/index.d.ts","esm2022":"./esm2022/paginator/examples/daffodil-design-paginator-examples.mjs","esm":"./esm2022/paginator/examples/daffodil-design-paginator-examples.mjs","default":"./fesm2022/daffodil-design-paginator-examples.mjs"},"./quantity-field/examples":{"types":"./quantity-field/examples/index.d.ts","esm2022":"./esm2022/quantity-field/examples/daffodil-design-quantity-field-examples.mjs","esm":"./esm2022/quantity-field/examples/daffodil-design-quantity-field-examples.mjs","default":"./fesm2022/daffodil-design-quantity-field-examples.mjs"},"./radio/examples":{"types":"./radio/examples/index.d.ts","esm2022":"./esm2022/radio/examples/daffodil-design-radio-examples.mjs","esm":"./esm2022/radio/examples/daffodil-design-radio-examples.mjs","default":"./fesm2022/daffodil-design-radio-examples.mjs"},"./sidebar/examples":{"types":"./sidebar/examples/index.d.ts","esm2022":"./esm2022/sidebar/examples/daffodil-design-sidebar-examples.mjs","esm":"./esm2022/sidebar/examples/daffodil-design-sidebar-examples.mjs","default":"./fesm2022/daffodil-design-sidebar-examples.mjs"},"./toast/examples":{"types":"./toast/examples/index.d.ts","esm2022":"./esm2022/toast/examples/daffodil-design-toast-examples.mjs","esm":"./esm2022/toast/examples/daffodil-design-toast-examples.mjs","default":"./fesm2022/daffodil-design-toast-examples.mjs"},"./tree/examples":{"types":"./tree/examples/index.d.ts","esm2022":"./esm2022/tree/examples/daffodil-design-tree-examples.mjs","esm":"./esm2022/tree/examples/daffodil-design-tree-examples.mjs","default":"./fesm2022/daffodil-design-tree-examples.mjs"}},"module":"fesm2022/daffodil-design.mjs","typings":"index.d.ts","sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
|
package/public_api.d.ts
CHANGED
@@ -8,7 +8,6 @@ export * from './atoms/form/quantity-field/public_api';
|
|
8
8
|
export * from './atoms/progress-indicator/public_api';
|
9
9
|
export * from './atoms/form/radio/public_api';
|
10
10
|
export * from './atoms/form/form-label/public_api';
|
11
|
-
export * from './molecules/backdrop/public_api';
|
12
11
|
export * from './molecules/button-set/public_api';
|
13
12
|
export * from './molecules/image-gallery/public_api';
|
14
13
|
export * from './molecules/image-list/public_api';
|
package/scss/theme.scss
CHANGED
@@ -40,6 +40,7 @@
|
|
40
40
|
@use '../sidebar/src/sidebar-theme' as sidebar;
|
41
41
|
@use '../scss/state/skeleton/mixins' as skeleton;
|
42
42
|
@use '../tree/src/tree-theme' as tree;
|
43
|
+
@use '../toast/src/toast-theme' as toast;
|
43
44
|
|
44
45
|
//
|
45
46
|
// Generates the styles of a @daffodil/design theme.
|
@@ -81,4 +82,5 @@
|
|
81
82
|
@include paginator.daff-paginator-theme($theme);
|
82
83
|
@include sidebar.daff-sidebar-theme($theme);
|
83
84
|
@include tree.daff-tree-theme($theme);
|
85
|
+
@include toast.daff-toast-theme($theme);
|
84
86
|
}
|
package/sidebar/public_api.d.ts
CHANGED
@@ -5,5 +5,6 @@ export * from './sidebar-header/sidebar-header.component';
|
|
5
5
|
export * from './sidebar-footer/sidebar-footer.component';
|
6
6
|
export * from './sidebar-header/sidebar-header-title/sidebar-header-title.directive';
|
7
7
|
export * from './sidebar-header/sidebar-header-action/sidebar-header-action.directive';
|
8
|
+
export * from './sidebar-viewport-backdrop/sidebar-viewport-backdrop.component';
|
8
9
|
export { DaffSidebarMode, DaffSidebarModeEnum, } from './helper/sidebar-mode';
|
9
10
|
export { DaffSidebarSide, DaffSidebarSideEnum, } from './helper/sidebar-side';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AnimationEvent } from '@angular/animations';
|
2
|
-
import { EventEmitter, ChangeDetectorRef, AfterContentChecked, ElementRef } from '@angular/core';
|
2
|
+
import { EventEmitter, ChangeDetectorRef, AfterContentChecked, ElementRef, OnDestroy } from '@angular/core';
|
3
3
|
import { DaffNavPlacement } from './nav-placement';
|
4
4
|
import { DaffSidebarScroll } from './scroll-token/scroll.token';
|
5
5
|
import { DaffSidebarViewportAnimationStateWithParams } from '../animation/sidebar-viewport-animation-state';
|
@@ -23,7 +23,7 @@ import * as i0 from "@angular/core";
|
|
23
23
|
* However, importantly, there can only be one sidebar of each mode, on each side, at any given time.
|
24
24
|
* If this is violated, this component will throw an exception.
|
25
25
|
*/
|
26
|
-
export declare class DaffSidebarViewportComponent implements AfterContentChecked {
|
26
|
+
export declare class DaffSidebarViewportComponent implements AfterContentChecked, OnDestroy {
|
27
27
|
private cdRef;
|
28
28
|
private _elementRef;
|
29
29
|
private bodyScroll;
|
@@ -83,6 +83,7 @@ export declare class DaffSidebarViewportComponent implements AfterContentChecked
|
|
83
83
|
*/
|
84
84
|
backdropClicked: EventEmitter<void>;
|
85
85
|
ngAfterContentChecked(): void;
|
86
|
+
ngOnDestroy(): void;
|
86
87
|
/**
|
87
88
|
* @docs-private
|
88
89
|
*
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { AnimationEvent } from '@angular/animations';
|
2
2
|
import { EventEmitter, OnInit } from '@angular/core';
|
3
3
|
import * as i0 from "@angular/core";
|
4
|
-
export declare class
|
4
|
+
export declare class DaffSidebarViewportBackdropComponent implements OnInit {
|
5
|
+
interactableClass: boolean;
|
5
6
|
/**
|
6
7
|
* Determines whether or not the backdrop is transparent.
|
7
8
|
*/
|
@@ -19,13 +20,12 @@ export declare class DaffBackdropComponent implements OnInit {
|
|
19
20
|
* Output event triggered when the backdrop is clicked.
|
20
21
|
*/
|
21
22
|
backdropClicked: EventEmitter<void>;
|
22
|
-
interactableClass: boolean;
|
23
23
|
ngOnInit(): void;
|
24
24
|
/**
|
25
25
|
* Animation hook for that controls the backdrops
|
26
26
|
* entrance and fade animations.
|
27
27
|
*/
|
28
|
-
get fadeBackdropTrigger(): import("
|
28
|
+
get fadeBackdropTrigger(): import("./animation/backdrop-animation-state").DaffSidebarViewportBackdropAnimationState;
|
29
29
|
animationDone(e: AnimationEvent): void;
|
30
30
|
animationStart(e: AnimationEvent): void;
|
31
31
|
/**
|
@@ -33,6 +33,6 @@ export declare class DaffBackdropComponent implements OnInit {
|
|
33
33
|
* Backdrop event that triggers when the backdrop element is clicked.
|
34
34
|
*/
|
35
35
|
onBackdropClicked(): void;
|
36
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSidebarViewportBackdropComponent, never>;
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffSidebarViewportBackdropComponent, "daff-sidebar-viewport-backdrop", never, { "transparent": { "alias": "transparent"; "required": false; }; "interactable": { "alias": "interactable"; "required": false; }; "fullscreen": { "alias": "fullscreen"; "required": false; }; }, { "backdropClicked": "backdropClicked"; }, never, ["*"], false, never>;
|
38
38
|
}
|
@@ -5,11 +5,11 @@ import * as i3 from "./sidebar-header/sidebar-header.component";
|
|
5
5
|
import * as i4 from "./sidebar-footer/sidebar-footer.component";
|
6
6
|
import * as i5 from "./sidebar-header/sidebar-header-title/sidebar-header-title.directive";
|
7
7
|
import * as i6 from "./sidebar-header/sidebar-header-action/sidebar-header-action.directive";
|
8
|
-
import * as i7 from "
|
9
|
-
import * as i8 from "@angular/
|
10
|
-
import * as i9 from "@
|
8
|
+
import * as i7 from "./sidebar-viewport-backdrop/sidebar-viewport-backdrop.component";
|
9
|
+
import * as i8 from "@angular/common";
|
10
|
+
import * as i9 from "@angular/cdk/a11y";
|
11
11
|
export declare class DaffSidebarModule {
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSidebarModule, never>;
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSidebarModule, [typeof i1.DaffSidebarComponent, typeof i2.DaffSidebarViewportComponent, typeof i3.DaffSidebarHeaderComponent, typeof i4.DaffSidebarFooterComponent, typeof i5.DaffSidebarHeaderTitleDirective, typeof i6.DaffSidebarHeaderActionDirective
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffSidebarModule, [typeof i1.DaffSidebarComponent, typeof i2.DaffSidebarViewportComponent, typeof i3.DaffSidebarHeaderComponent, typeof i4.DaffSidebarFooterComponent, typeof i5.DaffSidebarHeaderTitleDirective, typeof i6.DaffSidebarHeaderActionDirective, typeof i7.DaffSidebarViewportBackdropComponent], [typeof i8.CommonModule, typeof i9.A11yModule], [typeof i1.DaffSidebarComponent, typeof i2.DaffSidebarViewportComponent, typeof i3.DaffSidebarHeaderComponent, typeof i4.DaffSidebarFooterComponent, typeof i5.DaffSidebarHeaderTitleDirective, typeof i6.DaffSidebarHeaderActionDirective, typeof i7.DaffSidebarViewportBackdropComponent]>;
|
14
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<DaffSidebarModule>;
|
15
15
|
}
|
package/toast/README.md
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
# Toast
|
2
|
+
Toasts are small messages designed to mimic push notifications. They are used to provide users with application level information.
|
3
|
+
|
4
|
+
## Overview
|
5
|
+
Toasts should be used to display temporary messages about actions or events that occured or in need of attention, with no relation to content on a page. For messaging that provide context in close promixity to a piece of content within a page, use the [Notification](../notification/README.md) component.
|
6
|
+
|
7
|
+
### Basic Toast
|
8
|
+
<design-land-article-encapsulated>
|
9
|
+
<design-land-example-viewer-container example="default-toast"></design-land-example-viewer-container>
|
10
|
+
</design-land-article-encapsulated>
|
11
|
+
|
12
|
+
### Configurations
|
13
|
+
Toast can be configured by using the `DaffToastService`.
|
14
|
+
|
15
|
+
The following is an example of a toast with a duration:
|
16
|
+
|
17
|
+
```ts
|
18
|
+
constructor(private toastService: DaffToastService) {}
|
19
|
+
|
20
|
+
open() {
|
21
|
+
this.toast = this.toastService.open({
|
22
|
+
title: 'Update Complete',
|
23
|
+
message: 'This page has been updated to the newest version.',
|
24
|
+
},
|
25
|
+
{
|
26
|
+
duration: 5000,
|
27
|
+
});
|
28
|
+
}
|
29
|
+
```
|
30
|
+
|
31
|
+
The following is an example of a toast with actions:
|
32
|
+
|
33
|
+
```ts
|
34
|
+
open() {
|
35
|
+
this.toast = this.toastService.open({
|
36
|
+
title: 'Update Available',
|
37
|
+
message: 'A new version of this page is available.',
|
38
|
+
actions: [
|
39
|
+
{ content: 'Update', color: 'theme-contrast', size: 'sm', eventEmitter: this.update },
|
40
|
+
{ content: 'Remind me later', type: 'flat', size: 'sm', eventEmitter: this.closeToast },
|
41
|
+
]
|
42
|
+
});
|
43
|
+
}
|
44
|
+
```
|
45
|
+
|
46
|
+
The following configurations are available in the `DaffToastService`:
|
47
|
+
|
48
|
+
| Property | Type | Description | Default |
|
49
|
+
| -------- | ------ | ------------------------------- | ------- |
|
50
|
+
| title | string | A quick overview of the toast | -- |
|
51
|
+
| message | string | Additional details about the message that should be limited to one or two sentences | -- |
|
52
|
+
| actions | `DaffToastAction` | Adds a `daff-button` that allow users to perform an action related to the message. Actions should be limited to two buttons. | -- |
|
53
|
+
| dismissible | boolean | Allows a toast to be dismissible via a close button | true |
|
54
|
+
| duration | number | The duration in milliseconds that a toast is visible before it's dismissed | 5000 |
|
55
|
+
|
56
|
+
The `actions` configurations are based on the properties of the `DaffButtonComponent` (view [Button Documentation](../src/atoms/button/README.md)) with the addition of `data` and `eventEmitter`.
|
57
|
+
|
58
|
+
### Dismissal
|
59
|
+
A toast can be dismissed via a timed duration, a close button, or the `ESC` key.
|
60
|
+
|
61
|
+
##### Timed duration
|
62
|
+
A toast with actions will persist until one of the actions have been interacted with, or is dismissed by the close button or the `ESC` key. Actionable toasts should be persistent, but a duration is allowed to be set. If duration must be set, make sure it's long enough for users to engage with the actions.
|
63
|
+
|
64
|
+
By default, a toast without actions will be dismissed after `5000ms`. This can be updated by setting `duration` through the `DaffToastService`.
|
65
|
+
|
66
|
+
#### Toast with custom duration
|
67
|
+
<design-land-example-viewer-container example="toast-with-custom-duration"></design-land-example-viewer-container>
|
68
|
+
|
69
|
+
##### Close button
|
70
|
+
The close button is shown by default but can be hidden by setting `dismissible: false` through the `DaffToastService`.
|
71
|
+
|
72
|
+
##### Escape Key
|
73
|
+
A toast can be dismissed by using the `ESC` key if it has actions and is focus trapped.
|
74
|
+
|
75
|
+
### Stacking
|
76
|
+
A maximum of three toasts can be shown at a time. Toasts are stacked vertically, with the most recent toast displayed on top.
|
77
|
+
|
78
|
+
### Statuses
|
79
|
+
The status color of a toast can be updated by using the `status` property.
|
80
|
+
|
81
|
+
Supported statuses: `warn | danger | success`
|
82
|
+
|
83
|
+
#### Toast with statuses
|
84
|
+
<design-land-example-viewer-container example="toast-status"></design-land-example-viewer-container>
|
85
|
+
|
86
|
+
### Positions
|
87
|
+
|
88
|
+
| Property | Value | Default |
|
89
|
+
| ------------ | ------------------------ | ------- |
|
90
|
+
| `vertical` | `top | bottom` | top |
|
91
|
+
| `horizontal` | `left | center | right ` | right |
|
92
|
+
|
93
|
+
To change the horizontal and vertical position of a toast, add the `provideDaffToastOptions` dependency key to the `providers` key in the module as shown below:
|
94
|
+
|
95
|
+
```ts
|
96
|
+
providers: [
|
97
|
+
provideDaffToastOptions({
|
98
|
+
position: {
|
99
|
+
vertical: 'bottom',
|
100
|
+
horizontal: 'center',
|
101
|
+
}
|
102
|
+
useParent: false,
|
103
|
+
})
|
104
|
+
]
|
105
|
+
```
|
106
|
+
|
107
|
+
The position of a toast on a mobile device will always be on the bottom center.
|
108
|
+
|
109
|
+
#### Toast with configurable positions
|
110
|
+
<design-land-example-viewer-container example="toast-positions"></design-land-example-viewer-container>
|
111
|
+
|
112
|
+
### Accessibility
|
113
|
+
By default, toasts use a `role="status"` to announce messages. It's the equivalent of `aria-live="polite"`, which does not interrupt a user's current activity and waits until they are idle to make the announcement. When a toast has actions, a `role="alertdialog"` is used. The toast will be focus trapped and focus immediately moves to the actions.
|
114
|
+
|
115
|
+
Avoid setting a duration on toasts with actions because they will disappear automatically, making it difficult for users to interact with the actions.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
2
|
+
import { DaffToastAction, DaffToastService } from '@daffodil/design/toast';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class DefaultToastComponent implements OnInit {
|
5
|
+
private toastService;
|
6
|
+
private toast;
|
7
|
+
constructor(toastService: DaffToastService);
|
8
|
+
update: EventEmitter<DaffToastAction>;
|
9
|
+
closeToast: EventEmitter<DaffToastAction>;
|
10
|
+
open(): void;
|
11
|
+
ngOnInit(): void;
|
12
|
+
private count;
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultToastComponent, never>;
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DefaultToastComponent, "default-toast", never, {}, {}, never, never, false, never>;
|
15
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./default-toast.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "@daffodil/design/toast";
|
5
|
+
import * as i4 from "@fortawesome/angular-fontawesome";
|
6
|
+
import * as i5 from "@daffodil/design/button";
|
7
|
+
export declare class DefaultToastModule {
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultToastModule, never>;
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DefaultToastModule, [typeof i1.DefaultToastComponent], [typeof i2.CommonModule, typeof i3.DaffToastModule, typeof i4.FontAwesomeModule, typeof i5.DaffButtonModule], [typeof i1.DefaultToastComponent]>;
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DefaultToastModule>;
|
11
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './public_api';
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { OnInit } from '@angular/core';
|
2
|
+
import { FormControl } from '@angular/forms';
|
3
|
+
import { DaffToastService, DaffToastPositionService } from '@daffodil/design/toast';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class ToastPositionsComponent implements OnInit {
|
6
|
+
private toastService;
|
7
|
+
private toastPositionService;
|
8
|
+
private toast;
|
9
|
+
constructor(toastService: DaffToastService, toastPositionService: DaffToastPositionService);
|
10
|
+
open(): void;
|
11
|
+
private count;
|
12
|
+
horizontalControl: FormControl;
|
13
|
+
verticalControl: FormControl;
|
14
|
+
ngOnInit(): void;
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastPositionsComponent, never>;
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToastPositionsComponent, "toast-positions", never, {}, {}, never, never, false, never>;
|
17
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./toast-positions.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "@angular/forms";
|
5
|
+
import * as i4 from "@daffodil/design/toast";
|
6
|
+
import * as i5 from "@fortawesome/angular-fontawesome";
|
7
|
+
import * as i6 from "@daffodil/design/button";
|
8
|
+
export declare class ToastPositionsModule {
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastPositionsModule, never>;
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ToastPositionsModule, [typeof i1.ToastPositionsComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.DaffToastModule, typeof i5.FontAwesomeModule, typeof i6.DaffButtonModule], [typeof i1.ToastPositionsComponent]>;
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ToastPositionsModule>;
|
12
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
2
|
+
import { DaffToastService } from '@daffodil/design/toast';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class ToastStatusComponent {
|
5
|
+
private toastService;
|
6
|
+
faInfoCircle: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
7
|
+
faCheck: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
8
|
+
faExclamation: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
9
|
+
statusControl: FormControl;
|
10
|
+
constructor(toastService: DaffToastService);
|
11
|
+
open(): void;
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastStatusComponent, never>;
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToastStatusComponent, "toast-status", never, {}, {}, never, never, false, never>;
|
14
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./toast-status.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "@daffodil/design/toast";
|
5
|
+
import * as i4 from "@daffodil/design/button";
|
6
|
+
import * as i5 from "@fortawesome/angular-fontawesome";
|
7
|
+
import * as i6 from "@angular/forms";
|
8
|
+
export declare class ToastStatusModule {
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastStatusModule, never>;
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ToastStatusModule, [typeof i1.ToastStatusComponent], [typeof i2.CommonModule, typeof i3.DaffToastModule, typeof i4.DaffButtonModule, typeof i5.FontAwesomeModule, typeof i6.ReactiveFormsModule], [typeof i1.ToastStatusComponent]>;
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ToastStatusModule>;
|
12
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { DaffToastService } from '@daffodil/design/toast';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class ToastWithCustomDurationComponent {
|
4
|
+
private toastService;
|
5
|
+
private toast;
|
6
|
+
constructor(toastService: DaffToastService);
|
7
|
+
open(): void;
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastWithCustomDurationComponent, never>;
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToastWithCustomDurationComponent, "toast-with-custom-duration", never, {}, {}, never, never, false, never>;
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./toast-with-custom-duration.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "@daffodil/design/toast";
|
5
|
+
import * as i4 from "@daffodil/design/button";
|
6
|
+
export declare class ToastWithCustomDurationModule {
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastWithCustomDurationModule, never>;
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ToastWithCustomDurationModule, [typeof i1.ToastWithCustomDurationComponent], [typeof i2.CommonModule, typeof i3.DaffToastModule, typeof i4.DaffButtonModule], [typeof i1.ToastWithCustomDurationComponent]>;
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ToastWithCustomDurationModule>;
|
10
|
+
}
|
package/toast/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './public_api';
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
2
|
+
import { DaffPalette, DaffStatus } from '@daffodil/design';
|
3
|
+
/**
|
4
|
+
* An interface for properties of actions, specifically the DaffButtonComponent, placed inside of the toast.
|
5
|
+
*/
|
6
|
+
export interface DaffToastAction {
|
7
|
+
/**
|
8
|
+
* The types of buttons available to be used, as defined in the {@link DaffButtonComponent}.
|
9
|
+
*/
|
10
|
+
type?: 'raised' | 'underline' | 'stroked' | 'flat' | undefined;
|
11
|
+
/**
|
12
|
+
* The text for the button
|
13
|
+
*/
|
14
|
+
content: string;
|
15
|
+
/**
|
16
|
+
* The size of the button, as defined in the {@link DaffButtonComponent}.
|
17
|
+
*/
|
18
|
+
size?: 'sm' | 'md' | 'lg' | undefined;
|
19
|
+
/**
|
20
|
+
* The color of the button, as defined in the {@link DaffButtonComponent}.
|
21
|
+
* Color and status should not be used simultaneously.
|
22
|
+
*/
|
23
|
+
color?: DaffPalette;
|
24
|
+
/**
|
25
|
+
* The status of the button, as defined in the {@link DaffButtonComponent}.
|
26
|
+
* Color and status should not be used simultaneously.
|
27
|
+
*/
|
28
|
+
status?: DaffStatus;
|
29
|
+
data?: Record<string, any>;
|
30
|
+
/**
|
31
|
+
* Sets an EventEmitter on a DaffToastAction
|
32
|
+
*/
|
33
|
+
eventEmitter?: EventEmitter<DaffToastAction>;
|
34
|
+
}
|
35
|
+
export interface DaffToastActionEvent {
|
36
|
+
event: MouseEvent;
|
37
|
+
action: DaffToastAction;
|
38
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { Observable } from 'rxjs';
|
2
|
+
import { DaffStatus } from '@daffodil/design';
|
3
|
+
import { DaffToastAction } from './toast-action';
|
4
|
+
/** Possible data that can be shown on a toast */
|
5
|
+
export interface DaffToastData {
|
6
|
+
/** A title that provides a quick oveview of the toast */
|
7
|
+
title: string;
|
8
|
+
/** A short message used to provide additional details about the toast */
|
9
|
+
message?: string;
|
10
|
+
/** Sets a status on the toast */
|
11
|
+
status?: DaffStatus;
|
12
|
+
/** Used to display actions in the toast */
|
13
|
+
actions?: DaffToastAction[];
|
14
|
+
/** Whether or not the toast is dismissible */
|
15
|
+
dismissible?: boolean;
|
16
|
+
}
|
17
|
+
export interface DaffToast extends DaffToastData {
|
18
|
+
dismiss: () => void;
|
19
|
+
dismissalStream: Observable<void | number>;
|
20
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
2
|
+
export interface VerticalPositionTypes {
|
3
|
+
vertical: 'top' | 'bottom';
|
4
|
+
}
|
5
|
+
export interface HorizontalPositionTypes {
|
6
|
+
horizontal: 'left' | 'center' | 'right';
|
7
|
+
}
|
8
|
+
export type DaffToastPosition = VerticalPositionTypes & HorizontalPositionTypes;
|
9
|
+
export interface DaffToastOptions {
|
10
|
+
position: DaffToastPosition;
|
11
|
+
useParent: boolean;
|
12
|
+
}
|
13
|
+
export declare const daffToastDefaultOptions: DaffToastOptions;
|
14
|
+
export declare const DAFF_TOAST_OPTIONS: InjectionToken<DaffToastOptions>;
|
15
|
+
export declare const provideDaffToastOptions: (options: DaffToastOptions) => ValueProvider;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export { DaffToastPositionService } from './service/position.service';
|
2
|
+
export { DaffToastModule } from './toast.module';
|
3
|
+
export { DaffToastService } from './service/toast.service';
|
4
|
+
export { DaffToastConfiguration } from './toast/toast-config';
|
5
|
+
export { DaffToast, DaffToastData, } from './interfaces/toast';
|
6
|
+
export { DaffToastAction } from './interfaces/toast-action';
|
7
|
+
export { DAFF_TOAST_OPTIONS, provideDaffToastOptions, } from './options/daff-toast-options';
|
8
|
+
export * from './toast/toast.component';
|
9
|
+
export * from './toast-actions/toast-actions.directive';
|
10
|
+
export * from './toast-title/toast-title.directive';
|
11
|
+
export * from './toast-message/toast-message.directive';
|