@kirbydesign/designsystem 4.0.9 → 4.0.10

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 (105) hide show
  1. package/bundles/kirbydesign-designsystem-testing-base.umd.js +59 -84
  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 +271 -679
  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 +77 -76
  10. package/esm2015/kirbydesign-designsystem.metadata.json +1 -1
  11. package/esm2015/lib/animation/kirby-animation.js +7 -7
  12. package/esm2015/lib/components/angular-component-lib/utils.js +40 -0
  13. package/esm2015/lib/components/angular-component-lib/utils.metadata.json +1 -0
  14. package/esm2015/lib/components/avatar/avatar.component.js +2 -2
  15. package/esm2015/lib/components/avatar/avatar.component.metadata.json +1 -1
  16. package/esm2015/lib/components/button/button.component.js +1 -1
  17. package/esm2015/lib/components/button/button.component.metadata.json +1 -1
  18. package/esm2015/lib/components/calendar/calendar.component.js +2 -2
  19. package/esm2015/lib/components/card/card-header/card-header.component.js +1 -1
  20. package/esm2015/lib/components/chart-deprecated/options/bar.js +2 -2
  21. package/esm2015/lib/components/chart-deprecated/options/column.js +2 -2
  22. package/esm2015/lib/components/index.js +1 -2
  23. package/esm2015/lib/components/index.metadata.json +1 -1
  24. package/esm2015/lib/components/list/directives/list-item-color.directive.js +1 -1
  25. package/esm2015/lib/components/list/list-item/list-item.component.js +1 -1
  26. package/esm2015/lib/components/list/list-item/list-item.component.metadata.json +1 -1
  27. package/esm2015/lib/components/list/list.component.js +1 -1
  28. package/esm2015/lib/components/list/list.component.metadata.json +1 -1
  29. package/esm2015/lib/components/modal/modal-wrapper/modal-wrapper.component.js +2 -2
  30. package/esm2015/lib/components/modal/modal-wrapper/modal-wrapper.component.metadata.json +1 -1
  31. package/esm2015/lib/components/segmented-control/segment-item.js +1 -1
  32. package/esm2015/lib/components/segmented-control/segmented-control.component.js +3 -3
  33. package/esm2015/lib/components/segmented-control/segmented-control.component.metadata.json +1 -1
  34. package/esm2015/lib/components/stock-chart-deprecated/options/stock-chart-deprecated-options.js +2 -2
  35. package/esm2015/lib/components/web-component-proxies.component.js +42 -0
  36. package/esm2015/lib/components/web-component-proxies.component.metadata.json +1 -0
  37. package/esm2015/lib/custom-elements-initializer.js +17 -0
  38. package/esm2015/lib/custom-elements-initializer.metadata.json +1 -0
  39. package/esm2015/lib/directives/fit-heading/fit-heading.directive.js +2 -2
  40. package/esm2015/lib/directives/fit-heading/fit-heading.directive.metadata.json +1 -1
  41. package/esm2015/lib/directives/theme-color/theme-color.directive.js +2 -3
  42. package/esm2015/lib/directives/theme-color/theme-color.directive.metadata.json +1 -1
  43. package/esm2015/lib/helpers/color-helper.js +2 -117
  44. package/esm2015/lib/helpers/color-helper.metadata.json +1 -1
  45. package/esm2015/lib/helpers/design-token-helper.js +2 -80
  46. package/esm2015/lib/helpers/design-token-helper.metadata.json +1 -1
  47. package/esm2015/lib/helpers/index.js +4 -2
  48. package/esm2015/lib/helpers/index.metadata.json +1 -1
  49. package/esm2015/lib/helpers/platform.service.js +2 -2
  50. package/esm2015/lib/helpers/string-helper.js +2 -45
  51. package/esm2015/lib/helpers/string-helper.metadata.json +1 -1
  52. package/esm2015/lib/helpers/theme-color.type.js +1 -1
  53. package/esm2015/lib/helpers/theme-color.type.metadata.json +1 -1
  54. package/esm2015/lib/index.js +5 -1
  55. package/esm2015/lib/index.metadata.json +1 -1
  56. package/esm2015/lib/kirby.module.js +4 -2
  57. package/esm2015/lib/kirby.module.metadata.json +1 -1
  58. package/esm2015/testing-base/kirbydesign-designsystem-testing-base.js +51 -52
  59. package/esm2015/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
  60. package/esm2015/testing-base/lib/directives/mock.theme-color.directive.js +1 -2
  61. package/esm2015/testing-base/lib/directives/mock.theme-color.directive.metadata.json +1 -1
  62. package/esm2015/testing-base/lib/mock-components.js +1 -3
  63. package/esm2015/testing-base/lib/mock-components.metadata.json +1 -1
  64. package/fesm2015/kirbydesign-designsystem-testing-base.js +2 -24
  65. package/fesm2015/kirbydesign-designsystem-testing-base.js.map +1 -1
  66. package/fesm2015/kirbydesign-designsystem.js +107 -536
  67. package/fesm2015/kirbydesign-designsystem.js.map +1 -1
  68. package/kirbydesign-designsystem.d.ts +76 -75
  69. package/kirbydesign-designsystem.metadata.json +1 -1
  70. package/lib/components/angular-component-lib/utils.d.ts +7 -0
  71. package/lib/components/avatar/avatar.component.d.ts +1 -1
  72. package/lib/components/button/button.component.d.ts +1 -1
  73. package/lib/components/card/card-header/card-header.component.d.ts +1 -1
  74. package/lib/components/flag/flag.component.d.ts +1 -1
  75. package/lib/components/index.d.ts +0 -1
  76. package/lib/components/list/directives/list-item-color.directive.d.ts +1 -1
  77. package/lib/components/list/list-item/list-item.component.d.ts +1 -1
  78. package/lib/components/list/list.component.d.ts +1 -1
  79. package/lib/components/progress-circle/progress-circle.component.d.ts +1 -1
  80. package/lib/components/segmented-control/segment-item.d.ts +3 -2
  81. package/lib/components/web-component-proxies.component.d.ts +9 -0
  82. package/lib/custom-elements-initializer.d.ts +7 -0
  83. package/lib/directives/theme-color/theme-color.directive.d.ts +1 -1
  84. package/lib/helpers/color-helper.d.ts +1 -37
  85. package/lib/helpers/design-token-helper.d.ts +1 -42
  86. package/lib/helpers/index.d.ts +1 -1
  87. package/lib/helpers/string-helper.d.ts +1 -4
  88. package/lib/helpers/theme-color.type.d.ts +1 -1
  89. package/lib/index.d.ts +1 -0
  90. package/package.json +3 -2
  91. package/scss/base/_variables.scss +1 -0
  92. package/testing-base/kirbydesign-designsystem-testing-base.d.ts +50 -51
  93. package/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
  94. package/esm2015/lib/components/badge/badge.component.js +0 -14
  95. package/esm2015/lib/components/badge/badge.component.metadata.json +0 -1
  96. package/esm2015/lib/helpers/color-helper.styles.js +0 -194
  97. package/esm2015/lib/helpers/color-helper.styles.metadata.json +0 -1
  98. package/esm2015/lib/helpers/design-token-helper.styles.js +0 -79
  99. package/esm2015/lib/helpers/design-token-helper.styles.metadata.json +0 -1
  100. package/esm2015/testing-base/lib/components/mock.badge.component.js +0 -22
  101. package/esm2015/testing-base/lib/components/mock.badge.component.metadata.json +0 -1
  102. package/lib/components/badge/badge.component.d.ts +0 -3
  103. package/lib/helpers/color-helper.styles.d.ts +0 -206
  104. package/lib/helpers/design-token-helper.styles.d.ts +0 -124
  105. package/testing-base/lib/components/mock.badge.component.d.ts +0 -3
