@daffodil/design 0.62.3 → 0.62.4
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/examples/package.json +1 -1
- package/article/examples/package.json +1 -1
- package/button/examples/package.json +1 -1
- package/callout/examples/package.json +1 -1
- package/card/examples/package.json +1 -1
- package/checkbox/examples/package.json +1 -1
- package/container/examples/package.json +1 -1
- package/esm2020/molecules/modal/modal/modal.component.mjs +37 -23
- package/esm2020/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.mjs +3 -3
- package/esm2020/notification/daffodil-design-notification.mjs +5 -0
- package/esm2020/notification/examples/daffodil-design-notification-examples.mjs +5 -0
- package/esm2020/notification/examples/default-notification/default-notification.component.mjs +23 -0
- package/esm2020/notification/examples/default-notification/default-notification.module.mjs +38 -0
- package/esm2020/notification/examples/dismissable-notification/dismissable-notification.component.mjs +23 -0
- package/esm2020/notification/examples/dismissable-notification/dismissable-notification.module.mjs +38 -0
- package/esm2020/notification/examples/index.mjs +2 -0
- package/esm2020/notification/examples/notification-orientations/notification-orientations.component.mjs +23 -0
- package/esm2020/notification/examples/notification-orientations/notification-orientations.module.mjs +42 -0
- package/esm2020/notification/examples/notification-status/notification-status.component.mjs +24 -0
- package/esm2020/notification/examples/notification-status/notification-status.module.mjs +42 -0
- package/esm2020/notification/examples/public_api.mjs +15 -0
- package/esm2020/notification/notification/notification.component.mjs +95 -0
- package/esm2020/notification/notification-actions/notification-actions.directive.mjs +19 -0
- package/esm2020/notification/notification-message/notification-message.directive.mjs +19 -0
- package/esm2020/notification/notification-subtitle/notification-subtitle.directive.mjs +19 -0
- package/esm2020/notification/notification-title/notification-title.directive.mjs +19 -0
- package/esm2020/notification/notification.module.mjs +56 -0
- package/esm2020/notification/public_api.mjs +7 -0
- package/fesm2015/daffodil-design-notification-examples.mjs +221 -0
- package/fesm2015/daffodil-design-notification-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-notification.mjs +218 -0
- package/fesm2015/daffodil-design-notification.mjs.map +1 -0
- package/fesm2015/daffodil-design.mjs +34 -23
- package/fesm2015/daffodil-design.mjs.map +1 -1
- package/fesm2020/daffodil-design-notification-examples.mjs +221 -0
- package/fesm2020/daffodil-design-notification-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-notification.mjs +218 -0
- package/fesm2020/daffodil-design-notification.mjs.map +1 -0
- package/fesm2020/daffodil-design.mjs +34 -23
- package/fesm2020/daffodil-design.mjs.map +1 -1
- package/hero/examples/package.json +1 -1
- package/image/examples/package.json +1 -1
- package/input/examples/package.json +1 -1
- package/list/examples/package.json +1 -1
- package/loading-icon/examples/package.json +1 -1
- package/media-gallery/examples/package.json +1 -1
- package/menu/examples/package.json +1 -1
- package/modal/examples/package.json +1 -1
- package/molecules/modal/modal/modal.component.d.ts +16 -15
- package/navbar/examples/package.json +1 -1
- package/notification/README.md +23 -0
- package/notification/daffodil-design-notification.d.ts +5 -0
- package/notification/examples/daffodil-design-notification-examples.d.ts +5 -0
- package/notification/examples/default-notification/default-notification.component.d.ts +6 -0
- package/notification/examples/default-notification/default-notification.module.d.ts +11 -0
- package/notification/examples/dismissable-notification/dismissable-notification.component.d.ts +6 -0
- package/notification/examples/dismissable-notification/dismissable-notification.module.d.ts +11 -0
- package/notification/examples/index.d.ts +1 -0
- package/notification/examples/notification-orientations/notification-orientations.component.d.ts +10 -0
- package/notification/examples/notification-orientations/notification-orientations.module.d.ts +12 -0
- package/notification/examples/notification-status/notification-status.component.d.ts +10 -0
- package/notification/examples/notification-status/notification-status.module.d.ts +12 -0
- package/notification/examples/package.json +1 -0
- package/notification/examples/public_api.d.ts +2 -0
- package/notification/notification/notification.component.d.ts +47 -0
- package/notification/notification-actions/notification-actions.directive.d.ts +6 -0
- package/notification/notification-message/notification-message.directive.d.ts +6 -0
- package/notification/notification-subtitle/notification-subtitle.directive.d.ts +6 -0
- package/notification/notification-title/notification-title.directive.d.ts +6 -0
- package/notification/notification.module.d.ts +14 -0
- package/notification/package.json +1 -0
- package/notification/public_api.d.ts +6 -0
- package/notification/src/notification-theme.scss +50 -0
- package/package.json +1 -1
- package/paginator/examples/package.json +1 -1
- package/quantity-field/examples/package.json +1 -1
- package/radio/examples/package.json +1 -1
- package/scss/theme.scss +2 -0
- package/sidebar/examples/package.json +1 -1
- package/tree/examples/package.json +1 -1
- package/tree/package.json +1 -1
@@ -14,7 +14,7 @@ import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
14
14
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
15
15
|
import * as i1$3 from '@angular/cdk/overlay';
|
16
16
|
import { OverlayModule, GlobalPositionStrategy } from '@angular/cdk/overlay';
|
17
|
-
import * as
|
17
|
+
import * as i2$1 from '@angular/cdk/portal';
|
18
18
|
import { ComponentPortal, TemplatePortal, CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
|
19
19
|
import * as i1$4 from '@angular/cdk/a11y';
|
20
20
|
import { A11yModule } from '@angular/cdk/a11y';
|
@@ -3742,7 +3742,13 @@ const daffFadeAnimations = {
|
|
3742
3742
|
const getAnimationState$1 = (open) => open ? 'open' : 'closed';
|
3743
3743
|
|
3744
3744
|
class DaffModalComponent {
|
3745
|
-
constructor() {
|
3745
|
+
constructor(_focusTrapFactory, _elementRef) {
|
3746
|
+
this._focusTrapFactory = _focusTrapFactory;
|
3747
|
+
this._elementRef = _elementRef;
|
3748
|
+
/**
|
3749
|
+
* HostBinding to set the default modal class on the host element.
|
3750
|
+
*/
|
3751
|
+
this.modalClass = true;
|
3746
3752
|
/**
|
3747
3753
|
* Dictates whether or not a modal is open or closed.
|
3748
3754
|
*/
|
@@ -3756,27 +3762,32 @@ class DaffModalComponent {
|
|
3756
3762
|
*/
|
3757
3763
|
this.closedAnimationCompleted = new EventEmitter();
|
3758
3764
|
/**
|
3759
|
-
* Event fired when the backdrop is clicked
|
3760
|
-
* This is often used to close the modal
|
3765
|
+
* Event fired when the backdrop is clicked. This is often used to close the modal.
|
3761
3766
|
*/
|
3762
3767
|
this.hide = new EventEmitter();
|
3763
|
-
|
3764
|
-
|
3765
|
-
|
3766
|
-
|
3767
|
-
|
3768
|
-
|
3768
|
+
}
|
3769
|
+
ngAfterContentInit() {
|
3770
|
+
this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
|
3771
|
+
}
|
3772
|
+
ngAfterViewInit() {
|
3773
|
+
const focusableChild = this._elementRef.nativeElement.querySelector(daffFocusableElementsSelector);
|
3774
|
+
if (focusableChild) {
|
3775
|
+
focusableChild.focus();
|
3776
|
+
}
|
3777
|
+
else {
|
3778
|
+
// There's a timing condition when computing HostBindings afterContentInit
|
3779
|
+
// so to allow the menu to be focused, we manually set the tabindex.
|
3780
|
+
this._elementRef.nativeElement.tabIndex = 0;
|
3781
|
+
this._elementRef.nativeElement.focus();
|
3782
|
+
}
|
3769
3783
|
}
|
3770
3784
|
/**
|
3771
|
-
* Helper method to attach portable content to modal
|
3785
|
+
* Helper method to attach portable content to modal.
|
3772
3786
|
*/
|
3773
3787
|
attachContent(portal) {
|
3774
3788
|
this._portalOutlet.attachComponentPortal(portal);
|
3775
3789
|
}
|
3776
|
-
/**
|
3777
|
-
* Animation hook that controls the entrance and exit animations
|
3778
|
-
* of the modal
|
3779
|
-
*/
|
3790
|
+
/** Animation hook that controls the entrance and exit animations of the modal. */
|
3780
3791
|
get fadeState() {
|
3781
3792
|
return getAnimationState$1(this.open);
|
3782
3793
|
}
|
@@ -3793,19 +3804,19 @@ class DaffModalComponent {
|
|
3793
3804
|
}
|
3794
3805
|
}
|
3795
3806
|
}
|
3796
|
-
/** @nocollapse */ DaffModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
3797
|
-
/** @nocollapse */ DaffModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: DaffModalComponent, selector: "daff-modal", inputs: { open: "open" }, host: { listeners: { "@fade.done": "animationDone($event)" }, properties: { "class.daff-modal": "this.modalClass", "@fade": "this.fadeState" } }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [":host{display:block;border-radius:4px;height:100%;max-width:80vw;overflow:hidden;padding:24px;z-index:3}@media (min-width: 480px){:host{height:auto}}\n"], directives: [{ type:
|
3807
|
+
/** @nocollapse */ DaffModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffModalComponent, deps: [{ token: i1$4.ConfigurableFocusTrapFactory }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
3808
|
+
/** @nocollapse */ DaffModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: DaffModalComponent, selector: "daff-modal", inputs: { open: "open" }, host: { listeners: { "@fade.done": "animationDone($event)" }, properties: { "class.daff-modal": "this.modalClass", "@fade": "this.fadeState" } }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [":host{display:block;border-radius:4px;height:100%;max-width:80vw;overflow:hidden;padding:24px;z-index:3}@media (min-width: 480px){:host{height:auto}}\n"], directives: [{ type: i2$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [daffFadeAnimations.fade], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
3798
3809
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffModalComponent, decorators: [{
|
3799
3810
|
type: Component,
|
3800
3811
|
args: [{ selector: 'daff-modal', animations: [daffFadeAnimations.fade], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [":host{display:block;border-radius:4px;height:100%;max-width:80vw;overflow:hidden;padding:24px;z-index:3}@media (min-width: 480px){:host{height:auto}}\n"] }]
|
3801
|
-
}], propDecorators: {
|
3812
|
+
}], ctorParameters: function () { return [{ type: i1$4.ConfigurableFocusTrapFactory }, { type: i0.ElementRef }]; }, propDecorators: { modalClass: [{
|
3813
|
+
type: HostBinding,
|
3814
|
+
args: ['class.daff-modal']
|
3815
|
+
}], open: [{
|
3802
3816
|
type: Input
|
3803
3817
|
}], _portalOutlet: [{
|
3804
3818
|
type: ViewChild,
|
3805
3819
|
args: [CdkPortalOutlet, { static: true }]
|
3806
|
-
}], modalClass: [{
|
3807
|
-
type: HostBinding,
|
3808
|
-
args: ['class.daff-modal']
|
3809
3820
|
}], fadeState: [{
|
3810
3821
|
type: HostBinding,
|
3811
3822
|
args: ['@fade']
|
@@ -4669,14 +4680,14 @@ class DaffSidebarViewportComponent {
|
|
4669
4680
|
}
|
4670
4681
|
}
|
4671
4682
|
/** @nocollapse */ DaffSidebarViewportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSidebarViewportComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
4672
|
-
/** @nocollapse */ DaffSidebarViewportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: DaffSidebarViewportComponent, selector: "daff-sidebar-viewport", outputs: { backdropClicked: "backdropClicked" }, queries: [{ propertyName: "sidebars", predicate: DaffSidebarComponent }], ngImport: i0, template: "<ng-content select=\"daff-sidebar:not([side=right])\"></ng-content>\n\n<daff-backdrop\n [@transformContent]=\"_animationState\"\n class=\"daff-sidebar-viewport__backdrop\"\n [interactable]=\"_backdropInteractable\"\n (backdropClicked)=\"_backdropClicked()\"></daff-backdrop>\n\n<div class=\"daff-sidebar-viewport__content\" [@transformContent]=\"_animationState\">\n <ng-content select=\"[daff-sidebar-viewport-nav]\"></ng-content>\n <div class=\"daff-sidebar-viewport__inner\" [style.padding-left.px]=\"_contentPadLeft\" [style.padding-right.px]=\"_contentPadRight\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-content select=\"daff-sidebar[side=right]\"></ng-content>", styles: [":host{overflow:hidden;display:flex;min-height:100%;position:relative;width:100%;z-index:1;height:100vh;height:100dvh}.daff-sidebar-viewport__content{flex:0 1 auto;width:100%;
|
4683
|
+
/** @nocollapse */ DaffSidebarViewportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: DaffSidebarViewportComponent, selector: "daff-sidebar-viewport", outputs: { backdropClicked: "backdropClicked" }, queries: [{ propertyName: "sidebars", predicate: DaffSidebarComponent }], ngImport: i0, template: "<ng-content select=\"daff-sidebar:not([side=right])\"></ng-content>\n\n<daff-backdrop\n [@transformContent]=\"_animationState\"\n class=\"daff-sidebar-viewport__backdrop\"\n [interactable]=\"_backdropInteractable\"\n (backdropClicked)=\"_backdropClicked()\"></daff-backdrop>\n\n<div class=\"daff-sidebar-viewport__content\" [@transformContent]=\"_animationState\">\n <div class=\"daff-sidebar-viewport__nav\"><ng-content select=\"[daff-sidebar-viewport-nav]\"></ng-content></div>\n <div class=\"daff-sidebar-viewport__inner\" [style.padding-left.px]=\"_contentPadLeft\" [style.padding-right.px]=\"_contentPadRight\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-content select=\"daff-sidebar[side=right]\"></ng-content>", styles: [":host{overflow:hidden;display:flex;min-height:100%;position:relative;width:100%;z-index:1;height:100vh;height:100dvh}.daff-sidebar-viewport__content{flex:0 1 auto;width:100%;z-index:3;overflow-y:auto;height:100%}.daff-sidebar-viewport__sidebar{flex-shrink:0}.daff-sidebar-viewport__nav{position:fixed;top:0;width:100%;z-index:3}.daff-sidebar-viewport__nav:empty{display:none}.daff-sidebar-viewport__nav:not(:empty)+.daff-sidebar-viewport__inner{margin-top:var(--daff-sidebar-side-fixed-top-shift)}.daff-sidebar-viewport__backdrop{height:100%;position:absolute;width:100%;z-index:4}:host-context(daff-sidebar-viewport daff-sidebar-viewport) .daff-sidebar-viewport__inner{padding-left:0!important;padding-right:0!important}\n"], components: [{ type: DaffBackdropComponent, selector: "daff-backdrop", inputs: ["transparent", "interactable", "fullscreen"], outputs: ["backdropClicked"] }], animations: [
|
4673
4684
|
daffSidebarAnimations.transformContent,
|
4674
4685
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
4675
4686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSidebarViewportComponent, decorators: [{
|
4676
4687
|
type: Component,
|
4677
4688
|
args: [{ selector: 'daff-sidebar-viewport', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
4678
4689
|
daffSidebarAnimations.transformContent,
|
4679
|
-
], template: "<ng-content select=\"daff-sidebar:not([side=right])\"></ng-content>\n\n<daff-backdrop\n [@transformContent]=\"_animationState\"\n class=\"daff-sidebar-viewport__backdrop\"\n [interactable]=\"_backdropInteractable\"\n (backdropClicked)=\"_backdropClicked()\"></daff-backdrop>\n\n<div class=\"daff-sidebar-viewport__content\" [@transformContent]=\"_animationState\">\n <ng-content select=\"[daff-sidebar-viewport-nav]\"></ng-content>\n <div class=\"daff-sidebar-viewport__inner\" [style.padding-left.px]=\"_contentPadLeft\" [style.padding-right.px]=\"_contentPadRight\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-content select=\"daff-sidebar[side=right]\"></ng-content>", styles: [":host{overflow:hidden;display:flex;min-height:100%;position:relative;width:100%;z-index:1;height:100vh;height:100dvh}.daff-sidebar-viewport__content{flex:0 1 auto;width:100%;
|
4690
|
+
], template: "<ng-content select=\"daff-sidebar:not([side=right])\"></ng-content>\n\n<daff-backdrop\n [@transformContent]=\"_animationState\"\n class=\"daff-sidebar-viewport__backdrop\"\n [interactable]=\"_backdropInteractable\"\n (backdropClicked)=\"_backdropClicked()\"></daff-backdrop>\n\n<div class=\"daff-sidebar-viewport__content\" [@transformContent]=\"_animationState\">\n <div class=\"daff-sidebar-viewport__nav\"><ng-content select=\"[daff-sidebar-viewport-nav]\"></ng-content></div>\n <div class=\"daff-sidebar-viewport__inner\" [style.padding-left.px]=\"_contentPadLeft\" [style.padding-right.px]=\"_contentPadRight\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-content select=\"daff-sidebar[side=right]\"></ng-content>", styles: [":host{overflow:hidden;display:flex;min-height:100%;position:relative;width:100%;z-index:1;height:100vh;height:100dvh}.daff-sidebar-viewport__content{flex:0 1 auto;width:100%;z-index:3;overflow-y:auto;height:100%}.daff-sidebar-viewport__sidebar{flex-shrink:0}.daff-sidebar-viewport__nav{position:fixed;top:0;width:100%;z-index:3}.daff-sidebar-viewport__nav:empty{display:none}.daff-sidebar-viewport__nav:not(:empty)+.daff-sidebar-viewport__inner{margin-top:var(--daff-sidebar-side-fixed-top-shift)}.daff-sidebar-viewport__backdrop{height:100%;position:absolute;width:100%;z-index:4}:host-context(daff-sidebar-viewport daff-sidebar-viewport) .daff-sidebar-viewport__inner{padding-left:0!important;padding-right:0!important}\n"] }]
|
4680
4691
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { sidebars: [{
|
4681
4692
|
type: ContentChildren,
|
4682
4693
|
args: [DaffSidebarComponent, { descendants: false }]
|