@kirbydesign/designsystem 4.0.1 → 4.0.2
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/bundles/kirbydesign-designsystem-testing-base.umd.js +44 -15
- package/bundles/kirbydesign-designsystem-testing-base.umd.js.map +1 -1
- package/bundles/kirbydesign-designsystem-testing-base.umd.min.js +1 -1
- package/bundles/kirbydesign-designsystem-testing-base.umd.min.js.map +1 -1
- package/bundles/kirbydesign-designsystem.umd.js +274 -63
- package/bundles/kirbydesign-designsystem.umd.js.map +1 -1
- package/bundles/kirbydesign-designsystem.umd.min.js +1 -1
- package/bundles/kirbydesign-designsystem.umd.min.js.map +1 -1
- package/esm2015/kirbydesign-designsystem.js +18 -16
- package/esm2015/kirbydesign-designsystem.metadata.json +1 -1
- package/esm2015/lib/components/card/card.component.js +1 -1
- package/esm2015/lib/components/card/card.component.metadata.json +1 -1
- package/esm2015/lib/components/dropdown/dropdown.component.js +53 -59
- package/esm2015/lib/components/dropdown/dropdown.component.metadata.json +1 -1
- package/esm2015/lib/components/dropdown/dropdown.types.js +12 -0
- package/esm2015/lib/components/dropdown/dropdown.types.metadata.json +1 -0
- package/esm2015/lib/components/dropdown/keyboard-handler.service.js +43 -0
- package/esm2015/lib/components/dropdown/keyboard-handler.service.metadata.json +1 -0
- package/esm2015/lib/components/index.js +3 -2
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/item/item.component.js +1 -1
- package/esm2015/lib/components/item/item.component.metadata.json +1 -1
- package/esm2015/lib/components/popover/popover.component.js +156 -0
- package/esm2015/lib/components/popover/popover.component.metadata.json +1 -0
- package/esm2015/lib/helpers/design-token-helper.js +4 -1
- package/esm2015/lib/helpers/design-token-helper.metadata.json +1 -1
- package/esm2015/lib/helpers/design-token-helper.styles.js +2 -1
- package/esm2015/lib/helpers/design-token-helper.styles.metadata.json +1 -1
- package/esm2015/lib/kirby.module.js +3 -1
- package/esm2015/lib/kirby.module.metadata.json +1 -1
- package/esm2015/testing-base/kirbydesign-designsystem-testing-base.js +17 -16
- package/esm2015/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
- package/esm2015/testing-base/lib/components/mock.dropdown.component.js +2 -1
- package/esm2015/testing-base/lib/components/mock.dropdown.component.metadata.json +1 -1
- package/esm2015/testing-base/lib/components/mock.popover.component.js +27 -0
- package/esm2015/testing-base/lib/components/mock.popover.component.metadata.json +1 -0
- package/esm2015/testing-base/lib/mock-components.js +3 -1
- package/esm2015/testing-base/lib/mock-components.metadata.json +1 -1
- package/fesm2015/kirbydesign-designsystem-testing-base.js +29 -2
- package/fesm2015/kirbydesign-designsystem-testing-base.js.map +1 -1
- package/fesm2015/kirbydesign-designsystem.js +251 -49
- package/fesm2015/kirbydesign-designsystem.js.map +1 -1
- package/kirbydesign-designsystem.d.ts +17 -15
- package/kirbydesign-designsystem.metadata.json +1 -1
- package/lib/components/dropdown/dropdown.component.d.ts +13 -14
- package/lib/components/dropdown/dropdown.types.d.ts +9 -0
- package/lib/components/dropdown/keyboard-handler.service.d.ts +3 -0
- package/lib/components/index.d.ts +2 -1
- package/lib/components/popover/popover.component.d.ts +34 -0
- package/lib/helpers/design-token-helper.d.ts +1 -0
- package/lib/helpers/design-token-helper.styles.d.ts +1 -0
- package/package.json +1 -1
- package/scss/base/_variables.scss +1 -0
- package/testing-base/kirbydesign-designsystem-testing-base.d.ts +16 -15
- package/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
- package/testing-base/lib/components/mock.dropdown.component.d.ts +1 -0
- package/testing-base/lib/components/mock.popover.component.d.ts +7 -0
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
default: '1',
|
|
65
65
|
segmentBadge: '2',
|
|
66
66
|
dropdown: '800',
|
|
67
|
+
popover: '850',
|
|
67
68
|
modalOverlay: '900',
|
|
68
69
|
modal: '901',
|
|
69
70
|
loadingOverlay: '1001',
|
|
@@ -1615,6 +1616,9 @@
|
|
|
1615
1616
|
DesignTokenHelper.itemHeight = function (key) {
|
|
1616
1617
|
return styles.itemHeights[key];
|
|
1617
1618
|
};
|
|
1619
|
+
DesignTokenHelper.zLayer = function (key) {
|
|
1620
|
+
return styles.zLayers[key];
|
|
1621
|
+
};
|
|
1618
1622
|
return DesignTokenHelper;
|
|
1619
1623
|
}());
|
|
1620
1624
|
DesignTokenHelper.breakpoints = styles.breakpoints;
|
|
@@ -3407,7 +3411,7 @@
|
|
|
3407
3411
|
{ type: i0.Component, args: [{
|
|
3408
3412
|
selector: 'kirby-card',
|
|
3409
3413
|
template: "<ng-content select=\"kirby-card-header\"></ng-content>\n<div class=\"content-wrapper\" [class.padding]=\"hasPadding\">\n <ng-content></ng-content>\n</div>\n<ng-content select=\"kirby-card-footer\"></ng-content>\n",
|
|
3410
|
-
styles: [":host{--kirby-card-main-background-color:var(--kirby-white);--kirby-card-main-color:var(--kirby-white-contrast);--kirby-card-footer-background-color:var(--kirby-white);--kirby-card-footer-color:var(--kirby-white-contrast);border-radius:16px;box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);color:var(--kirby-card-main-color);background-color:var(--kirby-card-main-background-color);display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;position:relative;z-index:1}:host .content-wrapper.padding{padding:16px}:host.highlighted{box-shadow:0 10px 15px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08)}:host.flat{box-shadow:none}:host-context(.swiper-slide-active){box-shadow:0 10px 15px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);transition:all .5s;transform:translateY(-3px)}:host(.primary){--kirby-card-main-background-color:var(--kirby-primary);--kirby-card-main-color:var(--kirby-primary-contrast)}:host(.secondary){--kirby-card-main-background-color:var(--kirby-secondary);--kirby-card-main-color:var(--kirby-secondary-contrast)}:host(.tertiary){--kirby-card-main-background-color:var(--kirby-tertiary);--kirby-card-main-color:var(--kirby-tertiary-contrast)}:host(.success){--kirby-card-main-background-color:var(--kirby-success);--kirby-card-main-color:var(--kirby-success-contrast)}:host(.warning){--kirby-card-main-background-color:var(--kirby-warning);--kirby-card-main-color:var(--kirby-warning-contrast)}:host(.danger){--kirby-card-main-background-color:var(--kirby-danger);--kirby-card-main-color:var(--kirby-danger-contrast)}:host(.light){--kirby-card-main-background-color:var(--kirby-light);--kirby-card-main-color:var(--kirby-light-contrast)}:host(.medium){--kirby-card-main-background-color:var(--kirby-medium);--kirby-card-main-color:var(--kirby-medium-contrast)}:host(.dark){--kirby-card-main-background-color:var(--kirby-dark);--kirby-card-main-color:var(--kirby-dark-contrast)}"]
|
|
3414
|
+
styles: [":host{--kirby-card-main-background-color:var(--kirby-white);--kirby-card-main-color:var(--kirby-white-contrast);--kirby-card-footer-background-color:var(--kirby-white);--kirby-card-footer-color:var(--kirby-white-contrast);border-radius:16px;box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);color:var(--kirby-card-main-color);background-color:var(--kirby-card-main-background-color);display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;position:relative;z-index:1;width:var(--kirby-card-width,auto)}:host .content-wrapper.padding{padding:16px}:host.highlighted{box-shadow:0 10px 15px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08)}:host.flat{box-shadow:none}:host-context(.swiper-slide-active){box-shadow:0 10px 15px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);transition:all .5s;transform:translateY(-3px)}:host(.primary){--kirby-card-main-background-color:var(--kirby-primary);--kirby-card-main-color:var(--kirby-primary-contrast)}:host(.secondary){--kirby-card-main-background-color:var(--kirby-secondary);--kirby-card-main-color:var(--kirby-secondary-contrast)}:host(.tertiary){--kirby-card-main-background-color:var(--kirby-tertiary);--kirby-card-main-color:var(--kirby-tertiary-contrast)}:host(.success){--kirby-card-main-background-color:var(--kirby-success);--kirby-card-main-color:var(--kirby-success-contrast)}:host(.warning){--kirby-card-main-background-color:var(--kirby-warning);--kirby-card-main-color:var(--kirby-warning-contrast)}:host(.danger){--kirby-card-main-background-color:var(--kirby-danger);--kirby-card-main-color:var(--kirby-danger-contrast)}:host(.light){--kirby-card-main-background-color:var(--kirby-light);--kirby-card-main-color:var(--kirby-light-contrast)}:host(.medium){--kirby-card-main-background-color:var(--kirby-medium);--kirby-card-main-color:var(--kirby-medium-contrast)}:host(.dark){--kirby-card-main-background-color:var(--kirby-dark);--kirby-card-main-color:var(--kirby-dark-contrast)}"]
|
|
3411
3415
|
},] }
|
|
3412
3416
|
];
|
|
3413
3417
|
/** @nocollapse */
|
|
@@ -5782,7 +5786,7 @@
|
|
|
5782
5786
|
{ type: i0.Component, args: [{
|
|
5783
5787
|
selector: 'kirby-item',
|
|
5784
5788
|
template: "<ion-item\n lines=\"none\"\n [attr.disabled]=\"disabled\"\n [attr.button]=\"selectable ? true : null\"\n [attr.tabindex]=\"selectable ? null : 0\"\n detail=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n>\n <div class=\"outside\" slot=\"start\">\n <ng-content select=\"[slot='outside']\"></ng-content>\n </div>\n <ng-content></ng-content>\n <ion-reorder slot=\"end\" *ngIf=\"reorderable\">\n <kirby-icon name=\"reorder\"></kirby-icon>\n </ion-reorder>\n</ion-item>\n",
|
|
5785
|
-
styles: [":host{display:block;position:relative}:host ion-item{font-size:14px;--min-height:56px;--padding-start:16px;--inner-padding-top:8px;--inner-padding-bottom:8px;--inner-padding-end:16px;--background:var(--kirby-item-background,var(--kirby-white));--background-activated:var(--kirby-item-background-activated,var(--kirby-white-shade));--background-activated-opacity:0.99;--background-focused:var(--kirby-item-background-focused,var(--kirby-background-color));--background-focused-opacity:1;--background-hover:var(--kirby-item-background-hover,var(--kirby-background-color));--background-hover-opacity:1}@media screen and (orientation:landscape){:host ion-item{--ion-safe-area-left:0px;--ion-safe-area-right:0px}}:host ion-item ::ng-deep>[slot=end]{margin-inline-start:0;margin-inline-end:0;text-align:right}:host ion-item ::ng-deep>time[slot=end]{margin-inline-start:12px}:host ion-item ::ng-deep>[detail][slot=end],:host ion-item ::ng-deep>data[slot=end],:host ion-item ::ng-deep>ion-reorder[slot=end]{margin-inline-start:16px}:host ion-item ::ng-deep>data,:host ion-item ::ng-deep>h1,:host ion-item ::ng-deep>h2,:host ion-item ::ng-deep>h3,:host ion-item ::ng-deep>h4,:host ion-item ::ng-deep>h5,:host ion-item ::ng-deep>h6,:host ion-item ::ng-deep>p{font-size:16px;line-height:24px;color:var(--kirby-text-color-black);display:block;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}:host ion-item ::ng-deep>data.kirby-text-bold,:host ion-item ::ng-deep>h1.kirby-text-bold,:host ion-item ::ng-deep>h2.kirby-text-bold,:host ion-item ::ng-deep>h3.kirby-text-bold,:host ion-item ::ng-deep>h4.kirby-text-bold,:host ion-item ::ng-deep>h5.kirby-text-bold,:host ion-item ::ng-deep>h6.kirby-text-bold,:host ion-item ::ng-deep>p.kirby-text-bold{font-weight:700}:host ion-item ::ng-deep>p{font-size:14px}:host ion-item ::ng-deep>[detail],:host ion-item ::ng-deep>[subtitle]{font-size:12px;line-height:16px}:host ion-item ::ng-deep>[subtitle]:not(:last-child){margin-bottom:4px}:host ion-item ::ng-deep>[detail]{color:var(--kirby-text-color-semi-dark)}:host ion-item ::ng-deep>:not([slot]){width:100%}:host ion-item ::ng-deep>input[slot=end],:host ion-item ::ng-deep>kirby-form-field[slot=end] input{margin-inline-start:16px;width:auto;text-align:right}:host.sm ion-item{--min-height:44px}:host.xs ion-item{--min-height:32px;--inner-padding-top:4px;--inner-padding-bottom:4px}:host .outside{left:4px;margin:0;position:absolute;width:16px;z-index:1}:host-context(kirby-dropdown) ion-item{--min-height:44px}:host-context(kirby-list-item:first-of-type) ion-item{--padding-top:8px}:host-context(kirby-list-item:first-of-type kirby-card) ion-item{--padding-top:0}:host-context(kirby-list-item:last-of-type) ion-item{--padding-bottom:8px}:host-context(kirby-list-item:last-of-type kirby-card) ion-item{--padding-bottom:0}:host(.selected) ion-item ::ng-deep>data,:host(.selected) ion-item ::ng-deep>h1,:host(.selected) ion-item ::ng-deep>h2,:host(.selected) ion-item ::ng-deep>h3,:host(.selected) ion-item ::ng-deep>h4,:host(.selected) ion-item ::ng-deep>h5,:host(.selected) ion-item ::ng-deep>h6,:host(.selected) ion-item ::ng-deep>p,:host-context(kirby-list .selected) ion-item ::ng-deep>data,:host-context(kirby-list .selected) ion-item ::ng-deep>h1,:host-context(kirby-list .selected) ion-item ::ng-deep>h2,:host-context(kirby-list .selected) ion-item ::ng-deep>h3,:host-context(kirby-list .selected) ion-item ::ng-deep>h4,:host-context(kirby-list .selected) ion-item ::ng-deep>h5,:host-context(kirby-list .selected) ion-item ::ng-deep>h6,:host-context(kirby-list .selected) ion-item ::ng-deep>p{font-weight:700}:host-context(.shape-rounded .is-single) ion-item{--border-radius:16px}:host-context(.has-header .is-single) ion-item::part(native){border-top-left-radius:0;border-top-right-radius:0}:host-context(.has-footer .is-single) ion-item::part(native){border-bottom-left-radius:0;border-bottom-right-radius:0}:host-context(.shape-rounded.has-sections .list-items kirby-list-item:first-of-type) ion-item::part(native){border-top-left-radius:16px;border-top-right-radius:16px}"]
|
|
5789
|
+
styles: [":host{display:block;position:relative}:host ion-item{font-size:14px;--min-height:56px;--padding-start:16px;--inner-padding-top:8px;--inner-padding-bottom:8px;--inner-padding-end:16px;--background:var(--kirby-item-background,var(--kirby-white));--background-activated:var(--kirby-item-background-activated,var(--kirby-white-shade));--background-activated-opacity:0.99;--background-focused:var(--kirby-item-background-focused,var(--kirby-background-color));--background-focused-opacity:1;--background-hover:var(--kirby-item-background-hover,var(--kirby-background-color));--background-hover-opacity:1}@media screen and (orientation:landscape){:host ion-item{--ion-safe-area-left:0px;--ion-safe-area-right:0px}}:host ion-item ::ng-deep>[slot=end]{margin-inline-start:0;margin-inline-end:0;text-align:right}:host ion-item ::ng-deep>time[slot=end]{margin-inline-start:12px}:host ion-item ::ng-deep>[detail][slot=end],:host ion-item ::ng-deep>data[slot=end],:host ion-item ::ng-deep>ion-reorder[slot=end]{margin-inline-start:16px}:host ion-item ::ng-deep>data,:host ion-item ::ng-deep>h1,:host ion-item ::ng-deep>h2,:host ion-item ::ng-deep>h3,:host ion-item ::ng-deep>h4,:host ion-item ::ng-deep>h5,:host ion-item ::ng-deep>h6,:host ion-item ::ng-deep>p{font-size:16px;line-height:24px;color:var(--kirby-text-color-black);display:block;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}:host ion-item ::ng-deep>data.kirby-text-bold,:host ion-item ::ng-deep>h1.kirby-text-bold,:host ion-item ::ng-deep>h2.kirby-text-bold,:host ion-item ::ng-deep>h3.kirby-text-bold,:host ion-item ::ng-deep>h4.kirby-text-bold,:host ion-item ::ng-deep>h5.kirby-text-bold,:host ion-item ::ng-deep>h6.kirby-text-bold,:host ion-item ::ng-deep>p.kirby-text-bold{font-weight:700}:host ion-item ::ng-deep>p{font-size:14px}:host ion-item ::ng-deep>[detail],:host ion-item ::ng-deep>[subtitle]{font-size:12px;line-height:16px}:host ion-item ::ng-deep>[subtitle]:not(:last-child){margin-bottom:4px}:host ion-item ::ng-deep>[detail]{color:var(--kirby-text-color-semi-dark)}:host ion-item ::ng-deep>:not([slot]){width:100%}:host ion-item ::ng-deep>input[slot=end],:host ion-item ::ng-deep>kirby-form-field[slot=end] input{margin-inline-start:16px;width:auto;text-align:right}:host.sm ion-item{--min-height:44px}:host.xs ion-item{--min-height:32px;--inner-padding-top:4px;--inner-padding-bottom:4px}:host .outside{left:4px;margin:0;position:absolute;width:16px;z-index:1}:host-context(kirby-dropdown) ion-item,:host-context(kirby-popover) ion-item{--min-height:44px}:host-context(kirby-list-item:first-of-type) ion-item{--padding-top:8px}:host-context(kirby-list-item:first-of-type kirby-card) ion-item{--padding-top:0}:host-context(kirby-list-item:last-of-type) ion-item{--padding-bottom:8px}:host-context(kirby-list-item:last-of-type kirby-card) ion-item{--padding-bottom:0}:host(.selected) ion-item ::ng-deep>data,:host(.selected) ion-item ::ng-deep>h1,:host(.selected) ion-item ::ng-deep>h2,:host(.selected) ion-item ::ng-deep>h3,:host(.selected) ion-item ::ng-deep>h4,:host(.selected) ion-item ::ng-deep>h5,:host(.selected) ion-item ::ng-deep>h6,:host(.selected) ion-item ::ng-deep>p,:host-context(kirby-list .selected) ion-item ::ng-deep>data,:host-context(kirby-list .selected) ion-item ::ng-deep>h1,:host-context(kirby-list .selected) ion-item ::ng-deep>h2,:host-context(kirby-list .selected) ion-item ::ng-deep>h3,:host-context(kirby-list .selected) ion-item ::ng-deep>h4,:host-context(kirby-list .selected) ion-item ::ng-deep>h5,:host-context(kirby-list .selected) ion-item ::ng-deep>h6,:host-context(kirby-list .selected) ion-item ::ng-deep>p{font-weight:700}:host-context(.shape-rounded .is-single) ion-item{--border-radius:16px}:host-context(.has-header .is-single) ion-item::part(native){border-top-left-radius:0;border-top-right-radius:0}:host-context(.has-footer .is-single) ion-item::part(native){border-bottom-left-radius:0;border-bottom-right-radius:0}:host-context(.shape-rounded.has-sections .list-items kirby-list-item:first-of-type) ion-item::part(native){border-top-left-radius:16px;border-top-right-radius:16px}"]
|
|
5786
5790
|
},] }
|
|
5787
5791
|
];
|
|
5788
5792
|
ItemComponent.propDecorators = {
|
|
@@ -5860,26 +5864,224 @@
|
|
|
5860
5864
|
},] }
|
|
5861
5865
|
];
|
|
5862
5866
|
|
|
5867
|
+
(function (HorizontalDirection) {
|
|
5868
|
+
HorizontalDirection["right"] = "right";
|
|
5869
|
+
HorizontalDirection["left"] = "left";
|
|
5870
|
+
})(exports.HorizontalDirection || (exports.HorizontalDirection = {}));
|
|
5871
|
+
var PopoverComponent = /** @class */ (function () {
|
|
5872
|
+
function PopoverComponent(elementRef, renderer) {
|
|
5873
|
+
this.elementRef = elementRef;
|
|
5874
|
+
this.renderer = renderer;
|
|
5875
|
+
// removeEventListener same instance of event handler & options
|
|
5876
|
+
this.preventScrollEventListenerOptions = {
|
|
5877
|
+
passive: false,
|
|
5878
|
+
};
|
|
5879
|
+
this.POPOVER_BODY_PADDING = 12;
|
|
5880
|
+
this.isShowing = false;
|
|
5881
|
+
this.popout = exports.HorizontalDirection.right;
|
|
5882
|
+
this.willHide = new i0.EventEmitter();
|
|
5883
|
+
this.document = elementRef.nativeElement.ownerDocument;
|
|
5884
|
+
}
|
|
5885
|
+
Object.defineProperty(PopoverComponent.prototype, "targetElement", {
|
|
5886
|
+
get: function () {
|
|
5887
|
+
if (this.target instanceof i0.ElementRef) {
|
|
5888
|
+
return this.target.nativeElement;
|
|
5889
|
+
}
|
|
5890
|
+
else {
|
|
5891
|
+
return this.target;
|
|
5892
|
+
}
|
|
5893
|
+
},
|
|
5894
|
+
enumerable: false,
|
|
5895
|
+
configurable: true
|
|
5896
|
+
});
|
|
5897
|
+
PopoverComponent.prototype._backdropClick = function () {
|
|
5898
|
+
this.willHide.emit();
|
|
5899
|
+
this.hide();
|
|
5900
|
+
};
|
|
5901
|
+
PopoverComponent.prototype._onWindowResize = function () {
|
|
5902
|
+
if (this.isShowing) {
|
|
5903
|
+
this.willHide.emit();
|
|
5904
|
+
this.hide();
|
|
5905
|
+
}
|
|
5906
|
+
};
|
|
5907
|
+
PopoverComponent.prototype.ngAfterViewInit = function () {
|
|
5908
|
+
this.placePopoverAboveClosestModal();
|
|
5909
|
+
this.renderer.removeChild(this.elementRef.nativeElement.parentElement, this.elementRef.nativeElement);
|
|
5910
|
+
};
|
|
5911
|
+
PopoverComponent.prototype.ngOnDestroy = function () {
|
|
5912
|
+
this.hide();
|
|
5913
|
+
};
|
|
5914
|
+
PopoverComponent.prototype.placePopoverAboveClosestModal = function () {
|
|
5915
|
+
var closestIonModal = this.elementRef.nativeElement.closest('ion-modal');
|
|
5916
|
+
if (closestIonModal) {
|
|
5917
|
+
this.zIndex = parseInt(closestIonModal.style.zIndex) + 1;
|
|
5918
|
+
this.elementRef.nativeElement.style.zIndex = "" + this.zIndex;
|
|
5919
|
+
}
|
|
5920
|
+
else {
|
|
5921
|
+
this.zIndex = parseInt(DesignTokenHelper.zLayer('popover'));
|
|
5922
|
+
}
|
|
5923
|
+
};
|
|
5924
|
+
// document.removeEventListener needs the exact same event handler & options reference:
|
|
5925
|
+
PopoverComponent.prototype.preventEvent = function (event) {
|
|
5926
|
+
event.preventDefault();
|
|
5927
|
+
};
|
|
5928
|
+
PopoverComponent.prototype.preventScroll = function () {
|
|
5929
|
+
this.isFirstToLockScroll = !this.document.body.classList.contains('backdrop-no-scroll');
|
|
5930
|
+
if (this.isFirstToLockScroll) {
|
|
5931
|
+
this.renderer.addClass(this.document.body, 'backdrop-no-scroll');
|
|
5932
|
+
}
|
|
5933
|
+
// preventDefault does not work with Renderer2.listen method; add event listener directly to document instead
|
|
5934
|
+
this.document.addEventListener('touchmove', this.preventEvent, this.preventScrollEventListenerOptions);
|
|
5935
|
+
};
|
|
5936
|
+
PopoverComponent.prototype.releaseScroll = function () {
|
|
5937
|
+
if (this.isFirstToLockScroll) {
|
|
5938
|
+
this.renderer.removeClass(this.document.body, 'backdrop-no-scroll');
|
|
5939
|
+
}
|
|
5940
|
+
this.document.removeEventListener('touchmove', this.preventEvent, this.preventScrollEventListenerOptions);
|
|
5941
|
+
};
|
|
5942
|
+
PopoverComponent.prototype.show = function () {
|
|
5943
|
+
this.renderer.addClass(this.elementRef.nativeElement, 'is-opening');
|
|
5944
|
+
this.renderer.appendChild(this.document.body, this.elementRef.nativeElement);
|
|
5945
|
+
this.preventScroll();
|
|
5946
|
+
this.positionWrapper();
|
|
5947
|
+
this.renderer.addClass(this.elementRef.nativeElement, 'is-open');
|
|
5948
|
+
this.renderer.removeClass(this.elementRef.nativeElement, 'is-opening');
|
|
5949
|
+
this.isShowing = true;
|
|
5950
|
+
};
|
|
5951
|
+
PopoverComponent.prototype.hide = function () {
|
|
5952
|
+
this.renderer.removeChild(this.document.body, this.elementRef.nativeElement);
|
|
5953
|
+
this.releaseScroll();
|
|
5954
|
+
this.renderer.removeStyle(this.targetElement, 'z-index');
|
|
5955
|
+
this.renderer.removeStyle(this.targetElement, 'pointer-events');
|
|
5956
|
+
this.isShowing = false;
|
|
5957
|
+
};
|
|
5958
|
+
PopoverComponent.prototype.positionWrapper = function () {
|
|
5959
|
+
var targetDimensions = this.targetElement.getBoundingClientRect();
|
|
5960
|
+
this.renderer.appendChild(this.document.body, this.elementRef.nativeElement);
|
|
5961
|
+
var wrapperElement = this.wrapperElement.nativeElement;
|
|
5962
|
+
var wrapperDimensions = wrapperElement.getBoundingClientRect();
|
|
5963
|
+
var viewport = wrapperElement.ownerDocument.defaultView;
|
|
5964
|
+
this.positionHorizontally(viewport, wrapperElement, targetDimensions, wrapperDimensions);
|
|
5965
|
+
this.positionVertically(viewport, wrapperElement, targetDimensions, wrapperDimensions);
|
|
5966
|
+
};
|
|
5967
|
+
PopoverComponent.prototype.positionHorizontally = function (viewPort, wrapperElement, targetDimensions, wrapperDimensions) {
|
|
5968
|
+
var viewPortWidth = viewPort.innerWidth;
|
|
5969
|
+
var contentWidth = wrapperDimensions.width;
|
|
5970
|
+
var availableSpaceRight = viewPortWidth - targetDimensions.left;
|
|
5971
|
+
var availableSpaceLeft = targetDimensions.right;
|
|
5972
|
+
var contentCanFitRightOfTarget = availableSpaceRight >= contentWidth + this.POPOVER_BODY_PADDING;
|
|
5973
|
+
var openRight = contentCanFitRightOfTarget || availableSpaceRight >= availableSpaceLeft;
|
|
5974
|
+
var _a = __read(this.popout === exports.HorizontalDirection.left || !openRight
|
|
5975
|
+
? ['left', 'right']
|
|
5976
|
+
: ['right', 'left'], 2), direction = _a[0], oppositeDirection = _a[1];
|
|
5977
|
+
var pxValue = direction === 'left' ? viewPortWidth - targetDimensions.right : targetDimensions.left;
|
|
5978
|
+
this.renderer.removeStyle(wrapperElement, direction);
|
|
5979
|
+
this.renderer.setStyle(wrapperElement, oppositeDirection, pxValue + "px");
|
|
5980
|
+
};
|
|
5981
|
+
PopoverComponent.prototype.positionVertically = function (viewPort, wrapperElement, targetDimensions, wrapperDimensions) {
|
|
5982
|
+
var viewPortHeight = viewPort.innerHeight;
|
|
5983
|
+
var contentHeight = wrapperDimensions.height;
|
|
5984
|
+
var availableSpaceDown = viewPortHeight - targetDimensions.bottom;
|
|
5985
|
+
var availableSpaceUp = targetDimensions.top;
|
|
5986
|
+
var contentCanFitBelowTarget = availableSpaceDown >= contentHeight + this.POPOVER_BODY_PADDING;
|
|
5987
|
+
var isAvailableSpaceBelow = contentCanFitBelowTarget || availableSpaceDown >= availableSpaceUp;
|
|
5988
|
+
var _a = __read(isAvailableSpaceBelow
|
|
5989
|
+
? ['bottom', 'top']
|
|
5990
|
+
: ['top', 'bottom'], 2), direction = _a[0], oppositeDirection = _a[1];
|
|
5991
|
+
var pxValue = direction === 'bottom' ? targetDimensions.bottom : viewPortHeight - targetDimensions.top;
|
|
5992
|
+
this.renderer.removeStyle(wrapperElement, direction);
|
|
5993
|
+
this.renderer.setStyle(wrapperElement, oppositeDirection, pxValue + "px");
|
|
5994
|
+
if (direction === 'top') {
|
|
5995
|
+
// Ensure target is elevated above shadows in popover, i.e. content wrapped in Card:
|
|
5996
|
+
this.renderer.setStyle(this.targetElement, 'z-index', "" + (this.zIndex + 1));
|
|
5997
|
+
this.renderer.setStyle(this.targetElement, 'pointer-events', 'none');
|
|
5998
|
+
}
|
|
5999
|
+
};
|
|
6000
|
+
return PopoverComponent;
|
|
6001
|
+
}());
|
|
6002
|
+
PopoverComponent.decorators = [
|
|
6003
|
+
{ type: i0.Component, args: [{
|
|
6004
|
+
selector: 'kirby-popover',
|
|
6005
|
+
template: "\n <div #wrapper class=\"wrapper\"><ng-content></ng-content></div>\n ",
|
|
6006
|
+
styles: [":host{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:850}:host(.is-opening){display:block;visibility:hidden}:host(.is-open){display:block}.wrapper{position:fixed;margin-top:4px;margin-bottom:4px}"]
|
|
6007
|
+
},] }
|
|
6008
|
+
];
|
|
6009
|
+
/** @nocollapse */
|
|
6010
|
+
PopoverComponent.ctorParameters = function () { return [
|
|
6011
|
+
{ type: i0.ElementRef },
|
|
6012
|
+
{ type: i0.Renderer2 }
|
|
6013
|
+
]; };
|
|
6014
|
+
PopoverComponent.propDecorators = {
|
|
6015
|
+
wrapperElement: [{ type: i0.ViewChild, args: ['wrapper', { static: true, read: i0.ElementRef },] }],
|
|
6016
|
+
popout: [{ type: i0.Input }],
|
|
6017
|
+
target: [{ type: i0.Input }],
|
|
6018
|
+
willHide: [{ type: i0.Output }],
|
|
6019
|
+
_backdropClick: [{ type: i0.HostListener, args: ['click',] }],
|
|
6020
|
+
_onWindowResize: [{ type: i0.HostListener, args: ['window:resize',] }]
|
|
6021
|
+
};
|
|
6022
|
+
|
|
5863
6023
|
var OpenState;
|
|
5864
6024
|
(function (OpenState) {
|
|
5865
6025
|
OpenState[OpenState["closed"] = 0] = "closed";
|
|
5866
6026
|
OpenState[OpenState["opening"] = 1] = "opening";
|
|
5867
6027
|
OpenState[OpenState["open"] = 2] = "open";
|
|
5868
6028
|
})(OpenState || (OpenState = {}));
|
|
5869
|
-
(function (HorizontalDirection) {
|
|
5870
|
-
HorizontalDirection["right"] = "right";
|
|
5871
|
-
HorizontalDirection["left"] = "left";
|
|
5872
|
-
})(exports.HorizontalDirection || (exports.HorizontalDirection = {}));
|
|
5873
6029
|
var VerticalDirection;
|
|
5874
6030
|
(function (VerticalDirection) {
|
|
5875
6031
|
VerticalDirection[VerticalDirection["up"] = 0] = "up";
|
|
5876
6032
|
VerticalDirection[VerticalDirection["down"] = 1] = "down";
|
|
5877
6033
|
})(VerticalDirection || (VerticalDirection = {}));
|
|
6034
|
+
|
|
6035
|
+
var KeyboardHandlerService = /** @class */ (function () {
|
|
6036
|
+
function KeyboardHandlerService() {
|
|
6037
|
+
}
|
|
6038
|
+
KeyboardHandlerService.prototype.handle = function (event, items, selectedIndex) {
|
|
6039
|
+
var newIndex = -1;
|
|
6040
|
+
switch (event.key) {
|
|
6041
|
+
case 'ArrowUp':
|
|
6042
|
+
case 'ArrowLeft':
|
|
6043
|
+
// Select previous item:
|
|
6044
|
+
newIndex = selectedIndex - 1;
|
|
6045
|
+
break;
|
|
6046
|
+
case 'ArrowDown':
|
|
6047
|
+
case 'ArrowRight':
|
|
6048
|
+
if (selectedIndex === undefined) {
|
|
6049
|
+
// None selected, select first item:
|
|
6050
|
+
newIndex = 0;
|
|
6051
|
+
}
|
|
6052
|
+
else if (selectedIndex < items.length - 1) {
|
|
6053
|
+
// Select next item:
|
|
6054
|
+
newIndex = selectedIndex + 1;
|
|
6055
|
+
}
|
|
6056
|
+
break;
|
|
6057
|
+
case 'Home':
|
|
6058
|
+
// Select first item:
|
|
6059
|
+
newIndex = 0;
|
|
6060
|
+
break;
|
|
6061
|
+
case 'End':
|
|
6062
|
+
// Select last item:
|
|
6063
|
+
newIndex = items.length - 1;
|
|
6064
|
+
break;
|
|
6065
|
+
default:
|
|
6066
|
+
break;
|
|
6067
|
+
}
|
|
6068
|
+
return newIndex;
|
|
6069
|
+
};
|
|
6070
|
+
return KeyboardHandlerService;
|
|
6071
|
+
}());
|
|
6072
|
+
/** @nocollapse */ KeyboardHandlerService.ɵprov = i0.ɵɵdefineInjectable({ factory: function KeyboardHandlerService_Factory() { return new KeyboardHandlerService(); }, token: KeyboardHandlerService, providedIn: "root" });
|
|
6073
|
+
KeyboardHandlerService.decorators = [
|
|
6074
|
+
{ type: i0.Injectable, args: [{
|
|
6075
|
+
providedIn: 'root',
|
|
6076
|
+
},] }
|
|
6077
|
+
];
|
|
6078
|
+
|
|
5878
6079
|
var DropdownComponent = /** @class */ (function () {
|
|
5879
|
-
function DropdownComponent(renderer, elementRef, changeDetectorRef) {
|
|
6080
|
+
function DropdownComponent(renderer, elementRef, changeDetectorRef, keyboardHandlerService) {
|
|
5880
6081
|
this.renderer = renderer;
|
|
5881
6082
|
this.elementRef = elementRef;
|
|
5882
6083
|
this.changeDetectorRef = changeDetectorRef;
|
|
6084
|
+
this.keyboardHandlerService = keyboardHandlerService;
|
|
5883
6085
|
this.state = OpenState.closed;
|
|
5884
6086
|
this.hasConfiguredSlottedItems = false;
|
|
5885
6087
|
this.horizontalDirection = exports.HorizontalDirection.right;
|
|
@@ -5893,6 +6095,7 @@
|
|
|
5893
6095
|
this.disabled = false;
|
|
5894
6096
|
this.size = 'md';
|
|
5895
6097
|
this.tabindex = 0;
|
|
6098
|
+
this.usePopover = false;
|
|
5896
6099
|
/**
|
|
5897
6100
|
* Emitted when an item is selected (tap on mobile, click/keypress on web)
|
|
5898
6101
|
*/
|
|
@@ -6038,11 +6241,26 @@
|
|
|
6038
6241
|
this.hasConfiguredSlottedItems = true;
|
|
6039
6242
|
}
|
|
6040
6243
|
};
|
|
6244
|
+
/* Utility that makes it easier to set styles on card element
|
|
6245
|
+
when using popover*/
|
|
6246
|
+
DropdownComponent.prototype.setPopoverCardStyle = function (style, value) {
|
|
6247
|
+
if (!this.usePopover)
|
|
6248
|
+
return;
|
|
6249
|
+
this.renderer.setStyle(this.cardElement.nativeElement, style, value, i0.RendererStyleFlags2.DashCase);
|
|
6250
|
+
};
|
|
6041
6251
|
DropdownComponent.prototype.ngAfterViewInit = function () {
|
|
6252
|
+
if (this.usePopover && this.expand === 'block') {
|
|
6253
|
+
var width = this.elementRef.nativeElement.getBoundingClientRect().width;
|
|
6254
|
+
this.setPopoverCardStyle('--kirby-card-width', width + "px");
|
|
6255
|
+
this.setPopoverCardStyle('max-width', 'initial');
|
|
6256
|
+
this.setPopoverCardStyle('min-width', 'initial');
|
|
6257
|
+
}
|
|
6042
6258
|
this.initializeAlignment();
|
|
6043
6259
|
};
|
|
6044
6260
|
DropdownComponent.prototype.initializeAlignment = function () {
|
|
6045
6261
|
var _this = this;
|
|
6262
|
+
if (this.usePopover)
|
|
6263
|
+
return;
|
|
6046
6264
|
if (!this.intersectionObserverRef) {
|
|
6047
6265
|
var options = {
|
|
6048
6266
|
rootMargin: '0px',
|
|
@@ -6110,13 +6328,16 @@
|
|
|
6110
6328
|
}
|
|
6111
6329
|
};
|
|
6112
6330
|
DropdownComponent.prototype.showDropdown = function () {
|
|
6331
|
+
var _a;
|
|
6113
6332
|
if (this.state === OpenState.opening) {
|
|
6114
6333
|
this.state = OpenState.open;
|
|
6334
|
+
(_a = this.popover) === null || _a === void 0 ? void 0 : _a.show();
|
|
6115
6335
|
this.scrollItemIntoView(this.selectedIndex);
|
|
6116
6336
|
this.changeDetectorRef.markForCheck();
|
|
6117
6337
|
}
|
|
6118
6338
|
};
|
|
6119
6339
|
DropdownComponent.prototype.close = function () {
|
|
6340
|
+
var _a;
|
|
6120
6341
|
if (this.disabled) {
|
|
6121
6342
|
return;
|
|
6122
6343
|
}
|
|
@@ -6124,6 +6345,7 @@
|
|
|
6124
6345
|
this.state = OpenState.closed;
|
|
6125
6346
|
// Reset vertical direction to default
|
|
6126
6347
|
this.verticalDirection = VerticalDirection.down;
|
|
6348
|
+
(_a = this.popover) === null || _a === void 0 ? void 0 : _a.hide();
|
|
6127
6349
|
}
|
|
6128
6350
|
};
|
|
6129
6351
|
DropdownComponent.prototype.onItemSelect = function (index) {
|
|
@@ -6224,12 +6446,17 @@
|
|
|
6224
6446
|
this.elementRef.nativeElement.blur();
|
|
6225
6447
|
}
|
|
6226
6448
|
};
|
|
6227
|
-
DropdownComponent.prototype.
|
|
6228
|
-
|
|
6449
|
+
DropdownComponent.prototype._onPopoverWillHide = function () {
|
|
6450
|
+
this.state = OpenState.closed;
|
|
6451
|
+
this.elementRef.nativeElement.focus();
|
|
6452
|
+
};
|
|
6453
|
+
DropdownComponent.prototype._onBlur = function (event) {
|
|
6454
|
+
if (this.disabled)
|
|
6229
6455
|
return;
|
|
6230
|
-
}
|
|
6231
6456
|
if (this.isOpen) {
|
|
6232
|
-
this.
|
|
6457
|
+
if (!this.cardElement.nativeElement.contains(event === null || event === void 0 ? void 0 : event.relatedTarget)) {
|
|
6458
|
+
this.close();
|
|
6459
|
+
}
|
|
6233
6460
|
}
|
|
6234
6461
|
this._onTouched();
|
|
6235
6462
|
};
|
|
@@ -6246,50 +6473,26 @@
|
|
|
6246
6473
|
this.toggle();
|
|
6247
6474
|
};
|
|
6248
6475
|
DropdownComponent.prototype._onArrowKeys = function (event) {
|
|
6249
|
-
if (this.disabled)
|
|
6476
|
+
if (this.disabled)
|
|
6250
6477
|
return;
|
|
6251
|
-
|
|
6478
|
+
// Mirror default HTML5 select behaviour - prevent left/right arrows when open:
|
|
6252
6479
|
if (this.isOpen && (event.key === 'ArrowLeft' || event.key === 'ArrowRight')) {
|
|
6253
|
-
// Mirror default HTML5 select behaviour - prevent left/right arrows when open:
|
|
6254
6480
|
return;
|
|
6255
6481
|
}
|
|
6256
|
-
event.
|
|
6257
|
-
var newIndex = -1;
|
|
6258
|
-
if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {
|
|
6259
|
-
// Select previous item:
|
|
6260
|
-
newIndex = this.selectedIndex - 1;
|
|
6261
|
-
}
|
|
6262
|
-
if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {
|
|
6263
|
-
if (this.selectedIndex === undefined) {
|
|
6264
|
-
// None selected, select first item:
|
|
6265
|
-
newIndex = 0;
|
|
6266
|
-
}
|
|
6267
|
-
else if (this.selectedIndex < this.items.length - 1) {
|
|
6268
|
-
// Select next item:
|
|
6269
|
-
newIndex = this.selectedIndex + 1;
|
|
6270
|
-
}
|
|
6271
|
-
}
|
|
6482
|
+
var newIndex = this.keyboardHandlerService.handle(event, this.items, this.selectedIndex);
|
|
6272
6483
|
if (newIndex > -1) {
|
|
6273
6484
|
this.selectItem(newIndex);
|
|
6274
6485
|
}
|
|
6486
|
+
return false;
|
|
6275
6487
|
};
|
|
6276
6488
|
DropdownComponent.prototype._onHomeEndKeys = function (event) {
|
|
6277
|
-
|
|
6278
|
-
if (this.disabled) {
|
|
6489
|
+
if (this.disabled)
|
|
6279
6490
|
return;
|
|
6280
|
-
|
|
6281
|
-
var newIndex = -1;
|
|
6282
|
-
if (event.key === 'Home') {
|
|
6283
|
-
// Select first item:
|
|
6284
|
-
newIndex = 0;
|
|
6285
|
-
}
|
|
6286
|
-
if (event.key === 'End') {
|
|
6287
|
-
// Select last item:
|
|
6288
|
-
newIndex = this.items.length - 1;
|
|
6289
|
-
}
|
|
6491
|
+
var newIndex = this.keyboardHandlerService.handle(event, this.items, this.selectedIndex);
|
|
6290
6492
|
if (newIndex > -1) {
|
|
6291
6493
|
this.selectItem(newIndex);
|
|
6292
6494
|
}
|
|
6495
|
+
return false;
|
|
6293
6496
|
};
|
|
6294
6497
|
DropdownComponent.prototype.ngOnDestroy = function () {
|
|
6295
6498
|
var unlisten;
|
|
@@ -6306,7 +6509,7 @@
|
|
|
6306
6509
|
DropdownComponent.decorators = [
|
|
6307
6510
|
{ type: i0.Component, args: [{
|
|
6308
6511
|
selector: 'kirby-dropdown',
|
|
6309
|
-
template: "<button\n kirby-button\n [size]=\"size\"\n [attentionLevel]=\"isOpen ? attentionLevelOpen : attentionLevel\"\n tabindex=\"-1\"\n (click)=\"onToggle($event)\"\n (mousedown)=\"onButtonMouseEvent($event)\"\n [disabled]=\"disabled\"\n>\n <span class=\"text\">{{ selectedText || placeholder }}</span>\n <kirby-icon [name]=\"isOpen ? 'arrow-up' : 'arrow-down'\"></kirby-icon>\n</button>\n<kirby-
|
|
6512
|
+
template: "<button\n kirby-button\n [size]=\"size\"\n [attentionLevel]=\"isOpen ? attentionLevelOpen : attentionLevel\"\n tabindex=\"-1\"\n (click)=\"onToggle($event)\"\n (mousedown)=\"onButtonMouseEvent($event)\"\n [disabled]=\"disabled\"\n>\n <span class=\"text\">{{ selectedText || placeholder }}</span>\n <kirby-icon [name]=\"isOpen ? 'arrow-up' : 'arrow-down'\"></kirby-icon>\n</button>\n\n<ng-container *ngTemplateOutlet=\"usePopover ? popoverTemplate : itemWrapperTemplate\"></ng-container>\n\n<ng-template #popoverTemplate>\n <kirby-popover [target]=\"buttonElement\" [popout]=\"popout\" (willHide)=\"_onPopoverWillHide()\">\n <ng-container *ngTemplateOutlet=\"itemWrapperTemplate\"></ng-container>\n </kirby-popover>\n</ng-template>\n\n<ng-template #itemWrapperTemplate>\n <kirby-card>\n <ng-container *ngFor=\"let item of items; let i = index\">\n <ng-container\n *ngTemplateOutlet=\"\n itemTemplate || defaultItemTemplate;\n context: { $implicit: item, selected: i === selectedIndex, index: i }\n \"\n ></ng-container>\n </ng-container>\n </kirby-card>\n</ng-template>\n\n<ng-template #defaultItemTemplate let-item let-selected=\"selected\" let-index=\"index\">\n <kirby-item [selectable]=\"true\" [selected]=\"selected\" (click)=\"onItemSelect(index)\" role=\"option\">\n <!-- Tabindex fixes issue with popover dropdown not working in safari -->\n <h3 tabindex=\"0\">{{ getTextFromItem(item) }}</h3>\n <kirby-icon *ngIf=\"selected\" name=\"checkmark-selected\" slot=\"end\"></kirby-icon>\n </kirby-item>\n</ng-template>\n",
|
|
6310
6513
|
providers: [
|
|
6311
6514
|
{
|
|
6312
6515
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -6314,14 +6517,15 @@
|
|
|
6314
6517
|
multi: true,
|
|
6315
6518
|
},
|
|
6316
6519
|
],
|
|
6317
|
-
styles: [":host{
|
|
6520
|
+
styles: [":host{display:inline-block;position:relative;max-width:calc(100vw - 32px);outline:none}:host.expand{display:block}:host.expand kirby-card{width:100%;min-width:0;max-width:none}@media (hover:hover){:host:focus>button,:host:focus>button.attention-level3{border-color:#4d90fe}}:host.error>button,:host.ng-touched.ng-invalid>button{border-color:var(--kirby-danger)}:host>button{position:relative;margin:0;outline:none;width:100%;transition:box-shadow .2s,border-color .2s}:host>button.attention-level2{border:1px solid transparent}:host>button .text{overflow:hidden;text-overflow:ellipsis}kirby-popover{--max-height:352px}kirby-card{max-height:352px;margin-top:4px;margin-bottom:4px;overflow-y:auto;box-shadow:0 20px 30px -15px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);min-width:288px;max-width:calc(100vw - 32px)}@media (min-width:321px){kirby-card{min-width:343px}}:host(:not(.with-popover)) kirby-card{display:none;opacity:0;position:absolute;z-index:800}:host(:not(.with-popover)).is-opening kirby-card{display:block}:host(:not(.with-popover)).is-open kirby-card{display:block;opacity:1}:host(:not(.with-popover)).popout-left kirby-card{right:0}:host(:not(.with-popover)).popout-up kirby-card{top:0;margin-top:-4px;transform:translateY(-100%)}:host(:not(.with-popover)).popout-up.is-open>button{z-index:801}:host(.is-open)>button{box-shadow:0 20px 30px -15px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08)}:host-context(kirby-calendar)>button{border-color:transparent;font-weight:700;font-size:medium}:host-context(kirby-calendar).is-open>button{box-shadow:none}"]
|
|
6318
6521
|
},] }
|
|
6319
6522
|
];
|
|
6320
6523
|
/** @nocollapse */
|
|
6321
6524
|
DropdownComponent.ctorParameters = function () { return [
|
|
6322
6525
|
{ type: i0.Renderer2 },
|
|
6323
6526
|
{ type: i0.ElementRef },
|
|
6324
|
-
{ type: i0.ChangeDetectorRef }
|
|
6527
|
+
{ type: i0.ChangeDetectorRef },
|
|
6528
|
+
{ type: KeyboardHandlerService }
|
|
6325
6529
|
]; };
|
|
6326
6530
|
DropdownComponent.propDecorators = {
|
|
6327
6531
|
items: [{ type: i0.Input }],
|
|
@@ -6336,6 +6540,7 @@
|
|
|
6336
6540
|
hasError: [{ type: i0.HostBinding, args: ['class.error',] }, { type: i0.Input }],
|
|
6337
6541
|
size: [{ type: i0.Input }],
|
|
6338
6542
|
tabindex: [{ type: i0.Input }],
|
|
6543
|
+
usePopover: [{ type: i0.HostBinding, args: ['class.with-popover',] }, { type: i0.Input }],
|
|
6339
6544
|
_tabindex: [{ type: i0.HostBinding, args: ['attr.tabindex',] }],
|
|
6340
6545
|
_noBlurOnScroll: [{ type: i0.HostBinding, args: ['attr.no-blur',] }],
|
|
6341
6546
|
change: [{ type: i0.Output }],
|
|
@@ -6347,13 +6552,15 @@
|
|
|
6347
6552
|
_popoutUp: [{ type: i0.HostBinding, args: ['class.popout-up',] }],
|
|
6348
6553
|
itemTemplate: [{ type: i0.ContentChild, args: [ListItemTemplateDirective, { static: true, read: i0.TemplateRef },] }],
|
|
6349
6554
|
slottedItems: [{ type: i0.ContentChildren, args: [ListItemTemplateDirective, { read: i0.ElementRef },] }],
|
|
6350
|
-
cardElement: [{ type: i0.ViewChild, args: [CardComponent, {
|
|
6555
|
+
cardElement: [{ type: i0.ViewChild, args: [CardComponent, { read: i0.ElementRef },] }],
|
|
6556
|
+
popover: [{ type: i0.ViewChild, args: [PopoverComponent,] }],
|
|
6557
|
+
buttonElement: [{ type: i0.ViewChild, args: [ButtonComponent, { static: true, read: i0.ElementRef },] }],
|
|
6351
6558
|
kirbyItemsDefault: [{ type: i0.ViewChildren, args: [ItemComponent, { read: i0.ElementRef },] }],
|
|
6352
6559
|
kirbyItemsSlotted: [{ type: i0.ContentChildren, args: [ItemComponent, { read: i0.ElementRef },] }],
|
|
6353
6560
|
_onTab: [{ type: i0.HostListener, args: ['keydown.tab', ['$event'],] }],
|
|
6354
6561
|
_onMouseDown: [{ type: i0.HostListener, args: ['mousedown', ['$event'],] }],
|
|
6355
6562
|
_onFocus: [{ type: i0.HostListener, args: ['focus',] }],
|
|
6356
|
-
_onBlur: [{ type: i0.HostListener, args: ['keydown.enter',] }, { type: i0.HostListener, args: ['keydown.escape',] }, { type: i0.HostListener, args: ['blur',] }],
|
|
6563
|
+
_onBlur: [{ type: i0.HostListener, args: ['keydown.enter',] }, { type: i0.HostListener, args: ['keydown.escape',] }, { type: i0.HostListener, args: ['blur', ['$event'],] }],
|
|
6357
6564
|
_onSpace: [{ type: i0.HostListener, args: ['keydown.space', ['$event'],] }],
|
|
6358
6565
|
_onEnter: [{ type: i0.HostListener, args: ['keydown.enter', ['$event'],] }],
|
|
6359
6566
|
_onArrowKeys: [{ type: i0.HostListener, args: ['keydown.arrowup', ['$event'],] }, { type: i0.HostListener, args: ['keydown.arrowdown', ['$event'],] }, { type: i0.HostListener, args: ['keydown.arrowleft', ['$event'],] }, { type: i0.HostListener, args: ['keydown.arrowright', ['$event'],] }],
|
|
@@ -9999,6 +10206,7 @@
|
|
|
9999
10206
|
ModalWrapperComponent,
|
|
10000
10207
|
ModalCompactWrapperComponent,
|
|
10001
10208
|
ProgressCircleRingComponent,
|
|
10209
|
+
PopoverComponent,
|
|
10002
10210
|
]);
|
|
10003
10211
|
var exportedModules = [
|
|
10004
10212
|
AppModule,
|
|
@@ -10171,6 +10379,7 @@
|
|
|
10171
10379
|
exports.PageTitleDirective = PageTitleDirective;
|
|
10172
10380
|
exports.PageToolbarTitleDirective = PageToolbarTitleDirective;
|
|
10173
10381
|
exports.PlatformService = PlatformService;
|
|
10382
|
+
exports.PopoverComponent = PopoverComponent;
|
|
10174
10383
|
exports.ProgressCircleComponent = ProgressCircleComponent;
|
|
10175
10384
|
exports.RadioComponent = RadioComponent;
|
|
10176
10385
|
exports.RadioGroupComponent = RadioGroupComponent;
|
|
@@ -10294,22 +10503,24 @@
|
|
|
10294
10503
|
exports.ɵec = DividerComponent;
|
|
10295
10504
|
exports.ɵed = ReorderListComponent;
|
|
10296
10505
|
exports.ɵee = DropdownComponent;
|
|
10297
|
-
exports.ɵef =
|
|
10298
|
-
exports.ɵeg =
|
|
10299
|
-
exports.ɵeh =
|
|
10300
|
-
exports.ɵei =
|
|
10301
|
-
exports.ɵej =
|
|
10302
|
-
exports.ɵek =
|
|
10303
|
-
exports.ɵel =
|
|
10304
|
-
exports.ɵem =
|
|
10305
|
-
exports.ɵen =
|
|
10306
|
-
exports.ɵeo =
|
|
10307
|
-
exports.ɵep =
|
|
10308
|
-
exports.ɵeq =
|
|
10309
|
-
exports.ɵer =
|
|
10310
|
-
exports.ɵes =
|
|
10311
|
-
exports.ɵet =
|
|
10312
|
-
exports.ɵeu =
|
|
10506
|
+
exports.ɵef = PopoverComponent;
|
|
10507
|
+
exports.ɵeg = KeyboardHandlerService;
|
|
10508
|
+
exports.ɵeh = LoadingOverlayComponent;
|
|
10509
|
+
exports.ɵei = ProgressCircleComponent;
|
|
10510
|
+
exports.ɵej = FlagComponent;
|
|
10511
|
+
exports.ɵek = SlideDirective;
|
|
10512
|
+
exports.ɵel = SlidesComponent;
|
|
10513
|
+
exports.ɵem = AccordionDirective;
|
|
10514
|
+
exports.ɵen = AccordionItemComponent;
|
|
10515
|
+
exports.ɵeo = RangeComponent;
|
|
10516
|
+
exports.ɵep = KeyHandlerDirective;
|
|
10517
|
+
exports.ɵeq = FormFieldMessageComponent;
|
|
10518
|
+
exports.ɵer = AlertComponent;
|
|
10519
|
+
exports.ɵes = ModalCompactWrapperComponent;
|
|
10520
|
+
exports.ɵet = ProgressCircleRingComponent;
|
|
10521
|
+
exports.ɵeu = ToastHelper;
|
|
10522
|
+
exports.ɵev = ToastController;
|
|
10523
|
+
exports.ɵew = LoadingOverlayService;
|
|
10313
10524
|
exports.ɵf = ModalAnimationBuilderService;
|
|
10314
10525
|
exports.ɵg = PlatformService;
|
|
10315
10526
|
exports.ɵh = WindowRef;
|