@@ -1,4 +1,6 @@
1
- import { Component, Input, EventEmitter, Output, Injectable, ɵɵdefineInjectable, ElementRef, ViewChild, ɵɵinject, InjectionToken, Injector, HostListener, Optional, Inject, HostBinding, ContentChild, NgZone, RendererStyleFlags2, Renderer2, ComponentFactoryResolver, ViewChildren, NgModule, ChangeDetectionStrategy, LOCALE_ID, Directive, forwardRef, ChangeDetectorRef, TemplateRef, ContentChildren, INJECTOR, Pipe, SkipSelf, ViewContainerRef } from '@angular/core';
1
+ import { DesignTokenHelper, ColorHelper, capitalizeFirstLetter } from '@kirbydesign/core';
2
+ export { ColorHelper, DesignTokenHelper, camelToKebabCase, capitalizeFirstLetter, kebabToCamelCase, kebabToTitleCase } from '@kirbydesign/core';
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, LOCALE_ID, Directive, forwardRef, ChangeDetectorRef, TemplateRef, ContentChildren, INJECTOR, Pipe, SkipSelf, ViewContainerRef, APP_INITIALIZER } from '@angular/core';
2
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';
3
5
  export { IonRouterOutlet, NavController } from '@ionic/angular';
4
6
  import { NavigationEnd, Router, ActivatedRoute, RouterOutlet, ROUTES, NavigationStart, RouterModule } from '@angular/router';
@@ -22,97 +24,19 @@ import Inputmask from 'inputmask/lib/inputmask';
22
24
  import 'inputmask/lib/extensions/inputmask.numeric.extensions';
23
25
  import { trigger, state, style, transition, animate } from '@angular/animations';
24
26
  import { UiScrollModule } from 'ngx-ui-scroll';
25
-
26
- const styles = {
27
- sizes: {
28
- xxxl: '56px',
29
- xxl: '48px',
30
- xl: '40px',
31
- l: '32px',
32
- m: '24px',
33
- s: '16px',
34
- xs: '12px',
35
- xxs: '8px',
36
- xxxs: '4px',
37
- xxxxs: '2px',
38
- },
39
- fontSizes: {
40
- xxxxl: '72px',
41
- xxxl: '56px',
42
- xxl: '40px',
43
- xl: '32px',
44
- l: '22px',
45
- m: '18px',
46
- n: '16px',
47
- s: '14px',
48
- xs: '12px',
49
- xxs: '10px',
50
- },
51
- lineHeight: { xl: '38px', l: '28px', m: '24px', n: '24px', s: '20px', xs: '16px', xxs: '11px' },
52
- fontWeight: { light: '300', normal: '400', bold: '700', black: '900' },
53
- iconFontSizes: { xs: '16px', sm: '24px', md: '32px', lg: '56px' },
54
- zLayers: {
55
- default: '1',
56
- segmentBadge: '2',
57
- dropdown: '800',
58
- popover: '850',
59
- modalOverlay: '900',
60
- modal: '901',
61
- loadingOverlay: '1001',
62
- },
63
- borderRadius: '16px',
64
- borderRadiusRound: '999px',
65
- breakpoints: {
66
- small: '321px',
67
- medium: '721px',
68
- large: '1025px',
69
- xlarge: '60em',
70
- xxlarge: '80em',
71
- },
72
- elevations: {
73
- 2: 'rgba(28, 28, 28, 0.3) 0px 5px 10px -10px, rgba(28, 28, 28, 0.08) 0px 0px 5px 0px',
74
- 4: 'rgba(28, 28, 28, 0.3) 0px 10px 15px -10px, rgba(28, 28, 28, 0.08) 0px 0px 5px 0px',
75
- 8: 'rgba(28, 28, 28, 0.3) 0px 20px 30px -15px, rgba(28, 28, 28, 0.08) 0px 0px 5px 0px',
76
- },
77
- avatarSizes: { xs: '32px', s: '40px', m: '56px', l: '96px' },
78
- avatarBadgeSize: '16px',
79
- pageContentMaxWidth: '720px',
80
- alertMaxWidth: '359px',
81
- compactModalMaxWidth: '359px',
82
- modalMaxWidth: '720px',
83
- modalHeights: { s: '288px', m: '460px', l: '576px' },
84
- modalDefaultHeight: '460px',
85
- drawerDefaultHeight: '288px',
86
- itemHeights: { m: '56px', s: '44px', xs: '32px' },
87
- dropdownItemHeight: '44px',
88
- fatFingerSize: '44px',
89
- checkboxRadioSizes: { xs: '32px', sm: '44px', md: '56px' },
90
- checkboxRadioSpacing: { toEdge: '16px', toLabel: '12px' },
91
- softKeyboardTransitionEnter: '250ms ease-out 1ms',
92
- softKeyboardTransitionLeave: '150ms ease-out',
93
- transitionDurations: { quick: '200ms', short: '300ms', long: '500ms', extraLong: '1000ms' },
94
- transitionEasings: {
95
- static: 'linear',
96
- enter: 'ease-out',
97
- exit: 'ease-in',
98
- enterExit: 'ease',
99
- motion: 'cubic-bezier(0.25, 0.1, 0.25, 1)',
100
- modal: { enter: 'cubic-bezier(0.32, 0.72, 0, 1)', exit: 'cubic-bezier(0.32, 0.72, 0, 1)' },
101
- },
102
- loadingOverlayBackdropOpacity: '0.8',
103
- };
27
+ import { defineCustomElements } from '@kirbydesign/core/loader';
104
28
 
105
29
  var KirbyAnimation;
106
30
  (function (KirbyAnimation) {
107
31
  let Duration;
108
32
  (function (Duration) {
109
33
  // Duration in milliseconds
110
- Duration[Duration["QUICK"] = parseInt(styles.transitionDurations.quick)] = "QUICK";
111
- Duration[Duration["SHORT"] = parseInt(styles.transitionDurations.short)] = "SHORT";
112
- Duration[Duration["LONG"] = parseInt(styles.transitionDurations.long)] = "LONG";
113
- Duration[Duration["EXTRA_LONG"] = parseInt(styles.transitionDurations.extraLong)] = "EXTRA_LONG";
34
+ Duration[Duration["QUICK"] = parseInt(DesignTokenHelper.transitionDuration('quick'))] = "QUICK";
35
+ Duration[Duration["SHORT"] = parseInt(DesignTokenHelper.transitionDuration('short'))] = "SHORT";
36
+ Duration[Duration["LONG"] = parseInt(DesignTokenHelper.transitionDuration('long'))] = "LONG";
37
+ Duration[Duration["EXTRA_LONG"] = parseInt(DesignTokenHelper.transitionDuration('extraLong'))] = "EXTRA_LONG";
114
38
  })(Duration = KirbyAnimation.Duration || (KirbyAnimation.Duration = {}));
115
- KirbyAnimation.Easing = styles.transitionEasings;
39
+ KirbyAnimation.Easing = DesignTokenHelper.transitionEasings();
116
40
  })(KirbyAnimation || (KirbyAnimation = {}));
117
41
 
