@kirbydesign/designsystem 5.0.2 → 5.0.6

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.
Files changed (89) hide show
  1. package/bundles/kirbydesign-designsystem-testing-base.umd.js +86 -37
  2. package/bundles/kirbydesign-designsystem-testing-base.umd.js.map +1 -1
  3. package/bundles/kirbydesign-designsystem-testing-base.umd.min.js +1 -1
  4. package/bundles/kirbydesign-designsystem-testing-base.umd.min.js.map +1 -1
  5. package/bundles/kirbydesign-designsystem.umd.js +586 -46
  6. package/bundles/kirbydesign-designsystem.umd.js.map +1 -1
  7. package/bundles/kirbydesign-designsystem.umd.min.js +1 -1
  8. package/bundles/kirbydesign-designsystem.umd.min.js.map +1 -1
  9. package/esm2015/kirbydesign-designsystem.js +15 -13
  10. package/esm2015/kirbydesign-designsystem.metadata.json +1 -1
  11. package/esm2015/lib/components/chart/chart-js/chart-js.service.js +137 -19
  12. package/esm2015/lib/components/chart/chart-js/chart-js.service.metadata.json +1 -1
  13. package/esm2015/lib/components/chart/chart-js/chartjs-plugin-marker/chartjs-plugin-marker.js +203 -0
  14. package/esm2015/lib/components/chart/chart-js/chartjs-plugin-marker/chartjs-plugin-marker.metadata.json +1 -0
  15. package/esm2015/lib/components/chart/chart-js/configured-chart-js.js +5 -3
  16. package/esm2015/lib/components/chart/chart-js/configured-chart-js.metadata.json +1 -1
  17. package/esm2015/lib/components/chart/chart.component.js +3 -1
  18. package/esm2015/lib/components/chart/chart.component.metadata.json +1 -1
  19. package/esm2015/lib/components/chart/chart.types.js +1 -1
  20. package/esm2015/lib/components/chart/chart.types.metadata.json +1 -1
  21. package/esm2015/lib/components/chart/configs/global-defaults.config.js +7 -1
  22. package/esm2015/lib/components/chart/configs/type.config.js +118 -1
  23. package/esm2015/lib/components/chart/configs/type.config.metadata.json +1 -1
  24. package/esm2015/lib/components/index.js +4 -1
  25. package/esm2015/lib/components/index.metadata.json +1 -1
  26. package/esm2015/lib/components/item/label/label.component.js +1 -1
  27. package/esm2015/lib/components/item/label/label.component.metadata.json +1 -1
  28. package/esm2015/lib/components/item-sliding/index.js +3 -0
  29. package/esm2015/lib/components/item-sliding/index.metadata.json +1 -0
  30. package/esm2015/lib/components/item-sliding/item-sliding.component.js +27 -0
  31. package/esm2015/lib/components/item-sliding/item-sliding.component.metadata.json +1 -0
  32. package/esm2015/lib/components/item-sliding/item-sliding.types.js +2 -0
  33. package/esm2015/lib/components/item-sliding/item-sliding.types.metadata.json +1 -0
  34. package/esm2015/lib/components/list/list-experimental/list-experimental.component.js +13 -2
  35. package/esm2015/lib/components/list/list-experimental/list-experimental.component.metadata.json +1 -1
  36. package/esm2015/lib/components/list/list-item/list-item.component.js +1 -1
  37. package/esm2015/lib/components/list/list-item/list-item.component.metadata.json +1 -1
  38. package/esm2015/lib/components/list/list-swipe-action.type.js +1 -1
  39. package/esm2015/lib/components/list/list-swipe-action.type.metadata.json +1 -1
  40. package/esm2015/lib/components/list/list.component.js +1 -1
  41. package/esm2015/lib/components/list/list.component.metadata.json +1 -1
  42. package/esm2015/lib/components/section-header/section-header.component.js +11 -0
  43. package/esm2015/lib/components/section-header/section-header.component.metadata.json +1 -0
  44. package/esm2015/lib/helpers/deep-copy.js +11 -2
  45. package/esm2015/lib/helpers/deep-copy.metadata.json +1 -1
  46. package/esm2015/lib/helpers/element-has-ancestor.js +24 -0
  47. package/esm2015/lib/helpers/element-has-ancestor.metadata.json +1 -0
  48. package/esm2015/lib/helpers/index.js +2 -1
  49. package/esm2015/lib/helpers/index.metadata.json +1 -1
  50. package/esm2015/lib/kirby.module.js +5 -1
  51. package/esm2015/lib/kirby.module.metadata.json +1 -1
  52. package/esm2015/testing-base/kirbydesign-designsystem-testing-base.js +32 -30
  53. package/esm2015/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
  54. package/esm2015/testing-base/lib/components/mock.chart.component.js +2 -1
  55. package/esm2015/testing-base/lib/components/mock.chart.component.metadata.json +1 -1
  56. package/esm2015/testing-base/lib/components/mock.item-sliding.component.js +23 -0
  57. package/esm2015/testing-base/lib/components/mock.item-sliding.component.metadata.json +1 -0
  58. package/esm2015/testing-base/lib/components/mock.section-header.component.js +19 -0
  59. package/esm2015/testing-base/lib/components/mock.section-header.component.metadata.json +1 -0
  60. package/esm2015/testing-base/lib/mock-components.js +5 -1
  61. package/esm2015/testing-base/lib/mock-components.metadata.json +1 -1
  62. package/fesm2015/kirbydesign-designsystem-testing-base.js +43 -2
  63. package/fesm2015/kirbydesign-designsystem-testing-base.js.map +1 -1
  64. package/fesm2015/kirbydesign-designsystem.js +551 -29
  65. package/fesm2015/kirbydesign-designsystem.js.map +1 -1
  66. package/kirbydesign-designsystem.d.ts +14 -12
  67. package/kirbydesign-designsystem.metadata.json +1 -1
  68. package/lib/components/chart/chart-js/chart-js.service.d.ts +17 -1
  69. package/lib/components/chart/chart-js/chartjs-plugin-marker/chartjs-plugin-marker.d.ts +14 -0
  70. package/lib/components/chart/chart.component.d.ts +2 -1
  71. package/lib/components/chart/chart.types.d.ts +9 -1
  72. package/lib/components/chart/configs/global-defaults.config.d.ts +6 -0
  73. package/lib/components/index.d.ts +3 -0
  74. package/lib/components/item-sliding/index.d.ts +2 -0
  75. package/lib/components/item-sliding/item-sliding.component.d.ts +7 -0
  76. package/lib/components/item-sliding/item-sliding.types.d.ts +10 -0
  77. package/lib/components/list/list-experimental/list-experimental.component.d.ts +3 -0
  78. package/lib/components/list/list-swipe-action.type.d.ts +8 -9
  79. package/lib/components/section-header/section-header.component.d.ts +2 -0
  80. package/lib/helpers/deep-copy.d.ts +9 -1
  81. package/lib/helpers/element-has-ancestor.d.ts +1 -0
  82. package/lib/helpers/index.d.ts +1 -0
  83. package/package.json +6 -3
  84. package/scss/_global-styles.scss +4 -0
  85. package/testing-base/kirbydesign-designsystem-testing-base.d.ts +31 -29
  86. package/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
  87. package/testing-base/lib/components/mock.chart.component.d.ts +2 -1
  88. package/testing-base/lib/components/mock.item-sliding.component.d.ts +5 -0
  89. package/testing-base/lib/components/mock.section-header.component.d.ts +2 -0
@@ -1,7 +1,7 @@
1
1
  import { DesignTokenHelper, ColorHelper, capitalizeFirstLetter } from '@kirbydesign/core';
2
2
  export { ColorHelper, DesignTokenHelper, camelToKebabCase, capitalizeFirstLetter, kebabToCamelCase, kebabToTitleCase } from '@kirbydesign/core';
3
3
  import { Component, Input, EventEmitter, Output, Injectable, ɵɵdefineInjectable, ElementRef, ViewChild, ɵɵinject, InjectionToken, Injector, HostListener, Optional, Inject, HostBinding, ContentChild, NgZone, RendererStyleFlags2, Renderer2, ComponentFactoryResolver, ViewChildren, NgModule, ChangeDetectionStrategy, Directive, ViewContainerRef, LOCALE_ID, forwardRef, ChangeDetectorRef, TemplateRef, ContentChildren, INJECTOR, Pipe, SkipSelf, APP_INITIALIZER } from '@angular/core';
4
- import { ModalController as ModalController$1, IonContent, IonHeader, IonToolbar, IonTitle, AnimationController, IonApp, IonicModule, IonRadio, IonFabButton, LoadingController, IonItemSliding, IonTabs, IonFooter, ToastController as ToastController$1 } from '@ionic/angular';
4
+ import { ModalController as ModalController$1, IonContent, IonHeader, IonToolbar, IonTitle, AnimationController, IonApp, IonicModule, IonRadio, IonFabButton, LoadingController, IonItemSliding, IonList, IonTabs, IonFooter, ToastController as ToastController$1 } from '@ionic/angular';
5
5
  export { IonRouterOutlet, NavController } from '@ionic/angular';
6
6
  import { NavigationEnd, Router, ActivatedRoute, RouterOutlet, ROUTES, NavigationStart, RouterModule } from '@angular/router';
7
7
  import { of, EMPTY, Subject, merge, fromEvent, ReplaySubject } from 'rxjs';
@@ -9,13 +9,16 @@ import { filter, first, startWith, map, pairwise, debounceTime, takeUntil } from
9
9
  import { CommonModule, formatNumber, getLocaleDateFormat, FormatWidth, getLocaleNumberSymbol, NumberSymbol, DOCUMENT } from '@angular/common';
10
10
  import * as Highcharts from 'highcharts';
11
11
  import { chart, dateFormat } from 'highcharts';
12
- import { CategoryScale, LinearScale, BarElement, LineElement, PointElement, BarController, LineController, Filler, Chart, Legend } from 'chart.js';
12
+ import { toDate, isBefore, isAfter, format, isSameMonth, startOfMonth, startOfDay, eachDayOfInterval, startOfWeek, endOfWeek, isSameDay, endOfMonth, differenceInDays, add, isWeekend, getYear } from 'date-fns';
13
+ import _deepCopy from 'ts-deepcopy';
14
+ import { CategoryScale, LinearScale, BarElement, LineElement, PointElement, BarController, LineController, Filler, Tooltip, Chart, Legend } from 'chart.js';
13
15
  export { Chart } from 'chart.js';
14
16
  import annotationPlugin from 'chartjs-plugin-annotation';
17
+ import ChartDataLabels from 'chartjs-plugin-datalabels';
18
+ import { valueOrDefault } from 'chart.js/helpers';
15
19
  import * as Highcharts$1 from 'highcharts/highstock';
16
20
  import { dateFormat as dateFormat$1, stockChart } from 'highcharts/highstock';
17
21
  import AnnotationsModule from 'highcharts/modules/annotations';
