@kirbydesign/designsystem 5.0.22 → 5.2.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 +3 -1
- 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 +84 -38
- 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/lib/components/calendar/calendar.component.js +8 -2
- package/esm2015/lib/components/calendar/calendar.component.metadata.json +1 -1
- package/esm2015/lib/components/card/card.component.js +7 -2
- package/esm2015/lib/components/card/card.component.metadata.json +1 -1
- package/esm2015/lib/components/chart/chart-js/chart-js.service.js +22 -6
- package/esm2015/lib/components/chart/chart-js/configured-chart-js.js +4 -3
- package/esm2015/lib/components/chart/chart-js/configured-chart-js.metadata.json +1 -1
- package/esm2015/lib/components/chart/chart.component.js +24 -20
- package/esm2015/lib/components/chart/chart.component.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/item-sliding/item-sliding.component.js +1 -1
- package/esm2015/lib/components/item-sliding/item-sliding.component.metadata.json +1 -1
- package/esm2015/lib/components/list/list-experimental/list-experimental.component.js +3 -2
- package/esm2015/lib/components/list/list-experimental/list-experimental.component.metadata.json +1 -1
- package/esm2015/lib/components/modal/footer/modal-footer.component.js +6 -4
- package/esm2015/lib/components/modal/footer/modal-footer.component.metadata.json +1 -1
- package/esm2015/lib/directives/fit-heading/fit-heading.directive.js +10 -2
- package/esm2015/testing-base/lib/components/mock.card.component.js +2 -1
- package/esm2015/testing-base/lib/components/mock.card.component.metadata.json +1 -1
- package/esm2015/testing-base/lib/components/mock.modal-footer.component.js +3 -2
- package/esm2015/testing-base/lib/components/mock.modal-footer.component.metadata.json +1 -1
- package/fesm2015/kirbydesign-designsystem-testing-base.js +3 -1
- package/fesm2015/kirbydesign-designsystem-testing-base.js.map +1 -1
- package/fesm2015/kirbydesign-designsystem.js +77 -34
- package/fesm2015/kirbydesign-designsystem.js.map +1 -1
- package/kirbydesign-designsystem.metadata.json +1 -1
- package/lib/components/calendar/calendar.component.d.ts +1 -0
- package/lib/components/card/card.component.d.ts +2 -0
- package/lib/components/chart/chart-js/configured-chart-js.d.ts +1 -0
- package/lib/components/chart/chart.component.d.ts +1 -0
- package/lib/components/modal/footer/modal-footer.component.d.ts +1 -0
- package/package.json +2 -2
- package/readme.md +2 -7
- package/scss/base/_html-list.scss +1 -0
- package/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
- package/testing-base/lib/components/mock.card.component.d.ts +1 -0
- package/testing-base/lib/components/mock.modal-footer.component.d.ts +1 -0
|
@@ -11,8 +11,9 @@ import * as Highcharts from 'highcharts';
|
|
|
11
11
|
import { chart, dateFormat } from 'highcharts';
|
|
12
12
|
import { toDate, isBefore, isAfter, format, isSameMonth, startOfMonth, startOfDay, eachDayOfInterval, startOfWeek, endOfWeek, isSameDay, endOfMonth, differenceInDays, add, isWeekend, getYear } from 'date-fns';
|
|
13
13
|
import _deepCopy from 'ts-deepcopy';
|
|
14
|
-
import { CategoryScale, LinearScale, BarElement, LineElement, PointElement, BarController, LineController, Filler, Tooltip, Chart, Legend } from 'chart.js';
|
|
14
|
+
import { CategoryScale, LinearScale, TimeScale, BarElement, LineElement, PointElement, BarController, LineController, Filler, Tooltip, Chart, Legend } from 'chart.js';
|
|
15
15
|
export { Chart } from 'chart.js';
|
|
16
|
+
import 'chartjs-adapter-date-fns';
|
|
16
17
|
import annotationPlugin from 'chartjs-plugin-annotation';
|
|
17
18
|
import ChartDataLabels from 'chartjs-plugin-datalabels';
|
|
18
19
|
import { valueOrDefault } from 'chart.js/helpers';
|
|
@@ -2081,6 +2082,9 @@ class CardComponent {
|
|
|
2081
2082
|
this.flat = false;
|
|
2082
2083
|
this.highlighted = false;
|
|
2083
2084
|
}
|
|
2085
|
+
set backgroundImageUrl(value) {
|
|
2086
|
+
this._backgroundImage = `url('${value}')`;
|
|
2087
|
+
}
|
|
2084
2088
|
set sizes(value) {
|
|
2085
2089
|
if (typeof value === 'string') {
|
|
2086
2090
|
console.error('Sizes property cannot be a string. Please ensure the size property is bound as an expression:\n[sizes]="{...}"');
|
|
@@ -2123,7 +2127,7 @@ CardComponent.decorators = [
|
|
|
2123
2127
|
{ type: Component, args: [{
|
|
2124
2128
|
selector: 'kirby-card',
|
|
2125
2129
|
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",
|
|
2126
|
-
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)}"]
|
|
2130
|
+
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);background-image:var(--kirby-card-background-image);background-repeat:var(--kirby-card-background-repeat,no-repeat);background-position:var(--kirby-card-background-position,center);background-size:var(--kirby-card-background-size,cover);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)}"]
|
|
2127
2131
|
},] }
|
|
2128
2132
|
];
|
|
2129
2133
|
/** @nocollapse */
|
|
@@ -2135,6 +2139,8 @@ CardComponent.ctorParameters = () => [
|
|
|
2135
2139
|
CardComponent.propDecorators = {
|
|
2136
2140
|
title: [{ type: Input }],
|
|
2137
2141
|
subtitle: [{ type: Input }],
|
|
2142
|
+
_backgroundImage: [{ type: HostBinding, args: ['style.--kirby-card-background-image',] }],
|
|
2143
|
+
backgroundImageUrl: [{ type: Input }],
|
|
2138
2144
|
hasPadding: [{ type: Input }],
|
|
2139
2145
|
sizes: [{ type: Input }],
|
|
2140
2146
|
flat: [{ type: HostBinding, args: ['class.flat',] }],
|
|
@@ -3651,7 +3657,7 @@ const CHART_GLOBAL_DEFAULTS = {
|
|
|
3651
3657
|
},
|
|
3652
3658
|
};
|
|
3653
3659
|
|
|
3654
|
-
const CHART_SCALES = [CategoryScale, LinearScale];
|
|
3660
|
+
const CHART_SCALES = [CategoryScale, LinearScale, TimeScale];
|
|
3655
3661
|
const CHART_ELEMENTS = [BarElement, LineElement, PointElement];
|
|
3656
3662
|
const CHART_CONTROLLERS = [BarController, LineController];
|
|
3657
3663
|
const CHART_PLUGINS = [annotationPlugin, Filler, ChartDataLabels, Tooltip, MarkerPlugin];
|
|
@@ -3854,12 +3860,28 @@ class ChartJSService {
|
|
|
3854
3860
|
createConfigurationObject(type, datasets, options, labels) {
|
|
3855
3861
|
const typeConfig = this.chartConfigService.getTypeConfig(type);
|
|
3856
3862
|
const labelsToApply = (() => {
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3863
|
+
var _a, _b;
|
|
3864
|
+
if (type === 'stock') {
|
|
3865
|
+
/*
|
|
3866
|
+
The time scale will auto generate labels based on data.
|
|
3867
|
+
It should be possible to pass an empty array to get the default
|
|
3868
|
+
behaviour of chart.js when using stock chart.
|
|
3869
|
+
|
|
3870
|
+
TODO: Simplify to always pass labels, if given, to chart.js.
|
|
3871
|
+
Would be a breaking change. See issue:
|
|
3872
|
+
https://github.com/kirbydesign/designsystem/issues/2085
|
|
3873
|
+
*/
|
|
3874
|
+
const shouldUseTimescaleLabels = (labels === null || labels === void 0 ? void 0 : labels.length) === 0 && ((_b = (_a = options === null || options === void 0 ? void 0 : options.scales) === null || _a === void 0 ? void 0 : _a.x) === null || _b === void 0 ? void 0 : _b.type) === 'time';
|
|
3875
|
+
if (shouldUseTimescaleLabels)
|
|
3876
|
+
return labels;
|
|
3860
3877
|
return this.getDefaultStockLabels(datasets, this.locale);
|
|
3861
|
-
|
|
3862
|
-
|
|
3878
|
+
}
|
|
3879
|
+
else if ((labels === null || labels === void 0 ? void 0 : labels.length) > 0) {
|
|
3880
|
+
return labels;
|
|
3881
|
+
}
|
|
3882
|
+
else {
|
|
3883
|
+
return this.createBlankLabels(datasets);
|
|
3884
|
+
}
|
|
3863
3885
|
})();
|
|
3864
3886
|
return mergeDeepAll(typeConfig, {
|
|
3865
3887
|
data: {
|
|
@@ -3962,6 +3984,7 @@ class ChartComponent {
|
|
|
3962
3984
|
constructor(chartJSService) {
|
|
3963
3985
|
this.chartJSService = chartJSService;
|
|
3964
3986
|
this.type = 'column';
|
|
3987
|
+
this.chartHasBeenRendered = false;
|
|
3965
3988
|
}
|
|
3966
3989
|
get labels() {
|
|
3967
3990
|
return this._labels;
|
|
@@ -4002,27 +4025,30 @@ class ChartComponent {
|
|
|
4002
4025
|
});
|
|
4003
4026
|
}
|
|
4004
4027
|
ngOnChanges(simpleChanges) {
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4028
|
+
if (this.chartHasBeenRendered) {
|
|
4029
|
+
let shouldRedrawChart = false;
|
|
4030
|
+
// TODO: Remove 'dataLabels' key when the input property is removed
|
|
4031
|
+
const keyUpdateFnPairs = {
|
|
4032
|
+
data: () => this.updateData(),
|
|
4033
|
+
dataLabels: () => this.updateLabels(),
|
|
4034
|
+
labels: () => this.updateLabels(),
|
|
4035
|
+
type: () => this.updateType(),
|
|
4036
|
+
customOptions: () => this.updateCustomOptions(),
|
|
4037
|
+
annotations: () => this.updateAnnotations(),
|
|
4038
|
+
highlightedElements: () => this.updateHighlightedElements(),
|
|
4039
|
+
};
|
|
4040
|
+
Object.entries(simpleChanges).forEach(([key]) => {
|
|
4041
|
+
if (simpleChanges[key].firstChange || !keyUpdateFnPairs[key])
|
|
4042
|
+
return;
|
|
4043
|
+
shouldRedrawChart = true;
|
|
4044
|
+
keyUpdateFnPairs[key]();
|
|
4045
|
+
});
|
|
4046
|
+
if (shouldRedrawChart)
|
|
4047
|
+
this.redrawChart();
|
|
4048
|
+
}
|
|
4024
4049
|
}
|
|
4025
4050
|
renderChart() {
|
|
4051
|
+
this.chartHasBeenRendered = true;
|
|
4026
4052
|
this.chartJSService.renderChart({
|
|
4027
4053
|
targetElement: this.canvasElement,
|
|
4028
4054
|
type: this.type,
|
|
@@ -4441,6 +4467,11 @@ class CalendarComponent {
|
|
|
4441
4467
|
this.disableFutureDates = false;
|
|
4442
4468
|
this.alwaysEnableToday = false;
|
|
4443
4469
|
this.customLocales = {};
|
|
4470
|
+
/*
|
|
4471
|
+
Experimental: Input property not documented on purpose.
|
|
4472
|
+
For context see: https://github.com/kirbydesign/designsystem/issues/2087
|
|
4473
|
+
*/
|
|
4474
|
+
this.usePopover = false;
|
|
4444
4475
|
this._disabledDates = [];
|
|
4445
4476
|
this.includedLocales = { da, enGB, enUS };
|
|
4446
4477
|
this.locale = this.mapLocale(locale);
|
|
@@ -4770,7 +4801,7 @@ class CalendarComponent {
|
|
|
4770
4801
|
CalendarComponent.decorators = [
|
|
4771
4802
|
{ type: Component, args: [{
|
|
4772
4803
|
selector: 'kirby-calendar',
|
|
4773
|
-
template: "<div class=\"header\">\n <div class=\"month-navigator\">\n <button [disabled]=\"!_canNavigateBack\" (click)=\"_changeMonth(-1)\">\n <kirby-icon name=\"arrow-back\"></kirby-icon>\n </button>\n\n <div class=\"month-and-year\">\n <span class=\"month\">{{ activeMonthName }}</span\n ><span *ngIf=\"!_hasYearNavigator\" class=\"year\">{{ activeYear }}</span>\n </div>\n\n <button [disabled]=\"!_canNavigateForward\" (click)=\"_changeMonth(1)\">\n <kirby-icon name=\"arrow-more\"></kirby-icon>\n </button>\n </div>\n <kirby-dropdown\n *ngIf=\"_hasYearNavigator\"\n [selectedIndex]=\"navigatedYear\"\n [items]=\"navigableYears\"\n popout=\"left\"\n (change)=\"_changeYear($event)\"\n >\n </kirby-dropdown>\n</div>\n\n<table>\n <thead>\n <tr>\n <th *ngFor=\"let weekDay of _weekDays\">{{ weekDay }}</th>\n </tr>\n </thead>\n\n <tbody>\n <tr *ngFor=\"let week of _month\">\n <td *ngFor=\"let day of week\">\n <div\n (click)=\"_onDateSelected(day)\"\n class=\"{{ day.cssClasses }}\"\n [class.selected]=\"day.isSelected\"\n >\n {{ day.date }}\n </div>\n </td>\n </tr>\n </tbody>\n</table>\n\n<!-- <iframe src=\"kirby/components/calendar/calendar.webview.html\" #calendarContainer style=\"width: 320px; height: 304px; border: 0\"> -->\n",
|
|
4804
|
+
template: "<div class=\"header\">\n <div class=\"month-navigator\">\n <button [disabled]=\"!_canNavigateBack\" (click)=\"_changeMonth(-1)\">\n <kirby-icon name=\"arrow-back\"></kirby-icon>\n </button>\n\n <div class=\"month-and-year\">\n <span class=\"month\">{{ activeMonthName }}</span\n ><span *ngIf=\"!_hasYearNavigator\" class=\"year\">{{ activeYear }}</span>\n </div>\n\n <button [disabled]=\"!_canNavigateForward\" (click)=\"_changeMonth(1)\">\n <kirby-icon name=\"arrow-more\"></kirby-icon>\n </button>\n </div>\n <kirby-dropdown\n *ngIf=\"_hasYearNavigator\"\n [usePopover]=\"usePopover\"\n [selectedIndex]=\"navigatedYear\"\n [items]=\"navigableYears\"\n popout=\"left\"\n (change)=\"_changeYear($event)\"\n >\n </kirby-dropdown>\n</div>\n\n<table>\n <thead>\n <tr>\n <th *ngFor=\"let weekDay of _weekDays\">{{ weekDay }}</th>\n </tr>\n </thead>\n\n <tbody>\n <tr *ngFor=\"let week of _month\">\n <td *ngFor=\"let day of week\">\n <div\n (click)=\"_onDateSelected(day)\"\n class=\"{{ day.cssClasses }}\"\n [class.selected]=\"day.isSelected\"\n >\n {{ day.date }}\n </div>\n </td>\n </tr>\n </tbody>\n</table>\n\n<!-- <iframe src=\"kirby/components/calendar/calendar.webview.html\" #calendarContainer style=\"width: 320px; height: 304px; border: 0\"> -->\n",
|
|
4774
4805
|
providers: [CalendarHelper],
|
|
4775
4806
|
styles: ["table{width:100%;border-collapse:collapse;-webkit-user-select:none;user-select:none;margin-bottom:8px}td,th{text-align:center;padding:0}td:first-child,th:first-child{padding-left:8px}td:last-child,th:last-child{padding-right:8px}th{height:50px;border-bottom:1px solid var(--kirby-background-color)}.header,td,th{background-color:transparent}.header{margin:8px 8px 0}.header,.month-navigator{display:flex;justify-content:space-between}.month-navigator{flex-grow:1;align-items:center}.month-navigator button{background-color:transparent;outline:none;border:none;color:inherit;cursor:pointer;height:40px;width:40px;padding:0}.month-navigator button:disabled{opacity:.5;pointer-events:none}.month-and-year{-webkit-user-select:none;user-select:none}.month-and-year .month{font-weight:700;margin-right:8px}:host(.has-year-navigator) .month-navigator{flex-grow:0}:host(.has-year-navigator) .month-and-year{width:80px;margin:0 8px;text-align:center}:host(.has-year-navigator) .month{margin-right:0}.day{display:inline-flex;align-items:center;justify-content:center;border-radius:20px;width:40px;height:40px;margin:4px 0}.day.selectable,.day.selected{cursor:pointer}.day.disabled,.day:not(.selectable){color:var(--kirby-text-color-semi-dark)}.day.today{color:var(--kirby-medium-contrast);background-color:var(--kirby-medium)}.day.selected{color:var(--kirby-black-contrast);background-color:var(--kirby-black)}.day:not(.current-month){visibility:hidden;pointer-events:none}.day.selectable:not(.selected):hover{color:var(--kirby-light-contrast);background-color:var(--kirby-light)}"]
|
|
4776
4807
|
},] }
|
|
@@ -4791,6 +4822,7 @@ CalendarComponent.propDecorators = {
|
|
|
4791
4822
|
disableFutureDates: [{ type: Input }],
|
|
4792
4823
|
alwaysEnableToday: [{ type: Input }],
|
|
4793
4824
|
customLocales: [{ type: Input }],
|
|
4825
|
+
usePopover: [{ type: Input }],
|
|
4794
4826
|
yearNavigatorOptions: [{ type: Input }],
|
|
4795
4827
|
selectedDate: [{ type: Input }],
|
|
4796
4828
|
disabledDates: [{ type: Input }],
|
|
@@ -4818,7 +4850,7 @@ ItemSlidingComponent.decorators = [
|
|
|
4818
4850
|
{ type: Component, args: [{
|
|
4819
4851
|
selector: 'kirby-item-sliding',
|
|
4820
4852
|
template: "<ion-item-sliding>\n <ng-content></ng-content>\n\n <ion-item-options *ngIf=\"_hasSwipeActions\" [side]=\"_side\">\n <ng-container *ngFor=\"let swipeAction of swipeActions\">\n <ion-item-option\n *ngIf=\"!swipeAction.isDisabled\"\n [ngClass]=\"swipeAction.type\"\n (click)=\"swipeAction.onSelected()\"\n >\n <kirby-icon\n *ngIf=\"swipeAction.icon !== undefined\"\n [name]=\"swipeAction.icon\"\n slot=\"top\"\n ></kirby-icon>\n <ion-label>{{ swipeAction.title }}</ion-label>\n </ion-item-option>\n </ng-container>\n </ion-item-options>\n</ion-item-sliding>\n",
|
|
4821
|
-
styles: ["ion-item-option.primary{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}ion-item-option.secondary{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}ion-item-option.tertiary{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}ion-item-option.success{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}ion-item-option.warning{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}ion-item-option.danger{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}ion-item-option.light{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}ion-item-option.medium{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}ion-item-option.dark{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}ion-item-option{min-width:92px}"]
|
|
4853
|
+
styles: ["ion-item-option.primary{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}ion-item-option.secondary{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}ion-item-option.tertiary{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}ion-item-option.success{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}ion-item-option.warning{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}ion-item-option.danger{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}ion-item-option.light{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}ion-item-option.medium{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}ion-item-option.dark{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}:host{display:block}ion-item-option{min-width:92px}"]
|
|
4822
4854
|
},] }
|
|
4823
4855
|
];
|
|
4824
4856
|
ItemSlidingComponent.propDecorators = {
|
|
@@ -4939,7 +4971,7 @@ ItemComponent.decorators = [
|
|
|
4939
4971
|
{ type: Component, args: [{
|
|
4940
4972
|
selector: 'kirby-item',
|
|
4941
4973
|
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",
|
|
4942
|
-
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}"]
|
|
4974
|
+
styles: [":host{display:block;position:relative}:host ion-item{--padding-top:var(--item-padding-top,0px);--padding-bottom:var(--item-padding-bottom,0px);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}"]
|
|
4943
4975
|
},] }
|
|
4944
4976
|
];
|
|
4945
4977
|
ItemComponent.propDecorators = {
|
|
@@ -7207,7 +7239,8 @@ class ListExperimentalComponent {
|
|
|
7207
7239
|
ListExperimentalComponent.decorators = [
|
|
7208
7240
|
{ type: Component, args: [{
|
|
7209
7241
|
selector: 'kirby-list-experimental',
|
|
7210
|
-
template: "<
|
|
7242
|
+
template: "<ng-content select=\"[outside]\"></ng-content>\n<div class=\"rounded shadow first-item-padding last-item-padding\">\n <ng-content></ng-content>\n</div>\n",
|
|
7243
|
+
styles: [".rounded{border-top-left-radius:16px;border-top-right-radius:16px;border-bottom-left-radius:16px;border-bottom-right-radius:16px;overflow:hidden}.shadow{box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08)}.first-item-padding>::ng-deep :first-child{--item-padding-top:8px}.last-item-padding>::ng-deep :last-child{--item-padding-bottom:8px}.first-item{border-top-left-radius:16px;border-top-right-radius:16px;overflow:hidden}.first-item>::ng-deep :first-child{--item-padding-top:8px}.last-item{border-bottom-left-radius:16px;border-bottom-right-radius:16px;overflow:hidden}.last-item>::ng-deep :last-child{--item-padding-bottom:8px}:host{display:block}"]
|
|
7211
7244
|
},] }
|
|
7212
7245
|
];
|
|
7213
7246
|
ListExperimentalComponent.propDecorators = {
|
|
@@ -7299,17 +7332,19 @@ ReorderListComponent.propDecorators = {
|
|
|
7299
7332
|
class ModalFooterComponent {
|
|
7300
7333
|
constructor() {
|
|
7301
7334
|
this.snapToKeyboard = false;
|
|
7335
|
+
this.type = 'fixed';
|
|
7302
7336
|
}
|
|
7303
7337
|
}
|
|
7304
7338
|
ModalFooterComponent.decorators = [
|
|
7305
7339
|
{ type: Component, args: [{
|
|
7306
7340
|
selector: 'kirby-modal-footer',
|
|
7307
7341
|
template: "<ion-footer>\n <ng-content></ng-content>\n</ion-footer>\n",
|
|
7308
|
-
styles: ["ion-footer{box-shadow:0 20px 30px -15px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);display:flex;justify-content:var(--kirby-modal-footer-justify-content,center);align-items:center;background-color:var(--kirby-modal-footer-background,var(--kirby-white));color:var(--kirby-modal-footer-color,var(--kirby-white-contrast));padding:8px 16px;padding-bottom:calc(8px + var(--kirby-modal-footer-safe-area-bottom, 0px))}@media (max-width:720px){:host{--kirby-modal-footer-safe-area-bottom:var(--kirby-safe-area-bottom)}}:host-context(.modal-wrapper.full-height){--kirby-modal-footer-safe-area-bottom:var(--kirby-safe-area-bottom)}:host(.snap-to-keyboard) ion-footer{transition:transform .15s ease-out}:host-context(.keyboard-visible).snap-to-keyboard ion-footer{transition:transform .25s ease-out 1ms;transform:translateY(calc((var(--keyboard-offset, 0px) - var(--kirby-modal-footer-safe-area-bottom, 0px)) * -1))}:host(.light) ion-footer{background-color:var(--kirby-background-color)}"]
|
|
7342
|
+
styles: ["ion-footer{box-shadow:0 20px 30px -15px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);display:flex;justify-content:var(--kirby-modal-footer-justify-content,center);align-items:center;background-color:var(--kirby-modal-footer-background,var(--kirby-white));color:var(--kirby-modal-footer-color,var(--kirby-white-contrast));padding:8px 16px;padding-bottom:calc(8px + var(--kirby-modal-footer-safe-area-bottom, 0px))}@media (max-width:720px){:host{--kirby-modal-footer-safe-area-bottom:var(--kirby-safe-area-bottom)}}:host-context(.modal-wrapper.full-height){--kirby-modal-footer-safe-area-bottom:var(--kirby-safe-area-bottom)}:host(.snap-to-keyboard) ion-footer{transition:transform .15s ease-out}:host-context(.keyboard-visible).snap-to-keyboard ion-footer{transition:transform .25s ease-out 1ms;transform:translateY(calc((var(--keyboard-offset, 0px) - var(--kirby-modal-footer-safe-area-bottom, 0px)) * -1))}:host(.light) ion-footer{background-color:var(--kirby-background-color)}:host(.inline) ion-footer{background:transparent;box-shadow:none}"]
|
|
7309
7343
|
},] }
|
|
7310
7344
|
];
|
|
7311
7345
|
ModalFooterComponent.propDecorators = {
|
|
7312
|
-
snapToKeyboard: [{ type: HostBinding, args: ['class.snap-to-keyboard',] }, { type: Input }]
|
|
7346
|
+
snapToKeyboard: [{ type: HostBinding, args: ['class.snap-to-keyboard',] }, { type: Input }],
|
|
7347
|
+
type: [{ type: HostBinding, args: ['class',] }, { type: Input }]
|
|
7313
7348
|
};
|
|
7314
7349
|
|
|
7315
7350
|
const selectedTabClickEvent = 'kirbySelectedTabClick';
|
|
@@ -7800,7 +7835,15 @@ class FitHeadingDirective {
|
|
|
7800
7835
|
}
|
|
7801
7836
|
observeResize() {
|
|
7802
7837
|
this.resizeObserverService.observe(this.elementRef, () => {
|
|
7803
|
-
|
|
7838
|
+
/**
|
|
7839
|
+
* setTimeout is used here to avoid repeated size changes
|
|
7840
|
+
* while the first size change is still ongoing.
|
|
7841
|
+
* This would result in the ResizeObserver being called again,
|
|
7842
|
+
* giving 'ResizeObserver loop limit exceeded' types of errors.
|
|
7843
|
+
*/
|
|
7844
|
+
setTimeout(() => {
|
|
7845
|
+
this.scaleHeader();
|
|
7846
|
+
}, 0);
|
|
7804
7847
|
});
|
|
7805
7848
|
}
|
|
7806
7849
|
scaleHeader() {
|