@kirbydesign/designsystem 5.0.13 → 5.0.17

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 (62) hide show
  1. package/bundles/kirbydesign-designsystem-testing-base.umd.js +5 -4
  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 +19 -20
  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/lib/components/chart/chart-js/chart-js.service.js +10 -1
  10. package/esm2015/lib/components/chart/chart-js/chartjs-plugin-marker/chartjs-plugin-marker.js +10 -12
  11. package/esm2015/lib/components/chart/chart-js/chartjs-plugin-marker/chartjs-plugin-marker.metadata.json +1 -1
  12. package/esm2015/lib/components/chart/chart.types.js +1 -1
  13. package/esm2015/lib/components/chart/chart.types.metadata.json +1 -1
  14. package/esm2015/lib/components/chart/configs/type.config.js +1 -11
  15. package/esm2015/lib/components/chart/configs/type.config.metadata.json +1 -1
  16. package/esm2015/lib/components/dropdown/dropdown.component.js +2 -2
  17. package/esm2015/lib/components/dropdown/dropdown.component.metadata.json +1 -1
  18. package/esm2015/testing-base/kirbydesign-designsystem-testing-base.js +3 -3
  19. package/esm2015/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
  20. package/esm2015/testing-base/lib/components/mock.item-sliding.component.js +1 -1
  21. package/esm2015/testing-base/lib/components/mock.list.component.js +3 -2
  22. package/esm2015/testing-base/lib/components/mock.list.component.metadata.json +1 -1
  23. package/esm2015/testing-base/lib/mock-components.js +2 -2
  24. package/esm2015/testing-base/lib/mock-components.metadata.json +1 -1
  25. package/fesm2015/kirbydesign-designsystem-testing-base.js +4 -3
  26. package/fesm2015/kirbydesign-designsystem-testing-base.js.map +1 -1
  27. package/fesm2015/kirbydesign-designsystem.js +19 -20
  28. package/fesm2015/kirbydesign-designsystem.js.map +1 -1
  29. package/kirbydesign-designsystem.metadata.json +1 -1
  30. package/lib/components/chart/chart.types.d.ts +1 -0
  31. package/package.json +2 -2
  32. package/scss/_global-styles.scss +1 -265
  33. package/scss/_utils.scss +1 -1
  34. package/scss/base/_functions.scss +1 -188
  35. package/scss/base/_ionic.scss +1 -36
  36. package/scss/base/_line-clamp.scss +1 -56
  37. package/scss/base/_list.scss +1 -11
  38. package/scss/base/_typography.scss +1 -105
  39. package/scss/base/_variables.scss +1 -197
  40. package/scss/print/_index.scss +1 -3
  41. package/scss/print/components/_index.scss +1 -7
  42. package/scss/print/components/_kirby-app.scss +1 -21
  43. package/scss/print/components/_kirby-fab-sheet.scss +1 -5
  44. package/scss/print/components/_kirby-list.scss +1 -24
  45. package/scss/print/components/_kirby-modal-wrapper.scss +1 -16
  46. package/scss/print/components/_kirby-page.scss +1 -17
  47. package/scss/print/components/_kirby-router-outlet.scss +1 -11
  48. package/scss/print/components/_kirby-tab-bar.scss +1 -25
  49. package/scss/print/elements/_button.scss +1 -6
  50. package/scss/print/elements/_index.scss +1 -3
  51. package/scss/print/elements/_page.scss +1 -6
  52. package/scss/print/elements/_preformatted-text.scss +1 -6
  53. package/scss/print/generic/_colors.scss +1 -9
  54. package/scss/print/generic/_index.scss +1 -4
  55. package/scss/print/generic/_page.scss +1 -40
  56. package/scss/print/generic/_reset.scss +1 -12
  57. package/scss/print/generic/_typography.scss +1 -70
  58. package/scss/themes/_colors.scss +1 -117
  59. package/testing-base/kirbydesign-designsystem-testing-base.d.ts +2 -2
  60. package/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
  61. package/testing-base/lib/components/mock.item-sliding.component.d.ts +2 -2
  62. package/testing-base/lib/components/mock.list.component.d.ts +1 -0
@@ -3337,16 +3337,6 @@ const CHART_TYPES_CONFIG = {
3337
3337
  },
3338
3338
  },