18
- import { isBefore, isAfter, format, isSameMonth, startOfMonth, startOfDay, eachDayOfInterval, startOfWeek, endOfWeek, isSameDay, endOfMonth, differenceInDays, add, isWeekend, getYear } from 'date-fns';
19
22
  import { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz';
20
23
  import { da, enGB, enUS } from 'date-fns/locale';
21
24
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
@@ -3071,10 +3074,42 @@ ComponentLoaderDirective.propDecorators = {
3071
3074
  cssClass: [{ type: Input }]
3072
3075
  };
3073
3076
 
3077
+ /**
3078
+ * Do a deep copy of object that supports the composite data type Function
3079
+ *
3080
+ * @see https://stackoverflow.com/questions/122102/what-is-the-most-efficient-way-to-deep-clone-an-object-in-javascript#answer-122704
3081
+ *
3082
+ * @param obj
3083
+ * @returns obj
3084
+ */
3074
3085
  function deepCopy(obj) {
3075
- return JSON.parse(JSON.stringify(obj));
3086
+ return _deepCopy(obj);
3076
3087
  }
3077
3088
 
3089
+ /*
3090
+ Utility function to check if a given element
3091
+ has an ancestor with a specific node name.
3092
+
3093
+ Can be given a 'stopNodeName' to limit the search
3094
+ as to not climb all the way up through the DOM tree.
3095
+
3096
+ Returns true when element has the ancestorNodeName
3097
+ or an ancestor has the ancestorNodeName.
3098
+
3099
+ Returns false otherwise.
3100
+ */
3101
+ const elementHasAncestor = (element, ancestorNodeName, stopNodeName) => {
3102
+ switch (element === null || element === void 0 ? void 0 : element.nodeName) {
3103
+ case undefined:
3104
+ case stopNodeName === null || stopNodeName === void 0 ? void 0 : stopNodeName.toUpperCase():
3105
+ return false;
3106
+ case ancestorNodeName.toUpperCase():
3107
+ return true;
3108
+ default:
3109
+ return elementHasAncestor(element.parentElement, ancestorNodeName, stopNodeName);
3110
+ }
3111
+ };
3112
+
3078
3113
  // re-export helpers from core, to preserve backwards compatability
3079
3114
 
3080
3115
  const { getThemeColorHexString } = ColorHelper;
@@ -3124,6 +3159,13 @@ const CHART_INTERACTION_FUNCTIONS_EXTENSIONS = {
3124
3159
 
3125
3160
  const { fontSize: fontSize$2 } = DesignTokenHelper;
3126
3161
  const { getThemeColorHexString: getThemeColorHexString$1, getThemeColorRgbString } = ColorHelper;
3162
+ /**
3163
+ * A filter to read a chartpoint from a Chart.js point context (used for chartdata points). Context is provided by Chart.js.
3164
+ */
3165
+ const getChartPointFromContext = (context) => {
3166
+ return context.dataset.data[context.dataIndex];
3167
+ };
3168
+ const ɵ0$6 = getChartPointFromContext;
3127
3169
  const CHART_TYPES_CONFIG = {
3128
3170
  bar: {
3129
3171
  type: 'bar',
@@ -3218,6 +3260,115 @@ const CHART_TYPES_CONFIG = {
3218
3260
  },
3219
3261
  },
3220
3262
  },
3263
+ stock: {
3264
+ type: 'line',
3265
+ options: {
3266
+ responsive: true,
3267
+ animation: {
3268
+ duration: 0,
3269
+ },
3270
+ layout: {
3271
+ padding: {
3272
+ left: 20,
3273
+ right: 20,
3274
+ top: 30,
3275
+ bottom: 0,
3276
+ },
3277
+ },
3278
+ backgroundColor: getThemeColorRgbString('semi-light', 0.5),
3279
+ scales: {
3280
+ x: {
3281
+ grid: {
3282
+ lineWidth: 0,
3283
+ },
3284
+ ticks: {
3285
+ maxRotation: 0,
3286
+ autoSkipPadding: 120,
3287
+ font: {
3288
+ size: parseInt(fontSize$2('xs')),
3289
+ },
3290
+ },
3291
+ },
3292
+ y: {
3293
+ position: 'right',
3294
+ display: true,
3295
+ grid: {
3296
+ drawBorder: false,
3297
+ },
3298
+ ticks: {
3299
+ display: true,
3300
+ font: {
3301
+ size: parseInt(fontSize$2('xs')),
3302
+ },
3303
+ },
3304
+ },
3305
+ },
3306
+ elements: {
3307
+ line: {
3308
+ tension: 0,
3309
+ borderWidth: 2,
3310
+ },
3311
+ point: {
3312
+ hitRadius: 20,
3313
+ radius: 0,
3314
+ hoverRadius: 0,
3315
+ hoverBorderWidth: 0,
3316
+ },
3317
+ },
3318
+ normalized: true,
3319
+ plugins: {
3320
+ tooltip: {
3321
+ padding: 10,
3322
+ enabled: true,
3323
+ mode: 'index',
3324
+ intersect: false,
3325
+ backgroundColor: getThemeColorHexString$1('semi-light'),
3326
+ titleColor: getThemeColorHexString$1('semi-light-contrast'),
3327
+ bodyColor: getThemeColorHexString$1('semi-light-contrast'),
3328
+ caretSize: 0,
3329
+ bodySpacing: 5,
3330
+ titleSpacing: 5,
3331
+ borderColor: 'transparent',
3332
+ callbacks: {
3333
+ labelColor: (tooltipItem) => {
3334
+ return {
3335
+ backgroundColor: tooltipItem.dataset.borderColor,
3336
+ };
3337
+ },
3338
+ },
3339
+ },
3340
+ // A failed attempt to get local typings working.
3341
+ // The chartjs-plugin-marker is rewritten to not
3342
+ // having to rely on own plugin settings, but using
3343
+ // x-axis type time instead.
3344
+ // @todo candidate for refactor once solved.
3345
+ // marker: {
3346
+ // line: {
3347
+ // color: getThemeColorHexString('black-base'),
3348
+ // }
3349
+ // },
3350
+ datalabels: {
3351
+ backgroundColor: (context) => context.dataset.borderColor,
3352
+ color: getThemeColorHexString$1('white'),
3353
+ borderRadius: 3,
3354
+ font: {
3355
+ lineHeight: 1,
3356
+ size: parseInt(fontSize$2('xs')),
3357
+ },
3358
+ padding: {
3359
+ top: 6,
3360
+ left: 5,
3361
+ right: 5,
3362
+ bottom: 5,
3363
+ },
3364
+ offset: 5,
3365
+ align: (context) => { var _a; return (_a = getChartPointFromContext(context)) === null || _a === void 0 ? void 0 : _a.datalabel.position; },
3366
+ display: (context) => { var _a; return !!((_a = getChartPointFromContext(context)) === null || _a === void 0 ? void 0 : _a.datalabel); },
3367
+ formatter: (value) => value.datalabel.value,
3368
+ },
3369
+ },
3370
+ },
3371
+ },
3221
3372
  };
3222
3373
 
3223
3374
  class ChartConfigService {
@@ -3243,6 +3394,205 @@ ChartConfigService.decorators = [
3243
3394
  { type: Injectable }
3244
3395
  ];
3245
3396
 
3397
+ // The marker pluin was heavily inspired by https://chartjs-plugin-crosshair.netlify.app
3398
+ var defaultOptions = {
3399
+ line: {
3400
+ color: 'black',
3401
+ width: 1,
3402
+ dashPattern: [],
3403
+ },
3404
+ snap: {
3405
+ enabled: false,
3406
+ },
3407
+ };
3408
+ const hasMarkerConfiguration = (chart) => {
3409
+ var _a, _b, _c;
3410
+ // using another plugins options is not ideal, so the issue with marker plugin
3411
+ // should be resolved. As of right now the only chart that uses
3412
+ // tooltip is stock charts.
3413
+ return chart.config.options.scales.x && ((_c = (_b = (_a = chart.config.options) === null || _a === void 0 ? void 0 : _a.plugins) === null || _b === void 0 ? void 0 : _b.tooltip) === null || _c === void 0 ? void 0 : _c.enabled);
3414
+ // @todo when resolving the typings issue with the markerplugin,
3415
+ // this is a better conditional.
3416
+ // return chart.config.options.scales.x && chart.config.options.plugins.marker
3417
+ };
3418
+ const ɵ0$7 = hasMarkerConfiguration;
3419
+ var MarkerPlugin = {
3420
+ id: 'marker',
3421
+ afterInit: function (chart) {
3422
+ if (!hasMarkerConfiguration(chart)) {
3423
+ return;
3424
+ }
3425
+ var xScaleType = chart.config.options.scales.x.type;
3426
+ if (xScaleType !== 'linear' &&
3427
+ xScaleType !== 'time' &&
3428
+ xScaleType !== 'category' &&
3429
+ xScaleType !== 'logarithmic') {
3430
+ return;
3431
+ }
3432
+ if (chart.options.plugins.marker === undefined) {
3433
+ chart.options.plugins.marker = defaultOptions;
3434
+ }
3435
+ chart.marker = {
3436
+ enabled: false,
3437
+ suppressUpdate: false,
3438
+ x: null,
3439
+ originalData: [],
3440
+ originalXRange: {},
3441
+ dragStarted: false,
3442
+ dragStartX: null,
3443
+ dragEndX: null,
3444
+ suppressTooltips: false,
3445
+ ignoreNextEvents: 0,
3446
+ };
3447
+ },
3448
+ getOption: function (chart, category, name) {
3449
+ return valueOrDefault(chart.options.plugins.marker[category]
3450
+ ? chart.options.plugins.marker[category][name]
3451
+ : undefined, defaultOptions[category][name]);
3452
+ },
3453
+ getXScale: function (chart) {
3454
+ return chart.data.datasets.length ? chart.scales[chart.getDatasetMeta(0).xAxisID] : null;
3455
+ },
3456
+ getYScale: function (chart) {
3457
+ return chart.scales[chart.getDatasetMeta(0).yAxisID];
3458
+ },
3459
+ afterEvent: function (chart, event) {
3460
+ if (!hasMarkerConfiguration(chart)) {
3461
+ return;
3462
+ }
3463
+ if (chart.config.options.scales.x.length == 0) {
3464
+ return;
3465
+ }
3466
+ let e = event.event;
3467
+ var xScaleType = chart.config.options.scales.x.type;
3468
+ if (xScaleType !== 'linear' &&
3469
+ xScaleType !== 'time' &&
3470
+ xScaleType !== 'category' &&
3471
+ xScaleType !== 'logarithmic') {
3472
+ return;
3473
+ }
3474
+ var xScale = this.getXScale(chart);
3475
+ if (!xScale) {
3476
+ return;
3477
+ }
3478
+ if (chart.marker.ignoreNextEvents > 0) {
3479
+ chart.marker.ignoreNextEvents -= 1;
3480
+ return;
3481
+ }
3482
+ // fix for Safari
3483
+ var buttons = e.native.buttons === undefined ? e.native.which : e.native.buttons;
3484
+ if (e.native.type === 'mouseup') {
3485
+ buttons = 0;
3486
+ }
3487
+ chart.marker.enabled =
3488
+ e.type !== 'mouseout' &&
3489
+ e.x > xScale.getPixelForValue(xScale.min) &&
3490
+ e.x < xScale.getPixelForValue(xScale.max);
3491
+ if (!chart.marker.enabled && !chart.marker.suppressUpdate) {
3492
+ if (e.x > xScale.getPixelForValue(xScale.max)) {
3493
+ // suppress future updates to prevent endless redrawing of chart
3494
+ chart.marker.suppressUpdate = true;
3495
+ chart.update('none');
3496
+ }
3497
+ chart.marker.dragStarted = false; // cancel zoom in progress
3498
+ return false;
3499
+ }
3500
+ chart.marker.suppressUpdate = false;
3501
+ chart.marker.x = e.x;
3502
+ chart.draw();
3503
+ },
3504
+ doDraw: function (chart) {
3505
+ if (!hasMarkerConfiguration(chart)) {
3506
+ return;
3507
+ }
3508
+ if (!chart.marker.enabled) {
3509
+ return;
3510
+ }
3511
+ this.drawTraceLine(chart);
3512
+ this.interpolateValues(chart);
3513
+ this.drawTracePoints(chart);
3514
+ return true;
3515
+ },
3516
+ beforeDraw: function (chart) {
3517
+ return this.doDraw(chart);
3518
+ },
3519
+ // Logic moved to beforeDraw in order
3520
+ // for the vertical line to be drawn
3521
+ // under tooltip and datalabels.
3522
+ // afterDraw: function(chart) {
3523
+ // return this.doDraw(chart);
3524
+ // },
3525
+ drawTraceLine: function (chart) {
3526
+ if (!hasMarkerConfiguration(chart)) {
3527
+ return;
3528
+ }
3529
+ var yScale = this.getYScale(chart);
3530
+ var lineWidth = this.getOption(chart, 'line', 'width');
3531
+ var color = this.getOption(chart, 'line', 'color');
3532
+ var dashPattern = this.getOption(chart, 'line', 'dashPattern');
3533
+ var snapEnabled = this.getOption(chart, 'snap', 'enabled');
3534
+ var lineX = chart.marker.x;
3535
+ if (snapEnabled && chart._active.length) {
3536
+ lineX = chart._active[0].element.x;
3537
+ }
3538
+ chart.ctx.beginPath();
3539
+ chart.ctx.setLineDash(dashPattern);
3540
+ chart.ctx.moveTo(lineX, yScale.getPixelForValue(yScale.max));
3541
+ chart.ctx.lineWidth = lineWidth;
3542
+ chart.ctx.strokeStyle = color;
3543
+ chart.ctx.lineTo(lineX, yScale.getPixelForValue(yScale.min));
3544
+ chart.ctx.stroke();
3545
+ chart.ctx.setLineDash([]);
3546
+ },
3547
+ drawTracePoints: function (chart) {
3548
+ if (!hasMarkerConfiguration(chart)) {
3549
+ return;
3550
+ }
3551
+ for (var chartIndex = 0; chartIndex < chart.data.datasets.length; chartIndex++) {
3552
+ var dataset = chart.data.datasets[chartIndex];
3553
+ var meta = chart.getDatasetMeta(chartIndex);
3554
+ var yScale = chart.scales[meta.yAxisID];
3555
+ if (meta.hidden || !dataset.interpolate) {
3556
+ continue;
3557
+ }
3558
+ chart.ctx.beginPath();
3559
+ chart.ctx.arc(chart.marker.x, yScale.getPixelForValue(dataset.interpolatedValue), 3, 0, 2 * Math.PI, false);
3560
+ chart.ctx.fillStyle = 'white';
3561
+ chart.ctx.lineWidth = 2;
3562
+ chart.ctx.strokeStyle = dataset.borderColor;
3563
+ chart.ctx.fill();
3564
+ chart.ctx.stroke();
3565
+ }
3566
+ },
3567
+ interpolateValues: function (chart) {
3568
+ for (var chartIndex = 0; chartIndex < chart.data.datasets.length; chartIndex++) {
3569
+ var dataset = chart.data.datasets[chartIndex];
3570
+ var meta = chart.getDatasetMeta(chartIndex);
3571
+ var xScale = chart.scales[meta.xAxisID];
3572
+ var xValue = xScale.getValueForPixel(chart.marker.x);
3573
+ if (meta.hidden || !dataset.interpolate) {
3574
+ continue;
3575
+ }
3576
+ var data = dataset.data;
3577
+ var index = data.findIndex(function (o) {
3578
+ return o.x >= xValue;
3579
+ });
3580
+ var prev = data[index - 1];
3581
+ var next = data[index];
3582
+ if (chart.data.datasets[chartIndex].steppedLine && prev) {
3583
+ dataset.interpolatedValue = prev.y;
3584
+ }
3585
+ else if (prev && next) {
3586
+ var slope = (next.y - prev.y) / (next.x - prev.x);
3587
+ dataset.interpolatedValue = prev.y + (xValue - prev.x) * slope;
3588
+ }
3589
+ else {
3590
+ dataset.interpolatedValue = NaN;
3591
+ }
3592
+ }
3593
+ },
3594
+ };
3595
+
3246
3596
  const { getThemeColorHexString: getThemeColorHexString$2 } = ColorHelper;
3247
3597
  const hoverBackgroundColor = getThemeColorHexString$2('primary');
3248
3598
  const backgroundColor = getThemeColorHexString$2('secondary');
@@ -3302,13 +3652,19 @@ const CHART_GLOBAL_DEFAULTS = {
3302
3652
  legend: {
3303
3653
  display: false,
3304
3654
  },
3655
+ datalabels: {
3656
+ display: false,
3657
+ },
3658
+ tooltip: {
3659
+ enabled: false,
3660
+ },
3305
3661
  },
3306
3662
  };
3307
3663
 
3308
3664
  const CHART_SCALES = [CategoryScale, LinearScale];
3309
3665
  const CHART_ELEMENTS = [BarElement, LineElement, PointElement];
3310
3666
  const CHART_CONTROLLERS = [BarController, LineController];
3311
- const CHART_PLUGINS = [annotationPlugin, Filler];
3667
+ const CHART_PLUGINS = [annotationPlugin, Filler, ChartDataLabels, Tooltip, MarkerPlugin];
3312
3668
  /* Order matters; defaults must be merged after register as
3313
3669
  register modifies the Chart.defaults objects */
3314
3670
  Chart.register(Legend, ...CHART_SCALES, ...CHART_ELEMENTS, ...CHART_CONTROLLERS, ...CHART_PLUGINS);
@@ -3319,15 +3675,24 @@ Object.entries(CHART_GLOBAL_DEFAULTS).forEach(([key]) => {
3319
3675
  Chart.defaults[key] = mergedDefaults[key];
3320
3676
  });
3321
3677
 
3678
+ const CHART_LOCALE_DEFAULT = 'en-US';
3322
3679
  class ChartJSService {
3323
3680
  constructor(chartConfigService) {
3324
3681
  this.chartConfigService = chartConfigService;
3325
3682
  }
3326
3683
  renderChart(args) {
3327
- const { targetElement, type, data, dataLabels, customOptions, annotations, highlightedElements, } = args;
3328
- const datasets = this.createDatasets(data, highlightedElements);
3329
- const options = this.createOptionsObject({ type, customOptions, annotations });
3330
- const config = this.createConfigurationObject(type, datasets, options, dataLabels);
3684
+ const { targetElement, type, data, dataLabels, customOptions, annotations, dataLabelOptions, highlightedElements, } = args;
3685
+ this.dataLabelOptions = dataLabelOptions || null;
3686
+ this.highlightedElements = highlightedElements || null;
3687
+ this.chartType = type;
3688
+ this.locale = (dataLabelOptions === null || dataLabelOptions === void 0 ? void 0 : dataLabelOptions.locale) || CHART_LOCALE_DEFAULT;
3689
+ const datasets = this.createDatasets(data);
3690
+ const options = this.createOptionsObject({
3691
+ customOptions,
3692
+ annotations,
3693
+ dataLabelOptions,
3694
+ });
3695
+ let config = this.createConfigurationObject(type, datasets, options, dataLabels);
3331
3696
  this.initializeNewChart(targetElement.nativeElement, config);
3332
3697
  }
3333
3698
  redrawChart() {
@@ -3350,15 +3715,20 @@ class ChartJSService {
3350
3715
  this.nonDestructivelyUpdateType(type, customOptions);
3351
3716
  }
3352
3717
  }
3718
+ setDataLabelOptions(dataLabelOptions) {
3719
+ this.dataLabelOptions = dataLabelOptions;
3720
+ }
3353
3721
  updateOptions(customOptions, type) {
3354
3722
  const annotations = this.getExistingChartAnnotations();
3355
- this.chart.options = this.createOptionsObject({ type, customOptions, annotations });
3723
+ this.chartType = type;
3724
+ this.chart.options = this.createOptionsObject({ customOptions, annotations });
3356
3725
  }
3357
3726
  updateAnnotations(annotations) {
3358
3727
  const annotationsWithDefaults = this.applyDefaultsToAnnotations(annotations);
3359
3728
  this.chart.options.plugins.annotation.annotations = annotationsWithDefaults;
3360
3729
  }
3361
3730
  updateHighlightedElements(highlightedElements) {
3731
+ this.highlightedElements = highlightedElements;
3362
3732
  const oldDatasets = this.chart.data.datasets;
3363
3733
  // Clear old datasets of highlighted elements
3364
3734
  oldDatasets.map((dataset) => {
@@ -3367,7 +3737,7 @@ class ChartJSService {
3367
3737
  delete dataset.kirbyOptions.highlightedElements;
3368
3738
  }
3369
3739
  });
3370
- this.chart.data.datasets = this.createDatasets(oldDatasets, highlightedElements);
3740
+ this.chart.data.datasets = this.createDatasets(oldDatasets);
3371
3741
  }
3372
3742
  getExistingChartAnnotations() {
3373
3743
  var _a, _b;
@@ -3386,7 +3756,8 @@ class ChartJSService {
3386
3756
  const datasets = this.chart.data.datasets;
3387
3757
  const dataLabels = this.chart.data.labels;
3388
3758
  const annotations = this.getExistingChartAnnotations();
3389
- const options = this.createOptionsObject({ type, customOptions, annotations });
3759
+ this.chartType = type;
3760
+ const options = this.createOptionsObject({ customOptions, annotations });
3390
3761
  const config = this.createConfigurationObject(type, datasets, options, dataLabels);
3391
3762
  const canvasElement = this.chart.canvas;
3392
3763
  this.chart.destroy();
@@ -3394,8 +3765,8 @@ class ChartJSService {
3394
3765
  }
3395
3766
  nonDestructivelyUpdateType(chartType, customOptions) {
3396
3767
  const annotations = this.getExistingChartAnnotations();
3768
+ this.chartType = chartType;
3397
3769
  const options = this.createOptionsObject({
3398
- type: chartType,
3399
3770
  customOptions,
3400
3771
  annotations,
3401
3772
  });
@@ -3435,21 +3806,73 @@ class ChartJSService {
3435
3806
  });
3436
3807
  return options;
3437
3808
  }
3809
+ createStockOptionsObject(dataLabelOptions) {
3810
+ return {
3811
+ locale: this.locale,
3812
+ plugins: {
3813
+ tooltip: {
3814
+ callbacks: {
3815
+ title: (tooltipItems) => {
3816
+ var _a, _b;
3817
+ const date = toDate((_b = (_a = tooltipItems[0]) === null || _a === void 0 ? void 0 : _a.raw) === null || _b === void 0 ? void 0 : _b.x);
3818
+ if (date.valueOf()) {
3819
+ return date.toLocaleTimeString(this.locale, {
3820
+ day: 'numeric',
3821
+ month: 'short',
3822
+ hour: '2-digit',
3823
+ minute: '2-digit',
3824
+ });
3825
+ }
3826
+ },
3827
+ label: (context) => {
3828
+ // It's not possible to add spacing between color legend and text so we
3829
+ // prefix with a space.
3830
+ return ' ' + context.formattedValue + (dataLabelOptions.valueSuffix || '');
3831
+ },
3832
+ },
3833
+ },
3834
+ },
3835
+ scales: {
3836
+ y: {
3837
+ ticks: {
3838
+ callback: (value) => {
3839
+ return value + (dataLabelOptions.valueSuffix || '');
3840
+ },
3841
+ },
3842
+ },
3843
+ },
3844
+ };
3845
+ }
3438
3846
  createOptionsObject(args) {
3439
- const { type, customOptions, annotations } = args;
3440
- const typeConfig = this.chartConfigService.getTypeConfig(type);
3847
+ const { customOptions, annotations, dataLabelOptions: chartDataLabelOptions } = args;
3848
+ const typeConfig = this.chartConfigService.getTypeConfig(this.chartType);
3441
3849
  const typeConfigOptions = typeConfig === null || typeConfig === void 0 ? void 0 : typeConfig.options;
3442
3850
  const annotationPluginOptions = annotations
3443
3851
  ? this.createAnnotationPluginOptionsObject(annotations)
3444
3852
  : {};
3445
- let options = mergeDeepAll(typeConfigOptions, customOptions, annotationPluginOptions);
3853
+ const stockOptions = this.chartType === 'stock' ? this.createStockOptionsObject(chartDataLabelOptions) : {};
3854
+ let options = mergeDeepAll(stockOptions, typeConfigOptions, customOptions, annotationPluginOptions);
3446
3855
  return this.applyInteractionFunctionsExtensions(options);
3447
3856
  }
3857
+ getDefaultStockLabels(datasets, locale) {
3858
+ const largestDataset = datasets.reduce((previousDataset, currentDataset) => previousDataset.data.length > currentDataset.data.length ? previousDataset : currentDataset);
3859
+ return largestDataset.data.map((point) => toDate(point.x).toLocaleDateString(locale, {
3860
+ month: 'short',
3861
+ day: 'numeric',
3862
+ }));
3863
+ }
3448
3864
  createConfigurationObject(type, datasets, options, dataLabels) {
3449
- /* chartJS requires labels; if none is provided create an empty string array
3450
- to make it optional for consumer */
3451
- const labels = !dataLabels ? this.createBlankLabels(datasets) : dataLabels;
3452
3865
  const typeConfig = this.chartConfigService.getTypeConfig(type);
3866
+ // chartJS requires labels; if none is provided create an empty string array
3867
+ // to make it optional for consumer.
3868
+ // However the stock chart, should have autogenerated labels if no
3869
+ // custom labels are supplied.
3870
+ const isStockType = type === 'stock';
3871
+ const labels = !dataLabels
3872
+ ? isStockType
3873
+ ? this.getDefaultStockLabels(datasets, this.locale)
3874
+ : this.createBlankLabels(datasets)
3875
+ : dataLabels;
3453
3876
  return mergeDeepAll(typeConfig, {
3454
3877
  data: {
3455
3878
  labels,
@@ -3472,12 +3895,62 @@ class ChartJSService {
3472
3895
  }
3473
3896
  });
3474
3897
  }
3475
- createDatasets(data, highlightedElements) {
3898
+ createDatasets(data) {
3899
+ var _a, _b, _c;
3900
+ // We need to modify the datasets in order to add datalabels.
3901
+ if (((_a = this.dataLabelOptions) === null || _a === void 0 ? void 0 : _a.showCurrent) || ((_b = this.dataLabelOptions) === null || _b === void 0 ? void 0 : _b.showMax) || ((_c = this.dataLabelOptions) === null || _c === void 0 ? void 0 : _c.showMin)) {
3902
+ data = this.addDataLabelsData(data);
3903
+ }
3476
3904
  let datasets = isNumberArray(data) ? [{ data }] : data;
3477
- if (highlightedElements)
3478
- this.addHighlightedElementsToDatasets(highlightedElements, datasets);
3905
+ if (this.highlightedElements)
3906
+ this.addHighlightedElementsToDatasets(this.highlightedElements, datasets);
3479
3907
  return datasets;
3480
3908
  }
3909
+ /**
3910
+ * Decorate ChartDataset with properties to allow for datalabels.
3911
+ *
3912
+ * @param data
3913
+ * @returns ChartDataset[]
3914
+ */
3915
+ addDataLabelsData(data) {
3916
+ if (isNumberArray(data)) {
3917
+ throw Error("Currently it's impossible to add dataLabels to non ScatterDataPoint datasets");
3918
+ }
3919
+ const decorateDataPoint = (set, axis, direction, position) => {
3920
+ const { value, pointer } = this.locateValueIndexInDataset(set, axis, direction);
3921
+ set.data[pointer] = Object.assign(Object.assign({}, set.data[pointer]), { datalabel: {
3922
+ value: value + (this.dataLabelOptions.valueSuffix || ''),
3923
+ position,
3924
+ } });
3925
+ };
3926
+ data.map((set) => {
3927
+ if (this.dataLabelOptions.showMin) {
3928
+ decorateDataPoint(set, 'y', 'low', 'bottom');
3929
+ }
3930
+ if (this.dataLabelOptions.showMax) {
3931
+ decorateDataPoint(set, 'y', 'high', 'top');
3932
+ }
3933
+ if (this.dataLabelOptions.showCurrent) {
3934
+ decorateDataPoint(set, 'x', 'high', 'right');
3935
+ }
3936
+ });
3937
+ return data;
3938
+ }
3939
+ locateValueIndexInDataset(dataset, axis, direction) {
3940
+ let pointer;
3941
+ let value;
3942
+ dataset.data.forEach((datapoint, index) => {
3943
+ if (direction == 'low' && (!value || datapoint[axis] < value)) {
3944
+ value = datapoint['y'];
3945
+ pointer = index;
3946
+ }
3947
+ if (direction == 'high' && (!value || datapoint[axis] > value)) {
3948
+ value = datapoint['y'];
3949
+ pointer = index;
3950
+ }
3951
+ });
3952
+ return { value, pointer };
3953
+ }
3481
3954
  }
3482
3955
  ChartJSService.decorators = [
3483
3956
  { type: Injectable }
@@ -3547,6 +4020,7 @@ class ChartComponent {
3547
4020
  dataLabels: this.dataLabels,
3548
4021
  customOptions: this.customOptions,
3549
4022
  annotations: this.annotations,
4023
+ dataLabelOptions: this.dataLabelOptions,
3550
4024
  highlightedElements: this.highlightedElements,
3551
4025
  });
3552
4026
  }
@@ -3589,6 +4063,7 @@ ChartComponent.propDecorators = {
3589
4063
  data: [{ type: Input }],
3590
4064
  dataLabels: [{ type: Input }],
3591
4065
  customOptions: [{ type: Input }],
4066
+ dataLabelOptions: [{ type: Input }],
3592
4067
  annotations: [{ type: Input }],
3593
4068
  highlightedElements: [{ type: Input }],
3594
4069
  _height: [{ type: HostBinding, args: ['style.--kirby-chart-height',] }],
@@ -3597,7 +4072,7 @@ ChartComponent.propDecorators = {
3597
4072
  };
3598
4073
 
3599
4074
  const stockChartDeprecatedOptions = (locale, height) => {
3600
- const options = defaultOptions(locale);
4075
+ const options = defaultOptions$1(locale);
3601
4076
  const transparentColor = 'rgba(255,255,255,0)';
3602
4077
  options.chart.backgroundColor = transparentColor;
3603
4078
  options.chart.height = height;
@@ -3693,7 +4168,7 @@ const annotations = (locale) => {
3693
4168
  },
3694
4169
  };
3695
4170
  };
3696
- const defaultOptions = (locale) => {
4171
+ const defaultOptions$1 = (locale) => {
3697
4172
  return {
3698
4173
  chart: {
3699
4174
  zoomType: 'x',
@@ -3775,7 +4250,7 @@ const defaultOptions = (locale) => {
3775
4250
  ],
3776
4251
  };
3777
4252
  };
3778
- const ɵ0$6 = defaultOptions;
4253
+ const ɵ0$8 = defaultOptions$1;
3779
4254
 
3780
4255
  // @ts-ignore
3781
4256
  AnnotationsModule(Highcharts$1);
@@ -4314,6 +4789,32 @@ CalendarComponent.propDecorators = {
4314
4789
  _hasYearNavigator: [{ type: HostBinding, args: ['class.has-year-navigator',] }]
4315
4790
  };
4316
4791
 
4792
+ class ItemSlidingComponent {
4793
+ constructor() {
4794
+ this._side = 'start';
4795
+ }
4796
+ set side(value) {
4797
+ this._side = value === 'left' ? 'start' : 'end';
4798
+ }
4799
+ get _hasSwipeActions() {
4800
+ var _a;
4801
+ // Using '>' instead of '!==';
4802
+ // will only return true when swipeActions is an array
4803
+ return ((_a = this.swipeActions) === null || _a === void 0 ? void 0 : _a.length) > 0;
4804
+ }
4805
+ }
4806
+ ItemSlidingComponent.decorators = [
4807
+ { type: Component, args: [{
4808
+ selector: 'kirby-item-sliding',
4809
+ 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",
4810
+ 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}"]
4811
+ },] }
4812
+ ];
4813
+ ItemSlidingComponent.propDecorators = {
4814
+ swipeActions: [{ type: Input }],
4815
+ side: [{ type: Input }]
4816
+ };
4817
+
4317
4818
  class UniqueIdGenerator {
4318
4819
  constructor(scope) {
4319
4820
  this.scope = scope;
@@ -6099,7 +6600,7 @@ LabelComponent.decorators = [
6099
6600
  { type: Component, args: [{
6100
6601
  selector: 'kirby-label',
6101
6602
  template: "<ion-label>\n <ng-content></ng-content>\n</ion-label>\n",
6102
- styles: [":host.horizontal ion-label{display:flex;flex-direction:row;justify-content:space-between;align-items:center}:host.horizontal ion-label ::ng-deep>:not(:first-child){margin-left:12px}:host-context(kirby-item) ion-label ::ng-deep>data,:host-context(kirby-item) ion-label ::ng-deep>h1,:host-context(kirby-item) ion-label ::ng-deep>h2,:host-context(kirby-item) ion-label ::ng-deep>h3,:host-context(kirby-item) ion-label ::ng-deep>h4,:host-context(kirby-item) ion-label ::ng-deep>h5,:host-context(kirby-item) ion-label ::ng-deep>h6,:host-context(kirby-item) ion-label ::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-context(kirby-item) ion-label ::ng-deep>data.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h1.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h2.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h3.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h4.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h5.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h6.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>p.kirby-text-bold{font-weight:700}:host-context(kirby-item) ion-label ::ng-deep>p{font-size:14px}:host-context(kirby-item) ion-label ::ng-deep>[detail],:host-context(kirby-item) ion-label ::ng-deep>[subtitle]{font-size:12px;line-height:16px}:host-context(kirby-item) ion-label ::ng-deep>[subtitle]:not(:last-child){margin-bottom:4px}:host-context(kirby-item) ion-label ::ng-deep>[detail]{color:var(--kirby-text-color-semi-dark)}:host([slot=end]) ion-label ::ng-deep>[detail],:host([slot=end]) ion-label ::ng-deep>data{margin-inline-start:16px}:host-context(kirby-item.selected) ion-label ::ng-deep>data:not([detail]),:host-context(kirby-item.selected) ion-label ::ng-deep>h1,:host-context(kirby-item.selected) ion-label ::ng-deep>h2,:host-context(kirby-item.selected) ion-label ::ng-deep>h3,:host-context(kirby-item.selected) ion-label ::ng-deep>h4,:host-context(kirby-item.selected) ion-label ::ng-deep>h5,:host-context(kirby-item.selected) ion-label ::ng-deep>h6,:host-context(kirby-item.selected) ion-label ::ng-deep>p:not([detail]){font-weight:700}"]
6603
+ styles: [":host.horizontal ion-label{display:flex;flex-direction:row;justify-content:space-between;align-items:center}:host.horizontal ion-label ::ng-deep>:not(:first-child){margin-left:12px}:host-context(kirby-item) ion-label ::ng-deep>data,:host-context(kirby-item) ion-label ::ng-deep>h1,:host-context(kirby-item) ion-label ::ng-deep>h2,:host-context(kirby-item) ion-label ::ng-deep>h3,:host-context(kirby-item) ion-label ::ng-deep>h4,:host-context(kirby-item) ion-label ::ng-deep>h5,:host-context(kirby-item) ion-label ::ng-deep>h6,:host-context(kirby-item) ion-label ::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-context(kirby-item) ion-label ::ng-deep>data.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h1.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h2.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h3.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h4.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h5.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>h6.kirby-text-bold,:host-context(kirby-item) ion-label ::ng-deep>p.kirby-text-bold{font-weight:700}:host-context(kirby-item) ion-label ::ng-deep>p{font-size:14px}:host-context(kirby-item) ion-label ::ng-deep>[detail],:host-context(kirby-item) ion-label ::ng-deep>[subtitle]{font-size:12px;line-height:16px}:host-context(kirby-item) ion-label ::ng-deep>[subtitle]:not(:last-child){margin-bottom:4px}:host-context(kirby-item) ion-label ::ng-deep>[detail]{color:var(--kirby-text-color-semi-dark)}:host-context(kirby-section-header) ion-label{--padding-end:16px;--padding-start:16px}:host-context(kirby-section-header) ion-label ::ng-deep>[heading]{font-weight:700;font-size:18px;line-height:24px;color:var(--kirby-section-header-color);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host-context(kirby-section-header) ion-label ::ng-deep>[detail],:host-context(kirby-section-header) ion-label ::ng-deep>[label]{font-weight:300;font-size:14px;line-height:20px;color:var(--kirby-section-header-color);margin:4px 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([slot=end]) ion-label ::ng-deep>[detail],:host([slot=end]) ion-label ::ng-deep>data{margin-inline-start:16px}:host-context(kirby-item.selected) ion-label ::ng-deep>data:not([detail]),:host-context(kirby-item.selected) ion-label ::ng-deep>h1,:host-context(kirby-item.selected) ion-label ::ng-deep>h2,:host-context(kirby-item.selected) ion-label ::ng-deep>h3,:host-context(kirby-item.selected) ion-label ::ng-deep>h4,:host-context(kirby-item.selected) ion-label ::ng-deep>h5,:host-context(kirby-item.selected) ion-label ::ng-deep>h6,:host-context(kirby-item.selected) ion-label ::ng-deep>p:not([detail]){font-weight:700}"]
6103
6604
  },] }
6104
6605
  ];
6105
6606
  LabelComponent.propDecorators = {
@@ -6481,7 +6982,7 @@ ListComponent.decorators = [
6481
6982
  selector: 'kirby-list',
6482
6983
  template: "<ion-list\n #list\n kirbyInfiniteScroll\n (scrollEnd)=\"_onLoadOnDemand()\"\n [disabled]=\"!isLoadOnDemandEnabled\"\n class=\"list\"\n [class.has-header]=\"headerTemplate\"\n [class.has-footer]=\"footerTemplate\"\n [class.has-divider]=\"showDivider\"\n>\n <ion-list-header *ngIf=\"headerTemplate\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </ion-list-header>\n\n <ng-container\n *ngTemplateOutlet=\"\n _isSectionsEnabled ? groupedListTemplate : itemsTemplate;\n context: { $implicit: items }\n \"\n ></ng-container>\n\n <div *ngIf=\"footerTemplate\" class=\"footer\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n</ion-list>\n\n<p *ngIf=\"!isLoadOnDemandEnabled && noMoreItemsText\" class=\"no-more-items\">\n {{ noMoreItemsText }}\n</p>\n<div *ngIf=\"_isLoading\" class=\"loading\">\n <kirby-spinner></kirby-spinner>\n</div>\n\n<ng-template #groupedListTemplate>\n <ion-item-group *ngFor=\"let section of _groupedItems; trackBy: sectionTrackBy\">\n <ion-item-divider>\n <ng-container\n *ngTemplateOutlet=\"sectionHeaderTemplate; context: { $implicit: section.name }\"\n ></ng-container>\n </ion-item-divider>\n\n <div class=\"list-items\">\n <ng-container\n *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: section.items }\"\n ></ng-container>\n </div>\n </ion-item-group>\n</ng-template>\n\n<ng-template #itemsTemplate let-items>\n <kirby-list-item\n *ngFor=\"let item of items; let i = index; trackBy: trackBy || defaultTrackBy\"\n [item]=\"item\"\n [itemTemplate]=\"itemTemplate\"\n [swipeActions]=\"swipeActions\"\n [boundaryClass]=\"_getBoundaryClass(i, items)\"\n [isSelectable]=\"_isSelectable\"\n [getItemColor]=\"getItemColor\"\n [isSelected]=\"_isSelectable && item === _selectedItem\"\n (itemSelect)=\"onItemSelect($event)\"\n (swipeActionSelect)=\"onSwipeActionSelect($event)\"\n [class.is-single]=\"items.length === 1\"\n >\n </kirby-list-item>\n</ng-template>\n",
6483
6984
  providers: [ListHelper, GroupByPipe],
6484
- styles: [":host{display:block}.list{box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);background:transparent;contain:inherit;padding:0}ion-list-header{background-color:var(--kirby-white);border-bottom:1px solid var(--kirby-background-color);padding:0;text-transform:inherit;letter-spacing:inherit;font-weight:inherit;font-size:inherit;min-height:0;overflow:inherit}ion-item{--background:var(--kirby-white);--background-activated:var(--kirby-white-shade);--background-hover:var(--kirby-background-color);--background-focused:var(--kirby-background-color);--inner-border-width:0;--ion-safe-area-right:0;--min-height:56px;--padding-bottom:8px;--padding-end:16px;--padding-start:16px;--padding-top:8px;display:flex;font-size:14px;min-height:56px;overflow:visible;width:100%}ion-item-divider{font-weight:inherit}ion-item-sliding.item-sliding-active-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0)}ion-item-sliding.light{--kirby-item-background:var(--kirby-light);--kirby-item-background-activated:var(--kirby-light-shade);--kirby-item-background-focused:var(--kirby-light-shade);--kirby-item-background-hover:var(--kirby-light-tint)}ion-item-sliding.light ion-item{--background:var(--kirby-light);--color:var(--kirby-light-contrast);--background-activated:var(--kirby-light-shade);--background-focused:var(--kirby-light-shade);--background-hover:var(--kirby-light-tint)}ion-item-group{margin-bottom:24px}ion-item-group:last-of-type{margin-bottom:0}ion-item-divider{--inner-padding-end:0;--color:unset;background-color:transparent;border-color:transparent;min-height:0;padding:0 16px 8px}.footer{background-color:var(--kirby-white);border-top:1px solid var(--kirby-background-color);display:flex;align-items:center;justify-content:space-between;width:100%}.loading,.no-more-items{width:100%;padding:24px 0;text-align:center}.swipe-action{display:flex;color:var(--kirby-black);background-color:transparent}.swipe-action .primary{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}.swipe-action .secondary{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}.swipe-action .tertiary{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}.swipe-action .success{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}.swipe-action .warning{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}.swipe-action .danger{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}.swipe-action .light{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}.swipe-action .medium{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}.swipe-action .dark{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}.swipe-action ion-item-option{height:100%;display:inline-block;text-align:center}.swipe-action .item-content{display:inline-grid;min-width:70px;flex-direction:column}.swipe-action .item-content ion-label{--background:unset;--color:unset}ion-item-options[side=end]{border-bottom-width:0}:host-context(.has-sections) .list{box-shadow:none}:host-context(.has-sections) .list-items{box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);border-radius:16px}:host-context(.has-sections) .footer{background-color:transparent;border-top:none}:host-context(.has-sections) ion-list-header{background-color:transparent;border-bottom:none}:host-context(.shape-rounded) .list,:host-context(.shape-rounded) .list-items{border-radius:16px}:host-context(.shape-rounded) ion-item-sliding.first,:host-context(.shape-rounded) ion-item.first,:host-context(.shape-rounded) ion-list-header{border-top-left-radius:16px;border-top-right-radius:16px;-webkit-mask-image:-webkit-radial-gradient(#fff,#000)}:host-context(.shape-rounded):not(.has-sections) .has-header ion-item,:host-context(.shape-rounded):not(.has-sections) .has-header ion-item-sliding,:host-context(.shape-rounded) ion-item-sliding>ion-item{border-top-left-radius:0;border-top-right-radius:0}:host-context(.shape-rounded) .footer,:host-context(.shape-rounded) ion-item-sliding.last,:host-context(.shape-rounded) ion-item.last{border-bottom-left-radius:16px;border-bottom-right-radius:16px;-webkit-mask-image:-webkit-radial-gradient(#fff,#000)}:host-context(.shape-rounded):not(.has-sections) .has-footer ion-item,:host-context(.shape-rounded):not(.has-sections) .has-footer ion-item-sliding,:host-context(.shape-rounded) ion-item-sliding>ion-item{border-bottom-left-radius:0;border-bottom-right-radius:0}:host-context(.shape-none) .list,:host-context(.shape-none) .list-items{box-shadow:none;border-radius:unset}:host-context(.shape-none) .list ion-item,:host-context(.shape-none) .list ion-item-sliding{--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-top:0;--inner-padding-bottom:0;--background:none;--background-activated:none;--background-hover:none;--background-focused:none;overflow:visible}:host-context(.item-spacing) .list kirby-list-item{margin-bottom:16px}:host-context(.item-spacing) .list kirby-list-item:last-child,:host-context(.item-spacing) .list kirby-list-item>ion-item{margin-bottom:0}"]
6985
+ 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}.list{box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);background:transparent;contain:inherit;padding:0}ion-list-header{background-color:var(--kirby-white);border-bottom:1px solid var(--kirby-background-color);padding:0;text-transform:inherit;letter-spacing:inherit;font-weight:inherit;font-size:inherit;min-height:0;overflow:inherit}ion-item{--background:var(--kirby-white);--background-activated:var(--kirby-white-shade);--background-hover:var(--kirby-background-color);--background-focused:var(--kirby-background-color);--inner-border-width:0;--ion-safe-area-right:0;--min-height:56px;--padding-bottom:8px;--padding-end:16px;--padding-start:16px;--padding-top:8px;display:flex;font-size:14px;min-height:56px;overflow:visible;width:100%}ion-item-divider{font-weight:inherit}ion-item-sliding.item-sliding-active-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0)}ion-item-sliding.light{--kirby-item-background:var(--kirby-light);--kirby-item-background-activated:var(--kirby-light-shade);--kirby-item-background-focused:var(--kirby-light-shade);--kirby-item-background-hover:var(--kirby-light-tint)}ion-item-sliding.light ion-item{--background:var(--kirby-light);--color:var(--kirby-light-contrast);--background-activated:var(--kirby-light-shade);--background-focused:var(--kirby-light-shade);--background-hover:var(--kirby-light-tint)}ion-item-group{margin-bottom:24px}ion-item-group:last-of-type{margin-bottom:0}ion-item-divider{--inner-padding-end:0;--color:unset;background-color:transparent;border-color:transparent;min-height:0;padding:0 16px 8px}.footer{background-color:var(--kirby-white);border-top:1px solid var(--kirby-background-color);display:flex;align-items:center;justify-content:space-between;width:100%}.loading,.no-more-items{width:100%;padding:24px 0;text-align:center}.swipe-action{display:flex;color:var(--kirby-black);background-color:transparent}.swipe-action ion-item-option{height:100%;display:inline-block;text-align:center}.swipe-action .item-content{display:inline-grid;min-width:70px;flex-direction:column}.swipe-action .item-content ion-label{--background:unset;--color:unset}ion-item-options[side=end]{border-bottom-width:0}:host-context(.has-sections) .list{box-shadow:none}:host-context(.has-sections) .list-items{box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);border-radius:16px}:host-context(.has-sections) .footer{background-color:transparent;border-top:none}:host-context(.has-sections) ion-list-header{background-color:transparent;border-bottom:none}:host-context(.shape-rounded) .list,:host-context(.shape-rounded) .list-items{border-radius:16px}:host-context(.shape-rounded) ion-item-sliding.first,:host-context(.shape-rounded) ion-item.first,:host-context(.shape-rounded) ion-list-header{border-top-left-radius:16px;border-top-right-radius:16px;-webkit-mask-image:-webkit-radial-gradient(#fff,#000)}:host-context(.shape-rounded):not(.has-sections) .has-header ion-item,:host-context(.shape-rounded):not(.has-sections) .has-header ion-item-sliding,:host-context(.shape-rounded) ion-item-sliding>ion-item{border-top-left-radius:0;border-top-right-radius:0}:host-context(.shape-rounded) .footer,:host-context(.shape-rounded) ion-item-sliding.last,:host-context(.shape-rounded) ion-item.last{border-bottom-left-radius:16px;border-bottom-right-radius:16px;-webkit-mask-image:-webkit-radial-gradient(#fff,#000)}:host-context(.shape-rounded):not(.has-sections) .has-footer ion-item,:host-context(.shape-rounded):not(.has-sections) .has-footer ion-item-sliding,:host-context(.shape-rounded) ion-item-sliding>ion-item{border-bottom-left-radius:0;border-bottom-right-radius:0}:host-context(.shape-none) .list,:host-context(.shape-none) .list-items{box-shadow:none;border-radius:unset}:host-context(.shape-none) .list ion-item,:host-context(.shape-none) .list ion-item-sliding{--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-top:0;--inner-padding-bottom:0;--background:none;--background-activated:none;--background-hover:none;--background-focused:none;overflow:visible}:host-context(.item-spacing) .list kirby-list-item{margin-bottom:16px}:host-context(.item-spacing) .list kirby-list-item:last-child,:host-context(.item-spacing) .list kirby-list-item>ion-item{margin-bottom:0}"]
6485
6986
  },] }
6486
6987
  ];
6487
6988
  /** @nocollapse */
@@ -6642,7 +7143,7 @@ ListItemComponent.decorators = [
6642
7143
  { type: Component, args: [{
6643
7144
  selector: 'kirby-list-item',
6644
7145
  template: "<ion-item-sliding\n [class.selected]=\"isSelected\"\n [kirbyListItemColor]=\"getItemColor\"\n [item]=\"item\"\n [disabled]=\"_isSwipingEnabled ? null : true\"\n keyHandler\n [ngClass]=\"boundaryClass\"\n (click)=\"_onItemSelect(item)\"\n>\n <ng-container\n *ngTemplateOutlet=\"swipeActionsTemplate; context: { $implicit: item }\"\n ></ng-container>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n</ion-item-sliding>\n\n<ng-template #swipeActionsTemplate let-item>\n <ion-item-options *ngIf=\"_hasSwipeActions(item)\" [side]=\"_getSwipeActionEnd(item)\">\n <div class=\"swipe-action\">\n <ng-container *ngFor=\"let swipeAction of _getSwipeActions(item)\">\n <ion-item-option\n [ngClass]=\"_getSwipeActionType(swipeAction, item)\"\n (click)=\"_onSwipeActionSelect(swipeAction, item, $event)\"\n >\n <div class=\"item-content\">\n <kirby-icon\n *ngIf=\"_getSwipeActionIcon(swipeAction, item)\"\n size=\"sm\"\n [name]=\"_getSwipeActionIcon(swipeAction, item)\"\n >\n </kirby-icon>\n <ion-label>\n {{ _getSwipeActionTitle(swipeAction, item) }}\n </ion-label>\n </div>\n </ion-item-option>\n </ng-container>\n </div>\n </ion-item-options>\n</ng-template>\n",
6645
- styles: [":host{display:block}.list{box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);background:transparent;contain:inherit;padding:0}ion-list-header{background-color:var(--kirby-white);border-bottom:1px solid var(--kirby-background-color);padding:0;text-transform:inherit;letter-spacing:inherit;font-weight:inherit;font-size:inherit;min-height:0;overflow:inherit}ion-item{--background:var(--kirby-white);--background-activated:var(--kirby-white-shade);--background-hover:var(--kirby-background-color);--background-focused:var(--kirby-background-color);--inner-border-width:0;--ion-safe-area-right:0;--min-height:56px;--padding-bottom:8px;--padding-end:16px;--padding-start:16px;--padding-top:8px;display:flex;font-size:14px;min-height:56px;overflow:visible;width:100%}ion-item-divider{font-weight:inherit}ion-item-sliding.item-sliding-active-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0)}ion-item-sliding.light{--kirby-item-background:var(--kirby-light);--kirby-item-background-activated:var(--kirby-light-shade);--kirby-item-background-focused:var(--kirby-light-shade);--kirby-item-background-hover:var(--kirby-light-tint)}ion-item-sliding.light ion-item{--background:var(--kirby-light);--color:var(--kirby-light-contrast);--background-activated:var(--kirby-light-shade);--background-focused:var(--kirby-light-shade);--background-hover:var(--kirby-light-tint)}ion-item-group{margin-bottom:24px}ion-item-group:last-of-type{margin-bottom:0}ion-item-divider{--inner-padding-end:0;--color:unset;background-color:transparent;border-color:transparent;min-height:0;padding:0 16px 8px}.footer{background-color:var(--kirby-white);border-top:1px solid var(--kirby-background-color);display:flex;align-items:center;justify-content:space-between;width:100%}.loading,.no-more-items{width:100%;padding:24px 0;text-align:center}.swipe-action{display:flex;color:var(--kirby-black);background-color:transparent}.swipe-action .primary{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}.swipe-action .secondary{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}.swipe-action .tertiary{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}.swipe-action .success{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}.swipe-action .warning{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}.swipe-action .danger{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}.swipe-action .light{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}.swipe-action .medium{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}.swipe-action .dark{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}.swipe-action ion-item-option{height:100%;display:inline-block;text-align:center}.swipe-action .item-content{display:inline-grid;min-width:70px;flex-direction:column}.swipe-action .item-content ion-label{--background:unset;--color:unset}ion-item-options[side=end]{border-bottom-width:0}:host-context(.has-sections) .list{box-shadow:none}:host-context(.has-sections) .list-items{box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);border-radius:16px}:host-context(.has-sections) .footer{background-color:transparent;border-top:none}:host-context(.has-sections) ion-list-header{background-color:transparent;border-bottom:none}:host-context(.shape-rounded) .list,:host-context(.shape-rounded) .list-items{border-radius:16px}:host-context(.shape-rounded) ion-item-sliding.first,:host-context(.shape-rounded) ion-item.first,:host-context(.shape-rounded) ion-list-header{border-top-left-radius:16px;border-top-right-radius:16px;-webkit-mask-image:-webkit-radial-gradient(#fff,#000)}:host-context(.shape-rounded):not(.has-sections) .has-header ion-item,:host-context(.shape-rounded):not(.has-sections) .has-header ion-item-sliding,:host-context(.shape-rounded) ion-item-sliding>ion-item{border-top-left-radius:0;border-top-right-radius:0}:host-context(.shape-rounded) .footer,:host-context(.shape-rounded) ion-item-sliding.last,:host-context(.shape-rounded) ion-item.last{border-bottom-left-radius:16px;border-bottom-right-radius:16px;-webkit-mask-image:-webkit-radial-gradient(#fff,#000)}:host-context(.shape-rounded):not(.has-sections) .has-footer ion-item,:host-context(.shape-rounded):not(.has-sections) .has-footer ion-item-sliding,:host-context(.shape-rounded) ion-item-sliding>ion-item{border-bottom-left-radius:0;border-bottom-right-radius:0}:host-context(.shape-none) .list,:host-context(.shape-none) .list-items{box-shadow:none;border-radius:unset}:host-context(.shape-none) .list ion-item,:host-context(.shape-none) .list ion-item-sliding{--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-top:0;--inner-padding-bottom:0;--background:none;--background-activated:none;--background-hover:none;--background-focused:none;overflow:visible}:host-context(.item-spacing) .list kirby-list-item{margin-bottom:16px}:host-context(.item-spacing) .list kirby-list-item:last-child,:host-context(.item-spacing) .list kirby-list-item>ion-item{margin-bottom:0}", ":host{overflow:hidden}:host-context(.has-divider) ion-item-sliding:not(.last){border-bottom:1px solid var(--kirby-background-color)}"]
7146
+ 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}.list{box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);background:transparent;contain:inherit;padding:0}ion-list-header{background-color:var(--kirby-white);border-bottom:1px solid var(--kirby-background-color);padding:0;text-transform:inherit;letter-spacing:inherit;font-weight:inherit;font-size:inherit;min-height:0;overflow:inherit}ion-item{--background:var(--kirby-white);--background-activated:var(--kirby-white-shade);--background-hover:var(--kirby-background-color);--background-focused:var(--kirby-background-color);--inner-border-width:0;--ion-safe-area-right:0;--min-height:56px;--padding-bottom:8px;--padding-end:16px;--padding-start:16px;--padding-top:8px;display:flex;font-size:14px;min-height:56px;overflow:visible;width:100%}ion-item-divider{font-weight:inherit}ion-item-sliding.item-sliding-active-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0)}ion-item-sliding.light{--kirby-item-background:var(--kirby-light);--kirby-item-background-activated:var(--kirby-light-shade);--kirby-item-background-focused:var(--kirby-light-shade);--kirby-item-background-hover:var(--kirby-light-tint)}ion-item-sliding.light ion-item{--background:var(--kirby-light);--color:var(--kirby-light-contrast);--background-activated:var(--kirby-light-shade);--background-focused:var(--kirby-light-shade);--background-hover:var(--kirby-light-tint)}ion-item-group{margin-bottom:24px}ion-item-group:last-of-type{margin-bottom:0}ion-item-divider{--inner-padding-end:0;--color:unset;background-color:transparent;border-color:transparent;min-height:0;padding:0 16px 8px}.footer{background-color:var(--kirby-white);border-top:1px solid var(--kirby-background-color);display:flex;align-items:center;justify-content:space-between;width:100%}.loading,.no-more-items{width:100%;padding:24px 0;text-align:center}.swipe-action{display:flex;color:var(--kirby-black);background-color:transparent}.swipe-action ion-item-option{height:100%;display:inline-block;text-align:center}.swipe-action .item-content{display:inline-grid;min-width:70px;flex-direction:column}.swipe-action .item-content ion-label{--background:unset;--color:unset}ion-item-options[side=end]{border-bottom-width:0}:host-context(.has-sections) .list{box-shadow:none}:host-context(.has-sections) .list-items{box-shadow:0 5px 10px -10px rgba(28,28,28,.3),0 0 5px 0 rgba(28,28,28,.08);border-radius:16px}:host-context(.has-sections) .footer{background-color:transparent;border-top:none}:host-context(.has-sections) ion-list-header{background-color:transparent;border-bottom:none}:host-context(.shape-rounded) .list,:host-context(.shape-rounded) .list-items{border-radius:16px}:host-context(.shape-rounded) ion-item-sliding.first,:host-context(.shape-rounded) ion-item.first,:host-context(.shape-rounded) ion-list-header{border-top-left-radius:16px;border-top-right-radius:16px;-webkit-mask-image:-webkit-radial-gradient(#fff,#000)}:host-context(.shape-rounded):not(.has-sections) .has-header ion-item,:host-context(.shape-rounded):not(.has-sections) .has-header ion-item-sliding,:host-context(.shape-rounded) ion-item-sliding>ion-item{border-top-left-radius:0;border-top-right-radius:0}:host-context(.shape-rounded) .footer,:host-context(.shape-rounded) ion-item-sliding.last,:host-context(.shape-rounded) ion-item.last{border-bottom-left-radius:16px;border-bottom-right-radius:16px;-webkit-mask-image:-webkit-radial-gradient(#fff,#000)}:host-context(.shape-rounded):not(.has-sections) .has-footer ion-item,:host-context(.shape-rounded):not(.has-sections) .has-footer ion-item-sliding,:host-context(.shape-rounded) ion-item-sliding>ion-item{border-bottom-left-radius:0;border-bottom-right-radius:0}:host-context(.shape-none) .list,:host-context(.shape-none) .list-items{box-shadow:none;border-radius:unset}:host-context(.shape-none) .list ion-item,:host-context(.shape-none) .list ion-item-sliding{--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-top:0;--inner-padding-bottom:0;--background:none;--background-activated:none;--background-hover:none;--background-focused:none;overflow:visible}:host-context(.item-spacing) .list kirby-list-item{margin-bottom:16px}:host-context(.item-spacing) .list kirby-list-item:last-child,:host-context(.item-spacing) .list kirby-list-item>ion-item{margin-bottom:0}", ":host{overflow:hidden}:host-context(.has-divider) ion-item-sliding:not(.last){border-bottom:1px solid var(--kirby-background-color)}"]
6646
7147
  },] }