118
42
  class RouterOutletComponent {
@@ -702,438 +626,6 @@ ModalCompactWrapperComponent.propDecorators = {
702
626
  onFocusChange: [{ type: HostListener, args: ['window:focus',] }, { type: HostListener, args: ['window:focusout',] }]
703
627
  };
704
628
 
705
- const styles$1 = {
706
- brandColors: { primary: '#00e89a', secondary: '#005c3c', tertiary: '#01352c' },
707
- notificationColors: { success: '#2cf287', warning: '#ffca3a', danger: '#ff595e' },
708
- systemColors: {
709
- backgroundColor: '#f6f6f6',
710
- white: '#ffffff',
711
- light: '#f2f2f2',
712
- semiLight: '#ebebeb',
713
- medium: '#d1d1d1',
714
- semiDark: '#8e8e8e',
715
- dark: '#353535',
716
- black: '#1c1c1c',
717
- },
718
- textColors: { white: '#ffffff', semiDark: '#707070', black: '#1c1c1c', danger: '#ee0d0d' },
719
- focusRingColor: '#4d90fe',
720
- mainColors: {
721
- primary: '#00e89a',
722
- secondary: '#005c3c',
723
- tertiary: '#01352c',
724
- success: '#2cf287',
725
- warning: '#ffca3a',
726
- danger: '#ff595e',
727
- light: '#f2f2f2',
728
- medium: '#d1d1d1',
729
- dark: '#353535',
730
- },
731
- kirbyColors: {
732
- black: '#1c1c1c',
733
- blackRgb: '28, 28, 28',
734
- blackContrast: '#ffffff',
735
- blackContrastRgb: '255, 255, 255',
736
- blackShade: '#191919',
737
- blackShadeRgb: '25, 25, 25',
738
- blackTint: '#333333',
739
- blackTintRgb: '51, 51, 51',
740
- blackColorBrightness: 'dark',
741
- dark: '#353535',
742
- darkRgb: '53, 53, 53',
743
- darkContrast: '#ffffff',
744
- darkContrastRgb: '255, 255, 255',
745
- darkShade: '#2f2f2f',
746
- darkShadeRgb: '47, 47, 47',
747
- darkTint: '#494949',
748
- darkTintRgb: '73, 73, 73',
749
- darkColorBrightness: 'dark',
750
- semiDark: '#8e8e8e',
751
- semiDarkRgb: '142, 142, 142',
752
- semiDarkContrast: '#1c1c1c',
753
- semiDarkContrastRgb: '28, 28, 28',
754
- semiDarkShade: '#7d7d7d',
755
- semiDarkShadeRgb: '125, 125, 125',
756
- semiDarkTint: '#999999',
757
- semiDarkTintRgb: '153, 153, 153',
758
- semiDarkColorBrightness: 'light',
759
- medium: '#d1d1d1',
760
- mediumRgb: '209, 209, 209',
761
- mediumContrast: '#1c1c1c',
762
- mediumContrastRgb: '28, 28, 28',
763
- mediumShade: '#b8b8b8',
764
- mediumShadeRgb: '184, 184, 184',
765
- mediumTint: '#d6d6d6',
766
- mediumTintRgb: '214, 214, 214',
767
- mediumColorBrightness: 'light',
768
- semiLight: '#ebebeb',
769
- semiLightRgb: '235, 235, 235',
770
- semiLightContrast: '#1c1c1c',
771
- semiLightContrastRgb: '28, 28, 28',
772
- semiLightShade: '#cfcfcf',
773
- semiLightShadeRgb: '207, 207, 207',
774
- semiLightTint: '#ededed',
775
- semiLightTintRgb: '237, 237, 237',
776
- semiLightColorBrightness: 'light',
777
- light: '#f2f2f2',
778
- lightRgb: '242, 242, 242',
779
- lightContrast: '#1c1c1c',
780
- lightContrastRgb: '28, 28, 28',
781
- lightShade: '#d5d5d5',
782
- lightShadeRgb: '213, 213, 213',
783
- lightTint: '#f3f3f3',
784
- lightTintRgb: '243, 243, 243',
785
- lightColorBrightness: 'light',
786
- white: '#ffffff',
787
- whiteRgb: '255, 255, 255',
788
- whiteContrast: '#1c1c1c',
789
- whiteContrastRgb: '28, 28, 28',
790
- whiteShade: '#e0e0e0',
791
- whiteShadeRgb: '224, 224, 224',
792
- whiteTint: 'white',
793
- whiteTintRgb: '255, 255, 255',
794
- whiteColorBrightness: 'white',
795
- backgroundColor: '#f6f6f6',
796
- backgroundColorRgb: '246, 246, 246',
797
- backgroundColorContrast: '#1c1c1c',
798
- backgroundColorContrastRgb: '28, 28, 28',
799
- backgroundColorShade: '#d8d8d8',
800
- backgroundColorShadeRgb: '216, 216, 216',
801
- backgroundColorTint: '#f7f7f7',
802
- backgroundColorTintRgb: '247, 247, 247',
803
- backgroundColorColorBrightness: 'light',
804
- danger: '#ff595e',
805
- dangerRgb: '255, 89, 94',
806
- dangerContrast: '#1c1c1c',
807
- dangerContrastRgb: '28, 28, 28',
808
- dangerShade: '#e04e53',
809
- dangerShadeRgb: '224, 78, 83',
810
- dangerTint: '#ff6a6e',
811
- dangerTintRgb: '255, 106, 110',
812
- dangerColorBrightness: 'light',
813
- warning: '#ffca3a',
814
- warningRgb: '255, 202, 58',
815
- warningContrast: '#1c1c1c',
816
- warningContrastRgb: '28, 28, 28',
817
- warningShade: '#e0b233',
818
- warningShadeRgb: '224, 178, 51',
819
- warningTint: '#ffcf4e',
820
- warningTintRgb: '255, 207, 78',
821
- warningColorBrightness: 'light',
822
- success: '#2cf287',
823
- successRgb: '44, 242, 135',
824
- successContrast: '#1c1c1c',
825
- successContrastRgb: '28, 28, 28',
826
- successShade: '#27d577',
827
- successShadeRgb: '39, 213, 119',
828
- successTint: '#41f393',
829
- successTintRgb: '65, 243, 147',
830
- successColorBrightness: 'light',
831
- tertiary: '#01352c',
832
- tertiaryRgb: '1, 53, 44',
833
- tertiaryContrast: '#ffffff',
834
- tertiaryContrastRgb: '255, 255, 255',
835
- tertiaryShade: '#012f27',
836
- tertiaryShadeRgb: '1, 47, 39',
837
- tertiaryTint: '#1a4941',
838
- tertiaryTintRgb: '26, 73, 65',
839
- tertiaryColorBrightness: 'dark',
840
- secondary: '#005c3c',
841
- secondaryRgb: '0, 92, 60',
842
- secondaryContrast: '#ffffff',
843
- secondaryContrastRgb: '255, 255, 255',
844
- secondaryShade: '#005135',
845
- secondaryShadeRgb: '0, 81, 53',
846
- secondaryTint: '#1a6c50',
847
- secondaryTintRgb: '26, 108, 80',
848
- secondaryColorBrightness: 'dark',
849
- primary: '#00e89a',
850
- primaryRgb: '0, 232, 154',
851
- primaryContrast: '#1c1c1c',
852
- primaryContrastRgb: '28, 28, 28',
853
- primaryShade: '#00cc88',
854
- primaryShadeRgb: '0, 204, 136',
855
- primaryTint: '#1aeaa4',
856
- primaryTintRgb: '26, 234, 164',
857
- primaryColorBrightness: 'light',
858
- },
859
- kirbyTextColors: {
860
- danger: '#ee0d0d',
861
- dangerRgb: '238, 13, 13',
862
- dangerContrast: '#ffffff',
863
- dangerContrastRgb: '255, 255, 255',
864
- dangerShade: '#d10b0b',
865
- dangerShadeRgb: '209, 11, 11',
866
- dangerTint: '#f02525',
867
- dangerTintRgb: '240, 37, 37',
868
- dangerColorBrightness: 'dark',
869
- black: '#1c1c1c',
870
- blackRgb: '28, 28, 28',
871
- blackContrast: '#ffffff',
872
- blackContrastRgb: '255, 255, 255',
873
- blackShade: '#191919',
874
- blackShadeRgb: '25, 25, 25',
875
- blackTint: '#333333',
876
- blackTintRgb: '51, 51, 51',
877
- blackColorBrightness: 'dark',
878
- semiDark: '#707070',
879
- semiDarkRgb: '112, 112, 112',
880
- semiDarkContrast: '#ffffff',
881
- semiDarkContrastRgb: '255, 255, 255',
882
- semiDarkShade: '#636363',
883
- semiDarkShadeRgb: '99, 99, 99',
884
- semiDarkTint: '#7e7e7e',
885
- semiDarkTintRgb: '126, 126, 126',
886
- semiDarkColorBrightness: 'dark',
887
- white: '#ffffff',
888
- whiteRgb: '255, 255, 255',
889
- whiteContrast: '#1c1c1c',
890
- whiteContrastRgb: '28, 28, 28',
891
- whiteShade: '#e0e0e0',
892
- whiteShadeRgb: '224, 224, 224',
893
- whiteTint: 'white',
894
- whiteTintRgb: '255, 255, 255',
895
- whiteColorBrightness: 'white',
896
- },
897
- };
898
-
899
- const kebabToCamelCase = (kebabString) => {
900
- if (!kebabString.length || kebabString.length === 1) {
901
- return kebabString;
902
- }
903
- const stringInCamelCase = kebabString
904
- .split('-')
905
- .map((part, index) => (index === 0 ? part : part[0].toUpperCase() + part.substr(1)))
906
- .join('');
907
- return stringInCamelCase;
908
- };
909
- const camelToKebabCase = (camelString) => {
910
- if (!camelString.length || camelString.length === 1) {
911
- return camelString;
912
- }
913
- const stringInKebabCase = camelString
914
- .split('')
915
- .map((char, index) => {
916
- const isUppercase = char.toUpperCase() === char;
917
- if (!isUppercase || char === '-') {
918
- return char;
919
- }
920
- return index === 0 ? char.toLowerCase() : `-${char.toLowerCase()}`;
921
- })
922
- .join('');
923
- return stringInKebabCase;
924
- };
925
- const kebabToTitleCase = (kebabString) => {
926
- if (!kebabString.length || kebabString.length === 1) {
927
- return kebabString;
928
- }
929
- const stringInTitleCase = kebabString
930
- .split('-')
931
- .map((word) => {
932
- return word[0].toUpperCase() + word.slice(1);
933
- })
934
- .join(' ');
935
- return stringInTitleCase;
936
- };
937
- const capitalizeFirstLetter = (string) => {
938
- if (typeof string !== 'string') {
939
- return '';
940
- }
941
- return string.charAt(0).toUpperCase() + string.slice(1);
942
- };
943
-
944
- class ColorHelper {
945
- static getMainColors() {
946
- // Do not remove the `colorArray` const, since it'll break the ngpackagr build, for more info see:
947
- // https://github.com/ng-packagr/ng-packagr/issues/696
948
- const colorArray = Object.entries(styles$1.mainColors).map(([name, value]) => ({ name, value }));
949
- return colorArray;
950
- }
951
- static mapToKirbyColorArray(colors, fullColorMap = styles$1.kirbyColors) {
952
- const TINT = 'Tint';
953
- const SHADE = 'Shade';
954
- const CONTRAST = 'Contrast';
955
- const colorArray = Object.entries(colors).map(([name, value]) => ({
956
- name: camelToKebabCase(name),
957
- value,
958
- base: value,
959
- tint: {
960
- value: fullColorMap[name + TINT],
961
- name: camelToKebabCase(name + TINT),
962
- },
963
- shade: {
964
- value: fullColorMap[name + SHADE],
965
- name: camelToKebabCase(name + SHADE),
966
- },
967
- contrast: {
968
- value: fullColorMap[name + CONTRAST],
969
- name: camelToKebabCase(name + CONTRAST),
970
- },
971
- }));
972
- // Do not remove the `colorArray` const, since it'll break the ngpackagr build, for more info see:
973
- // https://github.com/ng-packagr/ng-packagr/issues/696
974
- return colorArray;
975
- }
976
- static getBackgroundColor() {
977
- return ColorHelper.getColor('background-color');
978
- }
979
- static getColorBrightness(name) {
980
- return ColorHelper.getColor(name + '-color-brightness');
981
- }
982
- static getThemeColorRgbString(name, opacity) {
983
- const rgbValue = ColorHelper.getColor(name + '-rgb');
984
- return opacity
985
- ? `rgba(${rgbValue}, ${ColorHelper.opacityThreshold(opacity)})`
986
- : `rgb(${rgbValue})`;
987
- }
988
- static getThemeTextColorRgbString(name) {
989
- const rgbValue = ColorHelper.getTextColor(name + '-rgb');
990
- return `rgb(${rgbValue})`;
991
- }
992
- static getThemeColorHexString(name) {
993
- return ColorHelper.getColor(name);
994
- }
995
- static getThemeTextColorHexString(name) {
996
- return ColorHelper.getTextColor(name);
997
- }
998
- static getTransparentColorRgbString() {
999
- return 'rgba(0, 0, 0, 0)';
1000
- }
1001
- static colorStringToRgbString(color) {
1002
- if (color.indexOf('rgb') === 0) {
1003
- return color;
1004
- }
1005
- if (color.indexOf('#') === 0) {
1006
- return ColorHelper.hexToRGB(color);
1007
- }
1008
- if (color.split(',').length === 3) {
1009
- return `rgb(${color})`;
1010
- }
1011
- if (color.split(',').length === 4) {
1012
- return `rgba(${color})`;
1013
- }
1014
- const ctx = document.createElement('canvas').getContext('2d');
1015
- ctx.fillStyle = color;
1016
- const renderedColor = ctx.fillStyle.toString();
1017
- return ColorHelper.colorStringToRgbString(renderedColor);
1018
- }
1019
- static hexToRGB(hex) {
1020
- let r = '0', g = '0', b = '0';
1021
- // 3 digits
1022
- if (hex.length === 4) {
1023
- r = '0x' + hex[1] + hex[1];
1024
- g = '0x' + hex[2] + hex[2];
1025
- b = '0x' + hex[3] + hex[3];
1026
- // 6 digits
1027
- }
1028
- else if (hex.length === 7) {
1029
- r = '0x' + hex[1] + hex[2];
1030
- g = '0x' + hex[3] + hex[4];
1031
- b = '0x' + hex[5] + hex[6];
1032
- }
1033
- return `rgb(${+r}, ${+g}, ${+b})`;
1034
- }
1035
- static getColor(name) {
1036
- const camelCaseKey = kebabToCamelCase(name);
1037
- const found = styles$1.kirbyColors[camelCaseKey];
1038
- return found || null;
1039
- }
1040
- static getTextColor(name) {
1041
- const camelCaseKey = kebabToCamelCase(name);
1042
- const found = styles$1.kirbyTextColors[camelCaseKey];
1043
- return found || null;
1044
- }
1045
- static opacityThreshold(opacity) {
1046
- if (0 <= opacity && opacity <= 1) {
1047
- return opacity;
1048
- }
1049
- console.warn(`Opacity value must be between 0 and 1. Current value is: ${opacity}.`);
1050
- return 1;
1051
- }
1052
- }
1053
- ColorHelper.brandColors = ColorHelper.mapToKirbyColorArray(styles$1.brandColors);
1054
- ColorHelper.notificationColors = ColorHelper.mapToKirbyColorArray(styles$1.notificationColors);
1055
- ColorHelper.systemColors = ColorHelper.mapToKirbyColorArray(styles$1.systemColors);
1056
- ColorHelper.textColors = ColorHelper.mapToKirbyColorArray(styles$1.textColors, styles$1.kirbyTextColors);
1057
- ColorHelper.mainColors = ColorHelper.getMainColors();
1058
-
1059
- class DesignTokenHelper {
1060
- static getColor(name, variant) {
1061
- const variantSuffix = variant ? `-${variant}` : '';
1062
- const colorVariant = `${name}${variantSuffix}`;
1063
- return {
1064
- name: name,
1065
- variant: variant,
1066
- fullname: colorVariant,
1067
- value: ColorHelper.getThemeColorRgbString(colorVariant),
1068
- hex: ColorHelper.getThemeColorHexString(colorVariant),
1069
- };
1070
- }
1071
- static getTextColor(name, variant) {
1072
- const variantSuffix = variant ? `-${variant}` : '';
1073
- const colorVariant = `${name}${variantSuffix}`;
1074
- return {
1075
- name: name,
1076
- variant: variant,
1077
- fullname: colorVariant,
1078
- value: ColorHelper.getThemeTextColorRgbString(colorVariant),
1079
- hex: ColorHelper.getThemeTextColorHexString(colorVariant),
1080
- };
1081
- }
1082
- static size(key) {
1083
- return styles.sizes[key];
1084
- }
1085
- static fontSize(key) {
1086
- return styles.fontSizes[key];
1087
- }
1088
- static iconFontSize(key) {
1089
- return styles.iconFontSizes[key];
1090
- }
1091
- static fontWeight(key) {
1092
- return styles.fontWeight[key];
1093
- }
1094
- static lineHeight(key) {
1095
- return styles.lineHeight[key];
1096
- }
1097
- static backgroundColor() {
1098
- return ColorHelper.getBackgroundColor();
1099
- }
1100
- static borderRadius() {
1101
- return styles.borderRadius;
1102
- }
1103
- static borderRadiusRound() {
1104
- return styles.borderRadiusRound;
1105
- }
1106
- static alertMaxWidth() {
1107
- return styles.alertMaxWidth;
1108
- }
1109
- static compactModalMaxWidth() {
1110
- return styles.compactModalMaxWidth;
1111
- }
1112
- static dropdownItemHeight() {
1113
- return styles.dropdownItemHeight;
1114
- }
1115
- static avatarSize(key) {
1116
- return styles.avatarSizes[key];
1117
- }
1118
- static fatFingerSize() {
1119
- return styles.fatFingerSize;
1120
- }
1121
- static getElevation(z) {
1122
- return styles.elevations[z];
1123
- }
1124
- static itemHeight(key) {
1125
- return styles.itemHeights[key];
1126
- }
1127
- static zLayer(key) {
1128
- return styles.zLayers[key];
1129
- }
1130
- }
1131
- DesignTokenHelper.breakpoints = styles.breakpoints;
1132
- DesignTokenHelper.softKeyboardTransitionEnter = styles.softKeyboardTransitionEnter;
1133
- DesignTokenHelper.softKeyboardTransitionLeave = styles.softKeyboardTransitionLeave;
1134
- DesignTokenHelper.modalDefaultHeight = styles.modalDefaultHeight;
1135
- DesignTokenHelper.drawerDefaultHeight = styles.drawerDefaultHeight;
1136
-
1137
629
  class PlatformService {
1138
630
  constructor(windowRef) {
1139
631
  this.windowRef = windowRef;
@@ -2559,7 +2051,7 @@ AvatarComponent.decorators = [
2559
2051
  selector: 'kirby-avatar',
2560
2052
  template: "<div class=\"avatar\" [ngClass]=\"{ shadow: shadow, overlay: overlay }\">\n <img *ngIf=\"imageSrc\" [src]=\"imageSrc\" [attr.alt]=\"altText\" />\n <ng-content *ngIf=\"!text\" select=\"kirby-icon\"></ng-content>\n <span class=\"avatar-text\" *ngIf=\"text\">{{ text }}</span>\n</div>\n<ng-content select=\"kirby-badge\"></ng-content>\n",
2561
2053
  changeDetection: ChangeDetectionStrategy.OnPush,
2562
- styles: [":host{--kirby-badge-elevation:0 5px 10px -10px rgba(28,28,28,0.3),0 0 5px 0 rgba(28,28,28,0.08);--kirby-badge-position:absolute;--kirby-badge-right:-2px;--kirby-badge-top:-2px;--kirby-badge-zindex:2}.avatar,:host{position:relative}.avatar{width:40px;height:40px;border-radius:50%;overflow:hidden;z-index:1;display:flex;justify-content:center;align-items:center;background-color:var(--kirby-white);color:var(--kirby-light-contrast);--kirby-icon-font-size:24px}.avatar.shadow{box-shadow:0 2px 4px 2px hsla(0,0%,44.3%,.4)}.avatar.overlay:before{content:\"\";background-color:var(--kirby-black);opacity:.05;width:100%;height:100%;position:absolute;top:0;left:0}.avatar img{object-fit:cover;max-width:100%;height:100%;width:100%}:host(.xs) .avatar{width:32px;height:32px;border-radius:8px}:host(.xs) .avatar .avatar-text{font-size:14px}:host(.sm) .avatar,:host-context(kirby-progress-circle.sm) .avatar{width:40px;height:40px}:host(.sm) .avatar .avatar-text,:host-context(kirby-progress-circle.sm) .avatar .avatar-text{font-size:14px}:host(.md),:host-context(kirby-progress-circle.md){--kirby-badge-right:0px;--kirby-badge-top:0px}:host(.md) .avatar,:host-context(kirby-progress-circle.md) .avatar{width:56px;height:56px;--kirby-icon-font-size:32px}:host(.md) .avatar .avatar-text,:host-context(kirby-progress-circle.md) .avatar .avatar-text{font-size:18px}:host(.lg),:host-context(kirby-progress-circle.lg){--kirby-badge-right:6px;--kirby-badge-top:6px}:host(.lg) .avatar,:host-context(kirby-progress-circle.lg) .avatar{width:96px;height:96px;--kirby-icon-font-size:56px}:host(.lg) .avatar .avatar-text,:host-context(kirby-progress-circle.lg) .avatar .avatar-text{font-size:32px}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}:host-context(kirby-item)[slot=start].xs{margin-inline-end:16px}:host(.primary) .avatar{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}:host(.secondary) .avatar{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}:host(.tertiary) .avatar{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}:host(.success) .avatar{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}:host(.warning) .avatar{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}:host(.danger) .avatar{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}:host(.light) .avatar{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}:host(.medium) .avatar{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}:host(.dark) .avatar{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}:host(.white) .avatar{background-color:var(--kirby-white);color:var(--kirby-white-contrast)}:host(.semi-light) .avatar{background-color:var(--kirby-semi-light);color:var(--kirby-semi-light-contrast)}"]
2054
+ styles: [":host{--kirby-badge-elevation:0 5px 10px -10px rgba(28,28,28,0.3),0 0 5px 0 rgba(28,28,28,0.08);--kirby-badge-position:absolute;--kirby-badge-right:-2px;--kirby-badge-top:-2px;--kirby-badge-z-index:2}.avatar,:host{position:relative}.avatar{width:40px;height:40px;border-radius:50%;overflow:hidden;z-index:1;display:flex;justify-content:center;align-items:center;background-color:var(--kirby-white);color:var(--kirby-light-contrast);--kirby-icon-font-size:24px}.avatar.shadow{box-shadow:0 2px 4px 2px hsla(0,0%,44.3%,.4)}.avatar.overlay:before{content:\"\";background-color:var(--kirby-black);opacity:.05;width:100%;height:100%;position:absolute;top:0;left:0}.avatar img{object-fit:cover;max-width:100%;height:100%;width:100%}:host(.xs) .avatar{width:32px;height:32px;border-radius:8px}:host(.xs) .avatar .avatar-text{font-size:14px}:host(.sm) .avatar,:host-context(kirby-progress-circle.sm) .avatar{width:40px;height:40px}:host(.sm) .avatar .avatar-text,:host-context(kirby-progress-circle.sm) .avatar .avatar-text{font-size:14px}:host(.md),:host-context(kirby-progress-circle.md){--kirby-badge-right:0px;--kirby-badge-top:0px}:host(.md) .avatar,:host-context(kirby-progress-circle.md) .avatar{width:56px;height:56px;--kirby-icon-font-size:32px}:host(.md) .avatar .avatar-text,:host-context(kirby-progress-circle.md) .avatar .avatar-text{font-size:18px}:host(.lg),:host-context(kirby-progress-circle.lg){--kirby-badge-right:6px;--kirby-badge-top:6px}:host(.lg) .avatar,:host-context(kirby-progress-circle.lg) .avatar{width:96px;height:96px;--kirby-icon-font-size:56px}:host(.lg) .avatar .avatar-text,:host-context(kirby-progress-circle.lg) .avatar .avatar-text{font-size:32px}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}:host-context(kirby-item)[slot=start].xs{margin-inline-end:16px}:host(.primary) .avatar{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}:host(.secondary) .avatar{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}:host(.tertiary) .avatar{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}:host(.success) .avatar{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}:host(.warning) .avatar{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}:host(.danger) .avatar{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}:host(.light) .avatar{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}:host(.medium) .avatar{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}:host(.dark) .avatar{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}:host(.white) .avatar{background-color:var(--kirby-white);color:var(--kirby-white-contrast)}:host(.semi-light) .avatar{background-color:var(--kirby-semi-light);color:var(--kirby-semi-light-contrast)}"]
2563
2055
  },] }
2564
2056
  ];
