@kirbydesign/designsystem 4.0.14 → 4.0.18
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.umd.js +56 -14
- 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 +11 -10
- package/esm2015/kirbydesign-designsystem.metadata.json +1 -1
- package/esm2015/lib/components/card/card.component.js +3 -3
- package/esm2015/lib/components/card/card.component.metadata.json +1 -1
- package/esm2015/lib/components/reorder-list/reorder-list.component.js +9 -3
- package/esm2015/lib/components/reorder-list/reorder-list.component.metadata.json +1 -1
- package/esm2015/lib/components/segmented-control/segmented-control.component.js +2 -2
- package/esm2015/lib/components/tabs/tab-button/tab-button.component.js +1 -1
- package/esm2015/lib/components/tabs/tab-button/tab-button.component.metadata.json +1 -1
- package/esm2015/lib/directives/element-as-button/element-as-button.directive.js +35 -0
- package/esm2015/lib/directives/element-as-button/element-as-button.directive.metadata.json +1 -0
- package/esm2015/lib/kirby.module.js +3 -1
- package/esm2015/lib/kirby.module.metadata.json +1 -1
- package/fesm2015/kirbydesign-designsystem.js +45 -5
- package/fesm2015/kirbydesign-designsystem.js.map +1 -1
- package/kirbydesign-designsystem.d.ts +10 -9
- package/kirbydesign-designsystem.metadata.json +1 -1
- package/lib/components/card/card.component.d.ts +1 -1
- package/lib/components/reorder-list/reorder-list.component.d.ts +3 -1
- package/lib/directives/element-as-button/element-as-button.directive.d.ts +11 -0
- package/package.json +1 -1
|
@@ -2881,7 +2881,7 @@
|
|
|
2881
2881
|
{ type: i0.Component, args: [{
|
|
2882
2882
|
selector: 'kirby-card',
|
|
2883
2883
|
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",
|
|
2884
|
-
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)}"]
|
|
2884
|
+
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[role=button]{cursor:pointer;outline-offset:2px}: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)}"]
|
|
2885
2885
|
},] }
|
|
2886
2886
|
];
|
|
2887
2887
|
/** @nocollapse */
|
|
@@ -7901,7 +7901,8 @@
|
|
|
7901
7901
|
}());
|
|
7902
7902
|
|
|
7903
7903
|
var ReorderListComponent = /** @class */ (function () {
|
|
7904
|
-
function ReorderListComponent() {
|
|
7904
|
+
function ReorderListComponent(cdr) {
|
|
7905
|
+
this.cdr = cdr;
|
|
7905
7906
|
this.itemReorder = new i0.EventEmitter();
|
|
7906
7907
|
this.subItemReorder = new i0.EventEmitter();
|
|
7907
7908
|
this.reorderActive = false;
|
|
@@ -7933,6 +7934,7 @@
|
|
|
7933
7934
|
}
|
|
7934
7935
|
finally { if (e_1) throw e_1.error; }
|
|
7935
7936
|
}
|
|
7937
|
+
_this.cdr.detectChanges();
|
|
7936
7938
|
};
|
|
7937
7939
|
this.observer = new MutationObserver(callback);
|
|
7938
7940
|
this.reorderGroupContainer.forEach(function (div) {
|
|
@@ -7965,6 +7967,10 @@
|
|
|
7965
7967
|
styles: ["ion-backdrop{opacity:.3;z-index:101;position:fixed}.reorder-selected{box-shadow:none;opacity:1;z-index:104}.reorder-selected kirby-card{transform:scale(1.05)}.reorder-selected kirby-card div:first-child{border-top:1px solid var(--kirby-background-color)}.reorder-selected ::ng-deep>kirby-item{box-shadow:0 0 10px rgba(0,0,0,.4);transform:scale(1.05);border-radius:16px;overflow:hidden}.reorder-list-active>*{position:relative;z-index:103}.reorder-list-active>.reorder-selected{z-index:104}.reorder-list-active div:first-child{border-top:none}.reorder-list-active ::ng-deep>div:last-child kirby-item{border-bottom-left-radius:16px;border-bottom-right-radius:16px;overflow:hidden}.reorder-list-active .reorder-selected ::ng-deep>kirby-item{box-shadow:0 0 10px rgba(0,0,0,.4);transform:scale(1.05);border-radius:16px;overflow:hidden}.outerGroup{border-bottom:20px solid transparent}kirby-card{overflow:inherit;z-index:auto}kirby-card ::ng-deep>div:last-child ion-reorder-group div:last-child>kirby-item{border-bottom-left-radius:16px;border-bottom-right-radius:16px;overflow:hidden}kirby-card ::ng-deep>div kirby-item{z-index:1}kirby-card ::ng-deep>div:first-child>kirby-item{border-radius:16px;overflow:hidden}kirby-card ::ng-deep>div .reorder-list-active kirby-item{z-index:103}kirby-card div:first-child{border-top:1px solid var(--kirby-background-color)}"]
|
|
7966
7968
|
},] }
|
|
7967
7969
|
];
|
|
7970
|
+
/** @nocollapse */
|
|
7971
|
+
ReorderListComponent.ctorParameters = function () { return [
|
|
7972
|
+
{ type: i0.ChangeDetectorRef }
|
|
7973
|
+
]; };
|
|
7968
7974
|
ReorderListComponent.propDecorators = {
|
|
7969
7975
|
items: [{ type: i0.Input }],
|
|
7970
7976
|
subItemsName: [{ type: i0.Input }],
|
|
@@ -8687,7 +8693,7 @@
|
|
|
8687
8693
|
var _this = this;
|
|
8688
8694
|
this._items = value || [];
|
|
8689
8695
|
this._items.forEach(function (item) {
|
|
8690
|
-
if (item.badge
|
|
8696
|
+
if (!item.badge)
|
|
8691
8697
|
return;
|
|
8692
8698
|
// We need to verify whether badges icon is custom or default, so we can check for it in the template
|
|
8693
8699
|
item.badge.isCustomIcon =
|
|
@@ -8875,7 +8881,7 @@
|
|
|
8875
8881
|
{ type: i0.Component, args: [{
|
|
8876
8882
|
selector: 'kirby-tab-button',
|
|
8877
8883
|
template: "<ion-tab-button #ionTabButton [tab]=\"routerLink\" (click)=\"onClick($event, ionTabButton.selected)\">\n <div class=\"icon-container\" *ngIf=\"icons.length\">\n <ng-content\n *ngIf=\"icons.length === 1 || !ionTabButton.selected\"\n select=\"kirby-icon[:not([selected-tab])]\"\n ></ng-content>\n <ng-content *ngIf=\"ionTabButton.selected\" select=\"kirby-icon[selected-tab]\"></ng-content>\n <ng-content select=\"kirby-badge\"></ng-content>\n </div>\n <ion-label>\n <ng-content></ng-content>\n </ion-label>\n</ion-tab-button>\n",
|
|
8878
|
-
styles: ["ion-tab-button{height:100%;flex:1 1 0%;max-width:168px;font-size:10px;--color-selected:get-color(\"black\");--kirby-badge-position:absolute;--kirby-badge-
|
|
8884
|
+
styles: ["ion-tab-button{height:100%;flex:1 1 0%;max-width:168px;font-size:10px;--color-selected:get-color(\"black\");--kirby-badge-position:absolute;--kirby-badge-top:0;--kirby-badge-right:0}ion-tab-button ::ng-deep>div kirby-badge.md{--kirby-badge-top:-5px;--kirby-badge-right:-5px}ion-tab-button .icon-container{position:relative}@media (min-width:721px){ion-tab-button{flex:none;padding:0 24px;margin-right:24px;font-size:14px;flex-direction:row}ion-tab-button:last-child{margin-right:0}ion-tab-button .icon-container{margin-right:8px}}@media (min-width:1025px) and (hover:hover) and (pointer:fine){ion-tab-button{padding:0 12px;margin-right:0}}"]
|
|
8879
8885
|
},] }
|
|
8880
8886
|
];
|
|
8881
8887
|
/** @nocollapse */
|
|
@@ -9757,6 +9763,40 @@
|
|
|
9757
9763
|
};
|
|
9758
9764
|
}
|
|
9759
9765
|
|
|
9766
|
+
var ElementAsButtonDirective = /** @class */ (function () {
|
|
9767
|
+
function ElementAsButtonDirective(card, clickableElement) {
|
|
9768
|
+
this.card = card;
|
|
9769
|
+
this.clickableElement = clickableElement;
|
|
9770
|
+
this.role = 'button';
|
|
9771
|
+
this.tabindex = 0;
|
|
9772
|
+
}
|
|
9773
|
+
ElementAsButtonDirective.prototype.ngOnInit = function () {
|
|
9774
|
+
if (this.card) {
|
|
9775
|
+
this.card.flat = false;
|
|
9776
|
+
}
|
|
9777
|
+
};
|
|
9778
|
+
ElementAsButtonDirective.prototype._onKeydownHandler = function (event) {
|
|
9779
|
+
this.clickableElement.nativeElement.click(event);
|
|
9780
|
+
};
|
|
9781
|
+
return ElementAsButtonDirective;
|
|
9782
|
+
}());
|
|
9783
|
+
ElementAsButtonDirective.decorators = [
|
|
9784
|
+
{ type: i0.Directive, args: [{
|
|
9785
|
+
// tslint:disable-next-line
|
|
9786
|
+
selector: 'kirby-card[click]',
|
|
9787
|
+
},] }
|
|
9788
|
+
];
|
|
9789
|
+
/** @nocollapse */
|
|
9790
|
+
ElementAsButtonDirective.ctorParameters = function () { return [
|
|
9791
|
+
{ type: CardComponent, decorators: [{ type: i0.Optional }] },
|
|
9792
|
+
{ type: i0.ElementRef }
|
|
9793
|
+
]; };
|
|
9794
|
+
ElementAsButtonDirective.propDecorators = {
|
|
9795
|
+
role: [{ type: i0.HostBinding, args: ['attr.role',] }],
|
|
9796
|
+
tabindex: [{ type: i0.HostBinding, args: ['attr.tabindex',] }],
|
|
9797
|
+
_onKeydownHandler: [{ type: i0.HostListener, args: ['keydown.space', ['$event'],] }, { type: i0.HostListener, args: ['keydown.enter', ['$event'],] }]
|
|
9798
|
+
};
|
|
9799
|
+
|
|
9760
9800
|
var ModalRouterLinkDirective = /** @class */ (function () {
|
|
9761
9801
|
function ModalRouterLinkDirective(modalNavigationService) {
|
|
9762
9802
|
this.modalNavigationService = modalNavigationService;
|
|
@@ -9825,6 +9865,7 @@
|
|
|
9825
9865
|
RadioComponent,
|
|
9826
9866
|
RadioGroupComponent,
|
|
9827
9867
|
RangeComponent,
|
|
9868
|
+
ElementAsButtonDirective,
|
|
9828
9869
|
];
|
|
9829
9870
|
var declarations$1 = __spread(exportedDeclarations$1, [
|
|
9830
9871
|
KeyHandlerDirective,
|
|
@@ -10170,16 +10211,17 @@
|
|
|
10170
10211
|
exports.ɵem = AccordionDirective;
|
|
10171
10212
|
exports.ɵen = AccordionItemComponent;
|
|
10172
10213
|
exports.ɵeo = RangeComponent;
|
|
10173
|
-
exports.ɵep =
|
|
10174
|
-
exports.ɵeq =
|
|
10175
|
-
exports.ɵer =
|
|
10176
|
-
exports.ɵes =
|
|
10177
|
-
exports.ɵet =
|
|
10178
|
-
exports.ɵeu =
|
|
10179
|
-
exports.ɵev =
|
|
10180
|
-
exports.ɵew =
|
|
10181
|
-
exports.ɵex =
|
|
10182
|
-
exports.ɵey =
|
|
10214
|
+
exports.ɵep = ElementAsButtonDirective;
|
|
10215
|
+
exports.ɵeq = KeyHandlerDirective;
|
|
10216
|
+
exports.ɵer = FormFieldMessageComponent;
|
|
10217
|
+
exports.ɵes = AlertComponent;
|
|
10218
|
+
exports.ɵet = ModalCompactWrapperComponent;
|
|
10219
|
+
exports.ɵeu = ProgressCircleRingComponent;
|
|
10220
|
+
exports.ɵev = ToastHelper;
|
|
10221
|
+
exports.ɵew = ToastController;
|
|
10222
|
+
exports.ɵex = LoadingOverlayService;
|
|
10223
|
+
exports.ɵey = appInitialize;
|
|
10224
|
+
exports.ɵez = customElementsInitializer;
|
|
10183
10225
|
exports.ɵf = ModalHelper;
|
|
10184
10226
|
exports.ɵg = ModalAnimationBuilderService;
|
|
10185
10227
|
exports.ɵh = PlatformService;
|