6647
7148
  ];
6648
7149
  /** @nocollapse */
@@ -6686,6 +7187,11 @@ ListItemColorDirective.propDecorators = {
6686
7187
  };
6687
7188
 
6688
7189
  class ListExperimentalComponent {
7190
+ closeAllSlidingItems(e) {
7191
+ if (elementHasAncestor(e.target, 'ion-item-option', 'ion-list')) {
7192
+ this.list.closeSlidingItems();
7193
+ }
7194
+ }
6689
7195
  }
6690
7196
  ListExperimentalComponent.decorators = [
6691
7197
  { type: Component, args: [{
@@ -6693,6 +7199,10 @@ ListExperimentalComponent.decorators = [
6693
7199
  template: "<ion-list>\n <ng-content></ng-content>\n</ion-list>\n"
6694
7200
  },] }
6695
7201
  ];
7202
+ ListExperimentalComponent.propDecorators = {
7203
+ list: [{ type: ViewChild, args: [IonList, { static: true },] }],
7204
+ closeAllSlidingItems: [{ type: HostListener, args: ['click', ['$event'],] }]
7205
+ };
6696
7206
 
6697
7207
  class ReorderEvent {
6698
7208
  constructor(ev, parentItem) {
@@ -7394,6 +7904,16 @@ RouterOutletModule.decorators = [
7394
7904
  },] }
7395
7905
  ];