3339
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
3340
  datalabels: {
3351
3341
  backgroundColor: (context) => context.dataset.borderColor,
3352
3342
  color: getThemeColorHexString$1('white'),
@@ -3394,7 +3384,11 @@ ChartConfigService.decorators = [
3394
3384
  { type: Injectable }
3395
3385
  ];
3396
3386
 
3397
- // The marker pluin was heavily inspired by https://chartjs-plugin-crosshair.netlify.app
3387
+ /*
3388
+ The marker plugin is heavily inspired by https://chartjs-plugin-crosshair.netlify.app
3389
+ The project appears stale and only the vertical line feature is needed
3390
+ part of the plugin that was actually needed is implemented here.
3391
+ */
3398
3392
  var defaultOptions = {
3399
3393
  line: {
3400
3394
  color: 'black',
@@ -3406,14 +3400,10 @@ var defaultOptions = {
3406
3400
  },
3407
3401
  };
3408
3402
  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
3403
+ /*
3404
+ Hacky solution. Should be fixed in this issue: https://github.com/kirbydesign/designsystem/issues/1967
3405
+ */
3406
+ return chart.data.datasets.some((dataset) => { var _a; return !!((_a = dataset === null || dataset === void 0 ? void 0 : dataset.kirbyOptions) === null || _a === void 0 ? void 0 : _a.isStockChart); });
3417
3407
  };
3418
3408
  const ɵ0$7 = hasMarkerConfiguration;
3419
3409
  var MarkerPlugin = {
@@ -3904,6 +3894,15 @@ class ChartJSService {
3904
3894
  let datasets = isNumberArray(data) ? [{ data }] : data;
3905
3895
  if (this.highlightedElements)
3906
3896
  this.addHighlightedElementsToDatasets(this.highlightedElements, datasets);
3897
+ /*
3898
+ Hacky solution. Should be fixed in this issue:
3899
+ https://github.com/kirbydesign/designsystem/issues/1967
3900
+ */
3901
+ if (this.chartType === 'stock') {
3902
+ datasets.forEach((dataset) => {
3903
+ dataset.kirbyOptions = Object.assign(Object.assign({}, dataset.kirbyOptions), { isStockChart: true });
3904
+ });
3905
+ }
3907
3906
  return datasets;
3908
3907
  }
3909
3908
  /**
@@ -5576,7 +5575,7 @@ DropdownComponent.OPEN_DELAY_IN_MS = 100;
5576
5575
  DropdownComponent.decorators = [
5577
5576
  { type: Component, args: [{
5578
5577
  selector: 'kirby-dropdown',
5579
- template: "<button\n kirby-button\n [size]=\"size\"\n [attentionLevel]=\"isOpen ? attentionLevelOpen : attentionLevel\"\n tabindex=\"-1\"\n (click)=\"onToggle($event)\"\n (mousedown)=\"onButtonMouseEvent($event)\"\n [disabled]=\"disabled\"\n>\n <span class=\"text\">{{ selectedText || placeholder }}</span>\n <kirby-icon [name]=\"isOpen ? 'arrow-up' : 'arrow-down'\"></kirby-icon>\n</button>\n\n<ng-container *ngTemplateOutlet=\"usePopover ? popoverTemplate : itemWrapperTemplate\"></ng-container>\n\n<ng-template #popoverTemplate>\n <kirby-popover [target]=\"buttonElement\" [popout]=\"popout\" (willHide)=\"_onPopoverWillHide()\">\n <ng-container *ngTemplateOutlet=\"itemWrapperTemplate\"></ng-container>\n </kirby-popover>\n</ng-template>\n\n<ng-template #itemWrapperTemplate>\n <kirby-card>\n <ng-container *ngFor=\"let item of items; let i = index\">\n <ng-container\n *ngTemplateOutlet=\"\n itemTemplate || defaultItemTemplate;\n context: { $implicit: item, selected: i === selectedIndex, index: i }\n \"\n ></ng-container>\n </ng-container>\n </kirby-card>\n</ng-template>\n\n<ng-template #defaultItemTemplate let-item let-selected=\"selected\" let-index=\"index\">\n <kirby-item [selectable]=\"true\" [selected]=\"selected\" (click)=\"onItemSelect(index)\" role=\"option\">\n <!-- Tabindex fixes issue with popover dropdown not working in safari -->\n <h3 tabindex=\"0\">{{ getTextFromItem(item) }}</h3>\n <kirby-icon *ngIf=\"selected\" name=\"checkmark-selected\" slot=\"end\"></kirby-icon>\n </kirby-item>\n</ng-template>\n",
5578
+ template: "<button\n kirby-button\n [size]=\"size\"\n [attentionLevel]=\"isOpen ? attentionLevelOpen : attentionLevel\"\n tabindex=\"-1\"\n (click)=\"onToggle($event)\"\n (mousedown)=\"onButtonMouseEvent($event)\"\n [disabled]=\"disabled\"\n type=\"button\"\n>\n <span class=\"text\">{{ selectedText || placeholder }}</span>\n <kirby-icon [name]=\"isOpen ? 'arrow-up' : 'arrow-down'\"></kirby-icon>\n</button>\n\n<ng-container *ngTemplateOutlet=\"usePopover ? popoverTemplate : itemWrapperTemplate\"></ng-container>\n\n<ng-template #popoverTemplate>\n <kirby-popover [target]=\"buttonElement\" [popout]=\"popout\" (willHide)=\"_onPopoverWillHide()\">\n <ng-container *ngTemplateOutlet=\"itemWrapperTemplate\"></ng-container>\n </kirby-popover>\n</ng-template>\n\n<ng-template #itemWrapperTemplate>\n <kirby-card>\n <ng-container *ngFor=\"let item of items; let i = index\">\n <ng-container\n *ngTemplateOutlet=\"\n itemTemplate || defaultItemTemplate;\n context: { $implicit: item, selected: i === selectedIndex, index: i }\n \"\n ></ng-container>\n </ng-container>\n </kirby-card>\n</ng-template>\n\n<ng-template #defaultItemTemplate let-item let-selected=\"selected\" let-index=\"index\">\n <kirby-item [selectable]=\"true\" [selected]=\"selected\" (click)=\"onItemSelect(index)\" role=\"option\">\n <!-- Tabindex fixes issue with popover dropdown not working in safari -->\n <h3 tabindex=\"0\">{{ getTextFromItem(item) }}</h3>\n <kirby-icon *ngIf=\"selected\" name=\"checkmark-selected\" slot=\"end\"></kirby-icon>\n </kirby-item>\n</ng-template>\n",
5580
5579
  providers: [
5581
5580
  {
5582
5581
  provide: NG_VALUE_ACCESSOR,