2565
2057
  AvatarComponent.propDecorators = {
@@ -2573,19 +2065,6 @@ AvatarComponent.propDecorators = {
2573
2065
  _cssClass: [{ type: HostBinding, args: ['class',] }]
2574
2066
  };
2575
2067
 
2576
- class BadgeComponent {
2577
- }
2578
- BadgeComponent.decorators = [
2579
- { type: Component, args: [{
2580
- selector: 'kirby-badge',
2581
- template: "<ion-badge color=\"none\">\n <ng-content *ngIf=\"!text\"></ng-content>\n <ng-container *ngIf=\"text\">{{ text }}</ng-container>\n</ion-badge>\n",
2582
- styles: [":root{--kirby-badge-elevation:none;--kirby-badge-position:relative;--kirby-badge-left:0;--kirby-badge-right:0;--kirby-badge-top:0;--kirby-badge-zindex:none}:host{--kirby-badge-background-color:var(--kirby-white);--kirby-badge-color:var(--kirby-white-contrast);--ion-color-base:var(--kirby-badge-background-color);--ion-color-contrast:var(--kirby-badge-color);position:var(--kirby-badge-position);left:var(--kirby-badge-left);right:var(--kirby-badge-right);top:var(--kirby-badge-top);z-index:var(--kirby-badge-zindex);font-size:10px;line-height:1}:host ion-badge{--padding-top:3px;--padding-end:5px;--padding-bottom:3px;--padding-start:5px;box-sizing:border-box;border-radius:8px;min-width:16px;min-height:16px;font-size:inherit;position:relative;box-shadow:var(--kirby-badge-elevation)}:host ::ng-deep kirby-icon{--kirby-icon-font-size:16px;position:absolute;top:0;left:0}:host(.success){--kirby-badge-background-color:var(--kirby-success);--kirby-badge-color:var(--kirby-success-contrast)}:host(.warning){--kirby-badge-background-color:var(--kirby-warning);--kirby-badge-color:var(--kirby-warning-contrast)}:host(.danger){--kirby-badge-background-color:var(--kirby-danger);--kirby-badge-color:var(--kirby-danger-contrast);--kirby-badge-color:var(--kirby-white)}:host(.white){--kirby-badge-background-color:var(--kirby-white);--kirby-badge-color:var(--kirby-white-contrast)}"]
2583
- },] }
2584
- ];
2585
- BadgeComponent.propDecorators = {
2586
- text: [{ type: Input }]
2587
- };
2588
-
2589
2068
  class CardComponent {
2590
2069
  constructor(elementRef, resizeObserverService, renderer) {
2591
2070
  this.elementRef = elementRef;
@@ -3561,6 +3040,8 @@ function deepCopy(obj) {
3561
3040
  return JSON.parse(JSON.stringify(obj));
3562
3041
  }
3563
3042
 
3043
+ // re-export helpers from core, to preserve backwards compatability
3044
+
3564
3045
  const { getThemeColorHexString } = ColorHelper;
3565
3046
  /* The chart.js annotation does not allow for changing the
3566
3047
  defaults it comes with. In order to have sensible defaults
@@ -7967,10 +7448,10 @@ class SegmentedControlComponent {
7967
7448
  SegmentedControlComponent.decorators = [
7968
7449
  { type: Component, args: [{
7969
7450
  selector: 'kirby-segmented-control',
7970
- template: "<ion-segment\n *ngIf=\"mode === 'default'\"\n [value]=\"value?.id\"\n (ionChange)=\"onSegmentSelect($event.detail.value)\"\n (click)=\"preventWrapperClick($event)\"\n>\n <div *ngFor=\"let item of items\" class=\"segment-btn-wrapper\">\n <ion-segment-button [value]=\"item.id\">{{ item.text }}</ion-segment-button>\n <kirby-badge\n *ngIf=\"item.badge\"\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >{{ item.badge.content }}</kirby-badge\n >\n </div>\n</ion-segment>\n\n<ng-container *ngIf=\"mode === 'chip' || mode === 'compactChip'\">\n <kirby-chip\n *ngFor=\"let item of items; let index = index\"\n [text]=\"item.text\"\n [isSelected]=\"index === selectedIndex\"\n (click)=\"onSegmentSelect(item.id)\"\n role=\"button\"\n ></kirby-chip>\n</ng-container>\n",
7451
+ template: "<ion-segment\n *ngIf=\"mode === 'default'\"\n [value]=\"value?.id\"\n (ionChange)=\"onSegmentSelect($event.detail.value)\"\n (click)=\"preventWrapperClick($event)\"\n>\n <div *ngFor=\"let item of items\" class=\"segment-btn-wrapper\">\n <ion-segment-button [value]=\"item.id\">{{ item.text }}</ion-segment-button>\n <kirby-badge\n *ngIf=\"item.badge\"\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n <kirby-icon\n *ngIf=\"item.badge.icon; else badgeContent\"\n [customName]=\"item.badge.icon\"\n [name]=\"item.badge.icon\"\n ></kirby-icon>\n <ng-template #badgeContent>\n {{ item.badge.content }}\n </ng-template>\n </kirby-badge>\n </div>\n</ion-segment>\n\n<ng-container *ngIf=\"mode === 'chip' || mode === 'compactChip'\">\n <kirby-chip\n *ngFor=\"let item of items; let index = index\"\n [text]=\"item.text\"\n [isSelected]=\"index === selectedIndex\"\n (click)=\"onSegmentSelect(item.id)\"\n role=\"button\"\n ></kirby-chip>\n</ng-container>\n",
7971
7452
  // tslint:disable-next-line: no-host-metadata-property
7972
7453
  host: { role: 'group' },
7973
- styles: [":host{display:block;-webkit-user-select:none;user-select:none}:host.sm ion-segment-button{min-height:32px;font-size:12px;--padding-start:16px;--padding-end:16px}:host.chip-mode{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}@media (pointer:coarse){:host.chip-mode{scrollbar-width:none}:host.chip-mode::-webkit-scrollbar{display:none}}ion-segment{display:inline-flex;width:auto;overflow:visible;contain:unset;--background:var(--kirby-white);border-radius:999px}ion-segment-button{position:relative;min-height:40px;font-weight:400;font-size:14px;text-transform:none;--border-radius:999px;--border-style:none;--background:none;--color:var(--kirby-white-contrast);--indicator-color:var(--kirby-black);--color-checked:var(--kirby-black-contrast);--color-hover:var(--kirby-black-tint);--indicator-box-shadow:none;--padding-start:24px;--padding-end:24px;--margin-bottom:0;--margin-end:0;--margin-start:0;--margin-top:0;margin:0}ion-segment-button:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}.segment-btn-wrapper{position:relative}kirby-badge{--kirby-badge-elevation:0 5px 10px -10px rgba(28,28,28,0.3),0 0 5px 0 rgba(28,28,28,0.08);position:absolute;top:-8px;right:8px;z-index:2}:host-context(.plt-desktop) ion-segment-button:focus-within{outline-color:-webkit-focus-ring-color;outline-style:auto}"]
7454
+ styles: [":host{display:block;-webkit-user-select:none;user-select:none;--kirby-badge-elevation:0 5px 10px -10px rgba(28,28,28,0.3),0 0 5px 0 rgba(28,28,28,0.08);--kirby-badge-position:absolute;--kirby-badge-top:-8px;--kirby-badge-right:8px;--kirby-badge-z-index:2}:host.sm ion-segment-button{min-height:32px;font-size:12px;--padding-start:16px;--padding-end:16px}:host.chip-mode{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}@media (pointer:coarse){:host.chip-mode{scrollbar-width:none}:host.chip-mode::-webkit-scrollbar{display:none}}ion-segment{display:inline-flex;width:auto;overflow:visible;contain:unset;--background:var(--kirby-white);border-radius:999px}ion-segment-button{position:relative;min-height:40px;font-weight:400;font-size:14px;text-transform:none;--border-radius:999px;--border-style:none;--background:none;--color:var(--kirby-white-contrast);--indicator-color:var(--kirby-black);--color-checked:var(--kirby-black-contrast);--color-hover:var(--kirby-black-tint);--indicator-box-shadow:none;--padding-start:24px;--padding-end:24px;--margin-bottom:0;--margin-end:0;--margin-start:0;--margin-top:0;margin:0}ion-segment-button:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}.segment-btn-wrapper{position:relative}:host-context(.plt-desktop) ion-segment-button:focus-within{outline-color:-webkit-focus-ring-color;outline-style:auto}"]
7974
7455
  },] }
7975
7456
  ];
7976
7457
  SegmentedControlComponent.propDecorators = {
@@ -8607,7 +8088,6 @@ ThemeColorDirective.decorators = [
8607
8088
  // tslint:disable-next-line:directive-selector
8608
8089
  selector: `kirby-avatar[themeColor],
8609
8090
  kirby-card[themeColor],
8610
- kirby-badge[themeColor],
8611
8091
  kirby-icon[themeColor],
8612
8092
  kirby-progress-circle-ring[themeColor],
8613
8093
  kirby-modal-footer[themeColor],
@@ -8632,6 +8112,82 @@ ThemeColorDirective.propDecorators = {
8632
8112
  themeColor: [{ type: Input }]
8633
8113
  };
8634
8114
 
8115
+ const proxyInputs = (Cmp, inputs) => {
8116
+ const Prototype = Cmp.prototype;
8117
+ inputs.forEach((item) => {
8118
+ Object.defineProperty(Prototype, item, {
8119
+ get() {
8120
+ return this.el[item];
8121
+ },
8122
+ set(val) {
8123
+ this.z.runOutsideAngular(() => (this.el[item] = val));
8124
+ },
8125
+ });
8126
+ });
8127
+ };
8128
+ const proxyMethods = (Cmp, methods) => {
8129
+ const Prototype = Cmp.prototype;
8130
+ methods.forEach((methodName) => {
8131
+ Prototype[methodName] = function () {
8132
+ const args = arguments;
8133
+ return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));
8134
+ };
8135
+ });
8136
+ };
8137
+ const proxyOutputs = (instance, el, events) => {
8138
+ events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));
8139
+ };
8140
+ // tslint:disable-next-line: only-arrow-functions
8141
+ function ProxyCmp(opts) {
8142
+ const decorator = function (cls) {
8143
+ if (opts.inputs) {
8144
+ proxyInputs(cls, opts.inputs);
8145
+ }
8146
+ if (opts.methods) {
8147
+ proxyMethods(cls, opts.methods);
8148
+ }
8149
+ return cls;
8150
+ };
8151
+ return decorator;
8152
+ }
8153
+
8154
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
8155
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8156
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8157
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8158
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
8159
+ };
8160
+ var __metadata = (this && this.__metadata) || function (k, v) {
8161
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
8162
+ };
8163
+ let KirbyBadge = class KirbyBadge {
8164
+ constructor(c, r, z) {
8165
+ this.z = z;
8166
+ c.detach();
8167
+ this.el = r.nativeElement;
8168
+ }
8169
+ };
8170
+ KirbyBadge.decorators = [
8171
+ { type: Component, args: [{
8172
+ selector: 'kirby-badge',
8173
+ changeDetection: ChangeDetectionStrategy.OnPush,
8174
+ template: '<ng-content></ng-content>',
8175
+ inputs: ['size', 'text', 'themeColor']
8176
+ },] }
8177
+ ];
8178
+ /** @nocollapse */
8179
+ KirbyBadge.ctorParameters = () => [
8180
+ { type: ChangeDetectorRef },
8181
+ { type: ElementRef },
8182
+ { type: NgZone }
8183
+ ];
8184
+ KirbyBadge = __decorate([
8185
+ ProxyCmp({
8186
+ inputs: ['size', 'text', 'themeColor']
8187
+ }),
8188
+ __metadata("design:paramtypes", [ChangeDetectorRef, ElementRef, NgZone])
8189
+ ], KirbyBadge);
8190
+
8635
8191
  class ChartModule {
8636
8192
  }
8637
8193
  ChartModule.decorators = [
@@ -8726,6 +8282,20 @@ ToggleButtonModule.decorators = [
8726
8282
  },] }
8727
8283
  ];
8728
8284
 
8285
+ const appInitialize = (doc) => {
8286
+ return () => {
8287
+ defineCustomElements(doc.defaultView);
8288
+ };
8289
+ };
8290
+ function customElementsInitializer() {
8291
+ return {
8292
+ provide: APP_INITIALIZER,
8293
+ useFactory: appInitialize,
8294
+ deps: [DOCUMENT],
8295
+ multi: true,
8296
+ };
8297
+ }
8298
+
8729
8299
  class ModalRouterLinkDirective {
8730
8300
  constructor(modalNavigationService) {
8731
8301
  this.modalNavigationService = modalNavigationService;
@@ -8768,7 +8338,7 @@ const exportedDeclarations$1 = [
8768
8338
  ModalRouterLinkDirective,
8769
8339
  SegmentedControlComponent,
8770
8340
  ChipComponent,
8771
- BadgeComponent,
8341
+ KirbyBadge,
8772
8342
  ThemeColorDirective,
8773
8343
  DateInputDirective,
8774
8344
  DecimalMaskDirective,
@@ -8829,6 +8399,7 @@ const providers = [
8829
8399
  LoadingOverlayService,
8830
8400
  ResizeObserverFactory,
8831
8401
  ResizeObserverService,
8402
+ customElementsInitializer(),
8832
8403
  ];
8833
8404
  const entryComponents = [
8834
8405
  ModalWrapperComponent,
@@ -8883,5 +8454,5 @@ KirbyModule.ctorParameters = () => [
8883
8454
  * Generated bundle index. Do not edit.
8884
8455
  */
8885
8456
 
8886
- export { AccordionDirective, AccordionItemComponent, ActionSheetComponent, AppComponent, AppModule, AvatarComponent, AvatarSize, BadgeComponent, ButtonComponent, ButtonSize, COMPONENT_PROPS, CalendarComponent, CardComponent, CardFooterComponent, CardHeaderComponent, ChartComponent, ChartDeprecatedComponent, ChartDeprecatedType, CheckboxComponent, ChipComponent, ColorHelper, ComponentLoaderDirective, DateInputDirective, DecimalMaskDirective, DesignTokenHelper, DividerComponent, DropdownComponent, EmptyStateComponent, FabSheetComponent, FitHeadingDirective, FitHeadingModule, FlagComponent, FormFieldComponent, FormFieldMessageComponent, GridCardConfiguration, GridComponent, GroupByPipe, HorizontalDirection, ICON_SETTINGS, IconComponent, IconModule, IconRegistryService, IconSize, InfiniteScrollDirective, InputComponent, InputCounterComponent, InputSize, ItemComponent, ItemModule, ItemSize, KeyHandlerDirective, KirbyAnimation, KirbyModule, LabelComponent, ListComponent, 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, camelToKebabCase, capitalizeFirstLetter, defaultIcons, isNumberArray, kebabToCamelCase, kebabToTitleCase, selectedTabClickEvent, stockChartDeprecatedOptions, ɵ0$6 as ɵ0, AppModule as ɵa, AppComponent as ɵb, Modal as ɵba, ButtonComponent as ɵbb, IconComponent as ɵbc, IconRegistryService as ɵbd, ICON_SETTINGS as ɵbf, ResizeObserverService as ɵbg, ResizeObserverFactory as ɵbh, FitHeadingModule as ɵbi, FitHeadingDirective as ɵbj, LineClampHelper as ɵbk, SpinnerModule as ɵbl, SpinnerComponent as ɵbm, TabsModule as ɵbn, IconModule as ɵbo, TabButtonComponent as ɵbp, ItemModule as ɵbq, ItemComponent as ɵbr, LabelComponent as ɵbs, ToggleButtonModule as ɵbt, ToggleButtonComponent as ɵbu, ListModule as ɵbv, ListComponent as ɵbw, ListHelper as ɵbx, GroupByPipe as ɵby, InfiniteScrollDirective as ɵbz, RouterOutletComponent as ɵc, ListItemDirective as ɵca, ListFlexItemDirective as ɵcb, ListItemTemplateDirective as ɵcc, ListHeaderDirective as ɵcd, ListSectionHeaderDirective as ɵce, ListFooterDirective as ɵcf, ListItemComponent as ɵcg, ListSectionHeaderComponent as ɵch, ListHeaderComponent as ɵci, ListItemColorDirective as ɵcj, ChartModule as ɵck, ChartComponent as ɵcl, ChartJSService as ɵcm, ChartConfigService as ɵcn, CardComponent as ɵco, CardHeaderComponent as ɵcp, CardFooterComponent as ɵcq, ChartDeprecatedComponent as ɵcr, ChartDeprecatedHelper as ɵcs, DONUT_OPTIONS as ɵct, DonutOptions as ɵcu, AREASPLINE_OPTIONS as ɵcv, AreaSplineOptions as ɵcw, TIMESERIES_OPTIONS as ɵcx, TimeSeriesOptions as ɵcy, ACTIVITYGAUGE_OPTIONS as ɵcz, ModalController as ɵd, ActivityGaugeOptions as ɵda, StockChartDeprecatedComponent as ɵdb, GridComponent as ɵdc, BreakpointHelperService as ɵdd, ComponentLoaderDirective as ɵde, AvatarComponent as ɵdf, CalendarComponent as ɵdg, CalendarHelper as ɵdh, CheckboxComponent as ɵdi, ActionSheetComponent as ɵdj, ModalFooterComponent as ɵdk, ModalRouterLinkDirective as ɵdl, SegmentedControlComponent as ɵdm, ChipComponent as ɵdn, BadgeComponent as ɵdo, ThemeColorDirective as ɵdp, DateInputDirective as ɵdq, DecimalMaskDirective as ɵdr, SlideButtonComponent as ɵds, ToggleComponent as ɵdt, EmptyStateComponent as ɵdu, FormFieldComponent as ɵdv, InputCounterComponent as ɵdw, RadioGroupComponent as ɵdx, RadioComponent as ɵdy, InputComponent as ɵdz, ModalHelper as ɵe, TextareaComponent as ɵea, FabSheetComponent as ɵeb, DividerComponent as ɵec, ReorderListComponent as ɵed, DropdownComponent as ɵee, PopoverComponent as ɵef, KeyboardHandlerService as ɵeg, LoadingOverlayComponent as ɵeh, ProgressCircleComponent as ɵei, FlagComponent as ɵej, SlideDirective as ɵek, SlidesComponent as ɵel, AccordionDirective as ɵem, AccordionItemComponent as ɵen, RangeComponent as ɵeo, KeyHandlerDirective as ɵep, FormFieldMessageComponent as ɵeq, AlertComponent as ɵer, ModalCompactWrapperComponent as ɵes, ProgressCircleRingComponent as ɵet, ToastHelper as ɵeu, ToastController as ɵev, LoadingOverlayService as ɵew, ModalAnimationBuilderService as ɵf, PlatformService as ɵg, WindowRef as ɵh, ActionSheetHelper as ɵi, AlertHelper as ɵj, ModalNavigationService as ɵk, RouterOutletModule as ɵl, PageModule as ɵm, PageTitleDirective as ɵn, PageToolbarTitleDirective as ɵo, PageActionsDirective as ɵp, PageContentDirective as ɵq, PageProgressComponent as ɵr, PageTitleComponent as ɵs, PageContentComponent as ɵt, PageActionsComponent as ɵu, PageComponent as ɵv, TabsComponent as ɵw, TabsService as ɵx, PageFooterComponent as ɵy, ModalWrapperComponent as ɵz };
8457
+ 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, ItemModule, ItemSize, KeyHandlerDirective, KirbyAnimation, KirbyModule, LabelComponent, ListComponent, 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, ListItemColorDirective as ɵck, ChartModule as ɵcl, ChartComponent as ɵcm, ChartJSService as ɵcn, ChartConfigService as ɵco, CardComponent as ɵcp, CardHeaderComponent as ɵcq, CardFooterComponent as ɵcr, ChartDeprecatedComponent as ɵcs, ChartDeprecatedHelper as ɵct, DONUT_OPTIONS as ɵcu, DonutOptions as ɵcv, AREASPLINE_OPTIONS as ɵcw, AreaSplineOptions as ɵcx, TIMESERIES_OPTIONS as ɵcy, TimeSeriesOptions as ɵcz, RouterOutletComponent as ɵd, ACTIVITYGAUGE_OPTIONS as ɵda, ActivityGaugeOptions as ɵdb, StockChartDeprecatedComponent as ɵdc, GridComponent as ɵdd, BreakpointHelperService as ɵde, ComponentLoaderDirective as ɵdf, AvatarComponent as ɵdg, CalendarComponent as ɵdh, CalendarHelper as ɵdi, CheckboxComponent as ɵdj, ActionSheetComponent as ɵdk, ModalFooterComponent as ɵdl, ModalRouterLinkDirective as ɵdm, SegmentedControlComponent as ɵdn, ChipComponent as ɵdo, ThemeColorDirective as ɵdp, DateInputDirective as ɵdq, DecimalMaskDirective as ɵdr, SlideButtonComponent as ɵds, ToggleComponent as ɵdt, EmptyStateComponent as ɵdu, FormFieldComponent as ɵdv, InputCounterComponent as ɵdw, RadioGroupComponent as ɵdx, RadioComponent as ɵdy, InputComponent as ɵdz, ModalController as ɵe, TextareaComponent as ɵea, FabSheetComponent as ɵeb, DividerComponent as ɵec, ReorderListComponent as ɵed, DropdownComponent as ɵee, PopoverComponent as ɵef, KeyboardHandlerService as ɵeg, LoadingOverlayComponent as ɵeh, ProgressCircleComponent as ɵei, FlagComponent as ɵej, SlideDirective as ɵek, SlidesComponent as ɵel, AccordionDirective as ɵem, AccordionItemComponent as ɵen, RangeComponent as ɵeo, KeyHandlerDirective as ɵep, FormFieldMessageComponent as ɵeq, AlertComponent as ɵer, ModalCompactWrapperComponent as ɵes, ProgressCircleRingComponent as ɵet, ToastHelper as ɵeu, ToastController as ɵev, LoadingOverlayService as ɵew, appInitialize as ɵex, customElementsInitializer as ɵey, ModalHelper as ɵf, 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 };
8887
8458
  //# sourceMappingURL=kirbydesign-designsystem.js.map