7396
7906
 
7907
+ class SectionHeaderComponent {
7908
+ }
7909
+ SectionHeaderComponent.decorators = [
7910
+ { type: Component, args: [{
7911
+ selector: 'kirby-section-header',
7912
+ template: "<ion-item-divider>\n <ng-content></ng-content>\n</ion-item-divider>\n",
7913
+ styles: [":host{--kirby-section-header-color:var(--kirby-text-color-black)}:host ion-item-divider{--inner-padding-end:0;--background:transparent;--padding-end:16px;--padding-start:16px;font-weight:inherit;min-height:0}:host ion-item-divider ::ng-deep>[heading]{font-weight:700;font-size:18px;line-height:24px;color:var(--kirby-section-header-color);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ion-item-divider ::ng-deep>[detail],:host ion-item-divider ::ng-deep>[label]{font-weight:300;font-size:14px;line-height:20px;color:var(--kirby-section-header-color);margin:4px 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
7914
+ },] }
7915
+ ];
7916
+
7397
7917
  var SegmentedControlMode;
7398
7918
  (function (SegmentedControlMode) {
7399
7919
  SegmentedControlMode["chip"] = "chip";
@@ -8421,11 +8941,13 @@ const exportedDeclarations$1 = [
8421
8941
  SlideDirective,
8422
8942
  AccordionDirective,
8423
8943
  AccordionItemComponent,
8944
+ ItemSlidingComponent,
8424
8945
  RadioComponent,
8425
8946
  RadioGroupComponent,
8426
8947
  RangeComponent,
8427
8948
  ElementAsButtonDirective,
8428
8949
  ItemGroupComponent,
8950
+ SectionHeaderComponent,
8429
8951
  ];
8430
8952
  const declarations$1 = [
8431
8953
  ...exportedDeclarations$1,
@@ -8516,5 +9038,5 @@ KirbyModule.ctorParameters = () => [
8516
9038
  * Generated bundle index. Do not edit.
8517
9039
  */
8518
9040
 
8519
- export { AccordionDirective, AccordionItemComponent, ActionSheetComponent, AppComponent, AppModule, AvatarComponent, AvatarSize, KirbyBadge as BadgeComponent, ButtonComponent, ButtonSize, COMPONENT_PROPS, CalendarComponent, CardComponent, CardFooterComponent, CardHeaderComponent, ChartComponent, ChartDeprecatedComponent, ChartDeprecatedType, CheckboxComponent, ChipComponent, ComponentLoaderDirective, DateInputDirective, DecimalMaskDirective, DividerComponent, DropdownComponent, EmptyStateComponent, FabSheetComponent, FitHeadingDirective, FitHeadingModule, FlagComponent, FormFieldComponent, FormFieldMessageComponent, GridCardConfiguration, GridComponent, GroupByPipe, HorizontalDirection, ICON_SETTINGS, IconComponent, IconModule, IconRegistryService, IconSize, InfiniteScrollDirective, InputComponent, InputCounterComponent, InputSize, ItemComponent, ItemGroupComponent, ItemModule, ItemSize, KeyHandlerDirective, KirbyAnimation, KirbyModule, LabelComponent, ListComponent, ListExperimentalComponent, ListFlexItemDirective, ListFooterDirective, ListHeaderComponent, ListHeaderDirective, ListItemColorDirective, ListItemComponent, ListItemDirective, ListItemTemplateDirective, ListSectionHeaderComponent, ListSectionHeaderDirective, LoadingOverlayComponent, LoadingOverlayService, Modal, ModalController, ModalFooterComponent, PageActionsComponent, PageActionsDirective, PageComponent, PageContentComponent, PageContentDirective, PageFooterComponent, PageModule, PageProgressComponent, PageTitleComponent, PageTitleDirective, PageToolbarTitleDirective, PlatformService, PopoverComponent, ProgressCircleComponent, RadioComponent, RadioGroupComponent, RangeComponent, ReorderEvent, ReorderListComponent, ResizeObserverFactory, ResizeObserverService, RouterOutletComponent, RouterOutletModule, ScssHelper, SegmentedControlComponent, SegmentedControlMode, SlideButtonComponent, SlideDirective, SlidesComponent, SpinnerComponent, StockChartDeprecatedComponent, TabButtonComponent, TabsComponent, TabsModule, TabsService, TextareaComponent, ThemeColorDirective, ToastController, ToggleButtonComponent, ToggleComponent, annotations, defaultIcons, isNumberArray, selectedTabClickEvent, stockChartDeprecatedOptions, ɵ0$6 as ɵ0, ProxyCmp as ɵa, AppModule as ɵb, ModalWrapperComponent as ɵba, Modal as ɵbb, ButtonComponent as ɵbc, IconComponent as ɵbd, IconRegistryService as ɵbe, ICON_SETTINGS as ɵbg, ResizeObserverService as ɵbh, ResizeObserverFactory as ɵbi, FitHeadingModule as ɵbj, FitHeadingDirective as ɵbk, LineClampHelper as ɵbl, SpinnerModule as ɵbm, SpinnerComponent as ɵbn, TabsModule as ɵbo, IconModule as ɵbp, TabButtonComponent as ɵbq, ItemModule as ɵbr, ItemComponent as ɵbs, LabelComponent as ɵbt, ToggleButtonModule as ɵbu, ToggleButtonComponent as ɵbv, ListModule as ɵbw, ListComponent as ɵbx, ListHelper as ɵby, GroupByPipe as ɵbz, AppComponent as ɵc, InfiniteScrollDirective as ɵca, ListItemDirective as ɵcb, ListFlexItemDirective as ɵcc, ListItemTemplateDirective as ɵcd, ListHeaderDirective as ɵce, ListSectionHeaderDirective as ɵcf, ListFooterDirective as ɵcg, ListItemComponent as ɵch, ListSectionHeaderComponent as ɵci, ListHeaderComponent as ɵcj, ListExperimentalComponent as ɵck, ListItemColorDirective as ɵcl, ChartModule as ɵcm, ChartComponent as ɵcn, ChartJSService as ɵco, ChartConfigService as ɵcp, CardComponent as ɵcq, CardHeaderComponent as ɵcr, CardFooterComponent as ɵcs, ChartDeprecatedComponent as ɵct, ChartDeprecatedHelper as ɵcu, DONUT_OPTIONS as ɵcv, DonutOptions as ɵcw, AREASPLINE_OPTIONS as ɵcx, AreaSplineOptions as ɵcy, TIMESERIES_OPTIONS as ɵcz, RouterOutletComponent as ɵd, TimeSeriesOptions as ɵda, ACTIVITYGAUGE_OPTIONS as ɵdb, ActivityGaugeOptions as ɵdc, StockChartDeprecatedComponent as ɵdd, GridComponent as ɵde, BreakpointHelperService as ɵdf, ComponentLoaderDirective as ɵdg, AvatarComponent as ɵdh, CalendarComponent as ɵdi, CalendarHelper as ɵdj, CheckboxComponent as ɵdk, ActionSheetComponent as ɵdl, ModalFooterComponent as ɵdm, ModalRouterLinkDirective as ɵdn, SegmentedControlComponent as ɵdo, ChipComponent as ɵdp, ThemeColorDirective as ɵdq, DateInputDirective as ɵdr, DecimalMaskDirective as ɵds, SlideButtonComponent as ɵdt, ToggleComponent as ɵdu, EmptyStateComponent as ɵdv, FormFieldComponent as ɵdw, InputCounterComponent as ɵdx, RadioGroupComponent as ɵdy, RadioComponent as ɵdz, ModalController as ɵe, InputComponent as ɵea, TextareaComponent as ɵeb, FabSheetComponent as ɵec, DividerComponent as ɵed, ReorderListComponent as ɵee, DropdownComponent as ɵef, PopoverComponent as ɵeg, KeyboardHandlerService as ɵeh, LoadingOverlayComponent as ɵei, ProgressCircleComponent as ɵej, FlagComponent as ɵek, SlideDirective as ɵel, SlidesComponent as ɵem, AccordionDirective as ɵen, AccordionItemComponent as ɵeo, RangeComponent as ɵep, ElementAsButtonDirective as ɵeq, ItemGroupComponent as ɵer, KeyHandlerDirective as ɵes, FormFieldMessageComponent as ɵet, AlertComponent as ɵeu, ModalCompactWrapperComponent as ɵev, ProgressCircleRingComponent as ɵew, ToastHelper as ɵex, ToastController as ɵey, LoadingOverlayService as ɵez, ModalHelper as ɵf, appInitialize as ɵfa, customElementsInitializer as ɵfb, ModalAnimationBuilderService as ɵg, PlatformService as ɵh, WindowRef as ɵi, ActionSheetHelper as ɵj, AlertHelper as ɵk, ModalNavigationService as ɵl, RouterOutletModule as ɵm, PageModule as ɵn, PageTitleDirective as ɵo, PageToolbarTitleDirective as ɵp, PageActionsDirective as ɵq, PageContentDirective as ɵr, PageProgressComponent as ɵs, PageTitleComponent as ɵt, PageContentComponent as ɵu, PageActionsComponent as ɵv, PageComponent as ɵw, TabsComponent as ɵx, TabsService as ɵy, PageFooterComponent as ɵz };
9041
+ export { AccordionDirective, AccordionItemComponent, ActionSheetComponent, AppComponent, AppModule, AvatarComponent, AvatarSize, KirbyBadge as BadgeComponent, ButtonComponent, ButtonSize, COMPONENT_PROPS, CalendarComponent, CardComponent, CardFooterComponent, CardHeaderComponent, ChartComponent, ChartDeprecatedComponent, ChartDeprecatedType, CheckboxComponent, ChipComponent, ComponentLoaderDirective, DateInputDirective, DecimalMaskDirective, DividerComponent, DropdownComponent, EmptyStateComponent, FabSheetComponent, FitHeadingDirective, FitHeadingModule, FlagComponent, FormFieldComponent, FormFieldMessageComponent, GridCardConfiguration, GridComponent, GroupByPipe, HorizontalDirection, ICON_SETTINGS, IconComponent, IconModule, IconRegistryService, IconSize, InfiniteScrollDirective, InputComponent, InputCounterComponent, InputSize, ItemComponent, ItemGroupComponent, ItemModule, ItemSize, ItemSlidingComponent, KeyHandlerDirective, KirbyAnimation, KirbyModule, LabelComponent, ListComponent, ListExperimentalComponent, ListFlexItemDirective, ListFooterDirective, ListHeaderComponent, ListHeaderDirective, ListItemColorDirective, ListItemComponent, ListItemDirective, ListItemTemplateDirective, ListSectionHeaderComponent, ListSectionHeaderDirective, LoadingOverlayComponent, LoadingOverlayService, Modal, ModalController, ModalFooterComponent, PageActionsComponent, PageActionsDirective, PageComponent, PageContentComponent, PageContentDirective, PageFooterComponent, PageModule, PageProgressComponent, PageTitleComponent, PageTitleDirective, PageToolbarTitleDirective, PlatformService, PopoverComponent, ProgressCircleComponent, RadioComponent, RadioGroupComponent, RangeComponent, ReorderEvent, ReorderListComponent, ResizeObserverFactory, ResizeObserverService, RouterOutletComponent, RouterOutletModule, ScssHelper, SectionHeaderComponent, SegmentedControlComponent, SegmentedControlMode, SlideButtonComponent, SlideDirective, SlidesComponent, SpinnerComponent, StockChartDeprecatedComponent, TabButtonComponent, TabsComponent, TabsModule, TabsService, TextareaComponent, ThemeColorDirective, ToastController, ToggleButtonComponent, ToggleComponent, annotations, defaultIcons, elementHasAncestor, isNumberArray, selectedTabClickEvent, stockChartDeprecatedOptions, ɵ0$8 as ɵ0, ProxyCmp as ɵa, AppModule as ɵb, ModalWrapperComponent as ɵba, Modal as ɵbb, ButtonComponent as ɵbc, IconComponent as ɵbd, IconRegistryService as ɵbe, ICON_SETTINGS as ɵbg, ResizeObserverService as ɵbh, ResizeObserverFactory as ɵbi, FitHeadingModule as ɵbj, FitHeadingDirective as ɵbk, LineClampHelper as ɵbl, SpinnerModule as ɵbm, SpinnerComponent as ɵbn, TabsModule as ɵbo, IconModule as ɵbp, TabButtonComponent as ɵbq, ItemModule as ɵbr, ItemComponent as ɵbs, LabelComponent as ɵbt, ToggleButtonModule as ɵbu, ToggleButtonComponent as ɵbv, ListModule as ɵbw, ListComponent as ɵbx, ListHelper as ɵby, GroupByPipe as ɵbz, AppComponent as ɵc, InfiniteScrollDirective as ɵca, ListItemDirective as ɵcb, ListFlexItemDirective as ɵcc, ListItemTemplateDirective as ɵcd, ListHeaderDirective as ɵce, ListSectionHeaderDirective as ɵcf, ListFooterDirective as ɵcg, ListItemComponent as ɵch, ListSectionHeaderComponent as ɵci, ListHeaderComponent as ɵcj, ListExperimentalComponent as ɵck, ListItemColorDirective as ɵcl, ChartModule as ɵcm, ChartComponent as ɵcn, ChartJSService as ɵco, ChartConfigService as ɵcp, CardComponent as ɵcq, CardHeaderComponent as ɵcr, CardFooterComponent as ɵcs, ChartDeprecatedComponent as ɵct, ChartDeprecatedHelper as ɵcu, DONUT_OPTIONS as ɵcv, DonutOptions as ɵcw, AREASPLINE_OPTIONS as ɵcx, AreaSplineOptions as ɵcy, TIMESERIES_OPTIONS as ɵcz, RouterOutletComponent as ɵd, TimeSeriesOptions as ɵda, ACTIVITYGAUGE_OPTIONS as ɵdb, ActivityGaugeOptions as ɵdc, StockChartDeprecatedComponent as ɵdd, GridComponent as ɵde, BreakpointHelperService as ɵdf, ComponentLoaderDirective as ɵdg, AvatarComponent as ɵdh, CalendarComponent as ɵdi, CalendarHelper as ɵdj, CheckboxComponent as ɵdk, ActionSheetComponent as ɵdl, ModalFooterComponent as ɵdm, ModalRouterLinkDirective as ɵdn, SegmentedControlComponent as ɵdo, ChipComponent as ɵdp, ThemeColorDirective as ɵdq, DateInputDirective as ɵdr, DecimalMaskDirective as ɵds, SlideButtonComponent as ɵdt, ToggleComponent as ɵdu, EmptyStateComponent as ɵdv, FormFieldComponent as ɵdw, InputCounterComponent as ɵdx, RadioGroupComponent as ɵdy, RadioComponent as ɵdz, ModalController as ɵe, InputComponent as ɵea, TextareaComponent as ɵeb, FabSheetComponent as ɵec, DividerComponent as ɵed, ReorderListComponent as ɵee, DropdownComponent as ɵef, PopoverComponent as ɵeg, KeyboardHandlerService as ɵeh, LoadingOverlayComponent as ɵei, ProgressCircleComponent as ɵej, FlagComponent as ɵek, SlideDirective as ɵel, SlidesComponent as ɵem, AccordionDirective as ɵen, AccordionItemComponent as ɵeo, ItemSlidingComponent as ɵep, RangeComponent as ɵeq, ElementAsButtonDirective as ɵer, ItemGroupComponent as ɵes, SectionHeaderComponent as ɵet, KeyHandlerDirective as ɵeu, FormFieldMessageComponent as ɵev, AlertComponent as ɵew, ModalCompactWrapperComponent as ɵex, ProgressCircleRingComponent as ɵey, ToastHelper as ɵez, ModalHelper as ɵf, ToastController as ɵfa, LoadingOverlayService as ɵfb, appInitialize as ɵfc, customElementsInitializer as ɵfd, ModalAnimationBuilderService as ɵg, PlatformService as ɵh, WindowRef as ɵi, ActionSheetHelper as ɵj, AlertHelper as ɵk, ModalNavigationService as ɵl, RouterOutletModule as ɵm, PageModule as ɵn, PageTitleDirective as ɵo, PageToolbarTitleDirective as ɵp, PageActionsDirective as ɵq, PageContentDirective as ɵr, PageProgressComponent as ɵs, PageTitleComponent as ɵt, PageContentComponent as ɵu, PageActionsComponent as ɵv, PageComponent as ɵw, TabsComponent as ɵx, TabsService as ɵy, PageFooterComponent as ɵz };
8520
9042
  //# sourceMappingURL=kirbydesign-designsystem.js.map