@kirbydesign/designsystem 4.0.6 → 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.
- package/bundles/kirbydesign-designsystem-testing-base.umd.js +62 -85
- package/bundles/kirbydesign-designsystem-testing-base.umd.js.map +1 -1
- package/bundles/kirbydesign-designsystem-testing-base.umd.min.js +1 -1
- package/bundles/kirbydesign-designsystem-testing-base.umd.min.js.map +1 -1
- package/bundles/kirbydesign-designsystem.umd.js +297 -688
- package/bundles/kirbydesign-designsystem.umd.js.map +1 -1
- package/bundles/kirbydesign-designsystem.umd.min.js +1 -1
- package/bundles/kirbydesign-designsystem.umd.min.js.map +1 -1
- package/esm2015/kirbydesign-designsystem.js +77 -76
- package/esm2015/kirbydesign-designsystem.metadata.json +1 -1
- package/esm2015/lib/animation/kirby-animation.js +7 -7
- package/esm2015/lib/components/angular-component-lib/utils.js +40 -0
- package/esm2015/lib/components/angular-component-lib/utils.metadata.json +1 -0
- package/esm2015/lib/components/avatar/avatar.component.js +2 -2
- package/esm2015/lib/components/avatar/avatar.component.metadata.json +1 -1
- package/esm2015/lib/components/button/button.component.js +1 -1
- package/esm2015/lib/components/button/button.component.metadata.json +1 -1
- package/esm2015/lib/components/calendar/calendar.component.js +2 -2
- package/esm2015/lib/components/card/card-header/card-header.component.js +1 -1
- package/esm2015/lib/components/chart/chart-js/configured-chart-js.js +3 -3
- package/esm2015/lib/components/chart/chart-js/configured-chart-js.metadata.json +1 -1
- package/esm2015/lib/components/chart/configs/type.config.js +3 -2
- package/esm2015/lib/components/chart-deprecated/options/bar.js +2 -2
- package/esm2015/lib/components/chart-deprecated/options/column.js +2 -2
- package/esm2015/lib/components/index.js +1 -2
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/list/directives/list-item-color.directive.js +1 -1
- package/esm2015/lib/components/list/list-item/list-item.component.js +1 -1
- package/esm2015/lib/components/list/list-item/list-item.component.metadata.json +1 -1
- package/esm2015/lib/components/list/list.component.js +1 -1
- package/esm2015/lib/components/list/list.component.metadata.json +1 -1
- package/esm2015/lib/components/modal/modal-wrapper/modal-wrapper.component.js +2 -2
- package/esm2015/lib/components/modal/modal-wrapper/modal-wrapper.component.metadata.json +1 -1
- package/esm2015/lib/components/modal/services/action-sheet.helper.js +3 -3
- package/esm2015/lib/components/modal/services/action-sheet.helper.metadata.json +1 -1
- package/esm2015/lib/components/page/index.js +1 -1
- package/esm2015/lib/components/page/index.metadata.json +1 -1
- package/esm2015/lib/components/page/page.component.js +9 -2
- package/esm2015/lib/components/page/page.component.metadata.json +1 -1
- package/esm2015/lib/components/page/page.module.js +3 -2
- package/esm2015/lib/components/page/page.module.metadata.json +1 -1
- package/esm2015/lib/components/segmented-control/segment-item.js +1 -1
- package/esm2015/lib/components/segmented-control/segmented-control.component.js +3 -3
- package/esm2015/lib/components/segmented-control/segmented-control.component.metadata.json +1 -1
- package/esm2015/lib/components/stock-chart-deprecated/options/stock-chart-deprecated-options.js +2 -2
- package/esm2015/lib/components/web-component-proxies.component.js +42 -0
- package/esm2015/lib/components/web-component-proxies.component.metadata.json +1 -0
- package/esm2015/lib/custom-elements-initializer.js +17 -0
- package/esm2015/lib/custom-elements-initializer.metadata.json +1 -0
- package/esm2015/lib/directives/fit-heading/fit-heading.directive.js +2 -2
- package/esm2015/lib/directives/fit-heading/fit-heading.directive.metadata.json +1 -1
- package/esm2015/lib/directives/theme-color/theme-color.directive.js +2 -3
- package/esm2015/lib/directives/theme-color/theme-color.directive.metadata.json +1 -1
- package/esm2015/lib/helpers/color-helper.js +2 -108
- package/esm2015/lib/helpers/color-helper.metadata.json +1 -1
- package/esm2015/lib/helpers/design-token-helper.js +2 -80
- package/esm2015/lib/helpers/design-token-helper.metadata.json +1 -1
- package/esm2015/lib/helpers/index.js +4 -2
- package/esm2015/lib/helpers/index.metadata.json +1 -1
- package/esm2015/lib/helpers/platform.service.js +2 -2
- package/esm2015/lib/helpers/string-helper.js +2 -45
- package/esm2015/lib/helpers/string-helper.metadata.json +1 -1
- package/esm2015/lib/helpers/theme-color.type.js +1 -1
- package/esm2015/lib/helpers/theme-color.type.metadata.json +1 -1
- package/esm2015/lib/index.js +5 -1
- package/esm2015/lib/index.metadata.json +1 -1
- package/esm2015/lib/kirby.module.js +4 -2
- package/esm2015/lib/kirby.module.metadata.json +1 -1
- package/esm2015/testing-base/kirbydesign-designsystem-testing-base.js +51 -52
- package/esm2015/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
- package/esm2015/testing-base/lib/components/mock.page.component.js +4 -2
- package/esm2015/testing-base/lib/components/mock.page.component.metadata.json +1 -1
- package/esm2015/testing-base/lib/directives/mock.theme-color.directive.js +1 -2
- package/esm2015/testing-base/lib/directives/mock.theme-color.directive.metadata.json +1 -1
- package/esm2015/testing-base/lib/mock-components.js +1 -3
- package/esm2015/testing-base/lib/mock-components.metadata.json +1 -1
- package/fesm2015/kirbydesign-designsystem-testing-base.js +5 -25
- package/fesm2015/kirbydesign-designsystem-testing-base.js.map +1 -1
- package/fesm2015/kirbydesign-designsystem.js +132 -544
- package/fesm2015/kirbydesign-designsystem.js.map +1 -1
- package/kirbydesign-designsystem.d.ts +76 -75
- package/kirbydesign-designsystem.metadata.json +1 -1
- package/lib/components/angular-component-lib/utils.d.ts +7 -0
- package/lib/components/avatar/avatar.component.d.ts +1 -1
- package/lib/components/button/button.component.d.ts +1 -1
- package/lib/components/card/card-header/card-header.component.d.ts +1 -1
- package/lib/components/flag/flag.component.d.ts +1 -1
- package/lib/components/index.d.ts +0 -1
- package/lib/components/list/directives/list-item-color.directive.d.ts +1 -1
- package/lib/components/list/list-item/list-item.component.d.ts +1 -1
- package/lib/components/list/list.component.d.ts +1 -1
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/page/page.component.d.ts +11 -0
- package/lib/components/progress-circle/progress-circle.component.d.ts +1 -1
- package/lib/components/segmented-control/segment-item.d.ts +3 -2
- package/lib/components/web-component-proxies.component.d.ts +9 -0
- package/lib/custom-elements-initializer.d.ts +7 -0
- package/lib/directives/theme-color/theme-color.directive.d.ts +1 -1
- package/lib/helpers/color-helper.d.ts +1 -36
- package/lib/helpers/design-token-helper.d.ts +1 -42
- package/lib/helpers/index.d.ts +1 -1
- package/lib/helpers/string-helper.d.ts +1 -4
- package/lib/helpers/theme-color.type.d.ts +1 -1
- package/lib/index.d.ts +1 -0
- package/package.json +3 -2
- package/scss/_global-styles.scss +1 -0
- package/scss/base/_variables.scss +1 -0
- package/testing-base/kirbydesign-designsystem-testing-base.d.ts +50 -51
- package/testing-base/kirbydesign-designsystem-testing-base.metadata.json +1 -1
- package/testing-base/lib/components/mock.page.component.d.ts +2 -0
- package/esm2015/lib/components/badge/badge.component.js +0 -14
- package/esm2015/lib/components/badge/badge.component.metadata.json +0 -1
- package/esm2015/lib/helpers/color-helper.styles.js +0 -194
- package/esm2015/lib/helpers/color-helper.styles.metadata.json +0 -1
- package/esm2015/lib/helpers/design-token-helper.styles.js +0 -79
- package/esm2015/lib/helpers/design-token-helper.styles.metadata.json +0 -1
- package/esm2015/testing-base/lib/components/mock.badge.component.js +0 -22
- package/esm2015/testing-base/lib/components/mock.badge.component.metadata.json +0 -1
- package/lib/components/badge/badge.component.d.ts +0 -3
- package/lib/helpers/color-helper.styles.d.ts +0 -206
- package/lib/helpers/design-token-helper.styles.d.ts +0 -124
- package/testing-base/lib/components/mock.badge.component.d.ts +0 -3
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
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';
|
|
@@ -7,7 +9,7 @@ import { filter, first, startWith, map, pairwise, debounceTime, takeUntil } from
|
|
|
7
9
|
import { CommonModule, formatNumber, getLocaleDateFormat, FormatWidth, getLocaleNumberSymbol, NumberSymbol, DOCUMENT } from '@angular/common';
|
|
8
10
|
import * as Highcharts from 'highcharts';
|
|
9
11
|
import { chart, dateFormat } from 'highcharts';
|
|
10
|
-
import { CategoryScale, LinearScale, BarElement, LineElement, PointElement, BarController, LineController, Chart, Legend } from 'chart.js';
|
|
12
|
+
import { CategoryScale, LinearScale, BarElement, LineElement, PointElement, BarController, LineController, Filler, Chart, Legend } from 'chart.js';
|
|
11
13
|
export { Chart } from 'chart.js';
|
|
12
14
|
import annotationPlugin from 'chartjs-plugin-annotation';
|
|
13
15
|
import * as Highcharts$1 from 'highcharts/highstock';
|
|
@@ -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(
|
|
111
|
-
Duration[Duration["SHORT"] = parseInt(
|
|
112
|
-
Duration[Duration["LONG"] = parseInt(
|
|
113
|
-
Duration[Duration["EXTRA_LONG"] = parseInt(
|
|
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 =
|
|
39
|
+
KirbyAnimation.Easing = DesignTokenHelper.transitionEasings();
|
|
116
40
|
})(KirbyAnimation || (KirbyAnimation = {}));
|
|
117
41
|
|
|
118
42
|
class RouterOutletComponent {
|
|
@@ -182,7 +106,7 @@ class ActionSheetHelper {
|
|
|
182
106
|
component: ActionSheetComponent,
|
|
183
107
|
cssClass: ['kirby-overlay', 'kirby-action-sheet'],
|
|
184
108
|
componentProps: Object.assign(Object.assign({}, config), { cancel: cancel, itemSelect: itemSelect }),
|
|
185
|
-
backdropDismiss:
|
|
109
|
+
backdropDismiss: true,
|
|
186
110
|
});
|
|
187
111
|
const cancelSubscription = cancel.subscribe(() => ionModal.dismiss());
|
|
188
112
|
const itemSelectSubscription = itemSelect.subscribe((item) => ionModal.dismiss(item));
|
|
@@ -702,429 +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) {
|
|
983
|
-
const rgbValue = ColorHelper.getColor(name + '-rgb');
|
|
984
|
-
return `rgb(${rgbValue})`;
|
|
985
|
-
}
|
|
986
|
-
static getThemeTextColorRgbString(name) {
|
|
987
|
-
const rgbValue = ColorHelper.getTextColor(name + '-rgb');
|
|
988
|
-
return `rgb(${rgbValue})`;
|
|
989
|
-
}
|
|
990
|
-
static getThemeColorHexString(name) {
|
|
991
|
-
return ColorHelper.getColor(name);
|
|
992
|
-
}
|
|
993
|
-
static getThemeTextColorHexString(name) {
|
|
994
|
-
return ColorHelper.getTextColor(name);
|
|
995
|
-
}
|
|
996
|
-
static getTransparentColorRgbString() {
|
|
997
|
-
return 'rgba(0, 0, 0, 0)';
|
|
998
|
-
}
|
|
999
|
-
static colorStringToRgbString(color) {
|
|
1000
|
-
if (color.indexOf('rgb') === 0) {
|
|
1001
|
-
return color;
|
|
1002
|
-
}
|
|
1003
|
-
if (color.indexOf('#') === 0) {
|
|
1004
|
-
return ColorHelper.hexToRGB(color);
|
|
1005
|
-
}
|
|
1006
|
-
if (color.split(',').length === 3) {
|
|
1007
|
-
return `rgb(${color})`;
|
|
1008
|
-
}
|
|
1009
|
-
if (color.split(',').length === 4) {
|
|
1010
|
-
return `rgba(${color})`;
|
|
1011
|
-
}
|
|
1012
|
-
const ctx = document.createElement('canvas').getContext('2d');
|
|
1013
|
-
ctx.fillStyle = color;
|
|
1014
|
-
const renderedColor = ctx.fillStyle.toString();
|
|
1015
|
-
return ColorHelper.colorStringToRgbString(renderedColor);
|
|
1016
|
-
}
|
|
1017
|
-
static hexToRGB(hex) {
|
|
1018
|
-
let r = '0', g = '0', b = '0';
|
|
1019
|
-
// 3 digits
|
|
1020
|
-
if (hex.length === 4) {
|
|
1021
|
-
r = '0x' + hex[1] + hex[1];
|
|
1022
|
-
g = '0x' + hex[2] + hex[2];
|
|
1023
|
-
b = '0x' + hex[3] + hex[3];
|
|
1024
|
-
// 6 digits
|
|
1025
|
-
}
|
|
1026
|
-
else if (hex.length === 7) {
|
|
1027
|
-
r = '0x' + hex[1] + hex[2];
|
|
1028
|
-
g = '0x' + hex[3] + hex[4];
|
|
1029
|
-
b = '0x' + hex[5] + hex[6];
|
|
1030
|
-
}
|
|
1031
|
-
return `rgb(${+r}, ${+g}, ${+b})`;
|
|
1032
|
-
}
|
|
1033
|
-
static getColor(name) {
|
|
1034
|
-
const camelCaseKey = kebabToCamelCase(name);
|
|
1035
|
-
const found = styles$1.kirbyColors[camelCaseKey];
|
|
1036
|
-
return found || null;
|
|
1037
|
-
}
|
|
1038
|
-
static getTextColor(name) {
|
|
1039
|
-
const camelCaseKey = kebabToCamelCase(name);
|
|
1040
|
-
const found = styles$1.kirbyTextColors[camelCaseKey];
|
|
1041
|
-
return found || null;
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
ColorHelper.brandColors = ColorHelper.mapToKirbyColorArray(styles$1.brandColors);
|
|
1045
|
-
ColorHelper.notificationColors = ColorHelper.mapToKirbyColorArray(styles$1.notificationColors);
|
|
1046
|
-
ColorHelper.systemColors = ColorHelper.mapToKirbyColorArray(styles$1.systemColors);
|
|
1047
|
-
ColorHelper.textColors = ColorHelper.mapToKirbyColorArray(styles$1.textColors, styles$1.kirbyTextColors);
|
|
1048
|
-
ColorHelper.mainColors = ColorHelper.getMainColors();
|
|
1049
|
-
|
|
1050
|
-
class DesignTokenHelper {
|
|
1051
|
-
static getColor(name, variant) {
|
|
1052
|
-
const variantSuffix = variant ? `-${variant}` : '';
|
|
1053
|
-
const colorVariant = `${name}${variantSuffix}`;
|
|
1054
|
-
return {
|
|
1055
|
-
name: name,
|
|
1056
|
-
variant: variant,
|
|
1057
|
-
fullname: colorVariant,
|
|
1058
|
-
value: ColorHelper.getThemeColorRgbString(colorVariant),
|
|
1059
|
-
hex: ColorHelper.getThemeColorHexString(colorVariant),
|
|
1060
|
-
};
|
|
1061
|
-
}
|
|
1062
|
-
static getTextColor(name, variant) {
|
|
1063
|
-
const variantSuffix = variant ? `-${variant}` : '';
|
|
1064
|
-
const colorVariant = `${name}${variantSuffix}`;
|
|
1065
|
-
return {
|
|
1066
|
-
name: name,
|
|
1067
|
-
variant: variant,
|
|
1068
|
-
fullname: colorVariant,
|
|
1069
|
-
value: ColorHelper.getThemeTextColorRgbString(colorVariant),
|
|
1070
|
-
hex: ColorHelper.getThemeTextColorHexString(colorVariant),
|
|
1071
|
-
};
|
|
1072
|
-
}
|
|
1073
|
-
static size(key) {
|
|
1074
|
-
return styles.sizes[key];
|
|
1075
|
-
}
|
|
1076
|
-
static fontSize(key) {
|
|
1077
|
-
return styles.fontSizes[key];
|
|
1078
|
-
}
|
|
1079
|
-
static iconFontSize(key) {
|
|
1080
|
-
return styles.iconFontSizes[key];
|
|
1081
|
-
}
|
|
1082
|
-
static fontWeight(key) {
|
|
1083
|
-
return styles.fontWeight[key];
|
|
1084
|
-
}
|
|
1085
|
-
static lineHeight(key) {
|
|
1086
|
-
return styles.lineHeight[key];
|
|
1087
|
-
}
|
|
1088
|
-
static backgroundColor() {
|
|
1089
|
-
return ColorHelper.getBackgroundColor();
|
|
1090
|
-
}
|
|
1091
|
-
static borderRadius() {
|
|
1092
|
-
return styles.borderRadius;
|
|
1093
|
-
}
|
|
1094
|
-
static borderRadiusRound() {
|
|
1095
|
-
return styles.borderRadiusRound;
|
|
1096
|
-
}
|
|
1097
|
-
static alertMaxWidth() {
|
|
1098
|
-
return styles.alertMaxWidth;
|
|
1099
|
-
}
|
|
1100
|
-
static compactModalMaxWidth() {
|
|
1101
|
-
return styles.compactModalMaxWidth;
|
|
1102
|
-
}
|
|
1103
|
-
static dropdownItemHeight() {
|
|
1104
|
-
return styles.dropdownItemHeight;
|
|
1105
|
-
}
|
|
1106
|
-
static avatarSize(key) {
|
|
1107
|
-
return styles.avatarSizes[key];
|
|
1108
|
-
}
|
|
1109
|
-
static fatFingerSize() {
|
|
1110
|
-
return styles.fatFingerSize;
|
|
1111
|
-
}
|
|
1112
|
-
static getElevation(z) {
|
|
1113
|
-
return styles.elevations[z];
|
|
1114
|
-
}
|
|
1115
|
-
static itemHeight(key) {
|
|
1116
|
-
return styles.itemHeights[key];
|
|
1117
|
-
}
|
|
1118
|
-
static zLayer(key) {
|
|
1119
|
-
return styles.zLayers[key];
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
DesignTokenHelper.breakpoints = styles.breakpoints;
|
|
1123
|
-
DesignTokenHelper.softKeyboardTransitionEnter = styles.softKeyboardTransitionEnter;
|
|
1124
|
-
DesignTokenHelper.softKeyboardTransitionLeave = styles.softKeyboardTransitionLeave;
|
|
1125
|
-
DesignTokenHelper.modalDefaultHeight = styles.modalDefaultHeight;
|
|
1126
|
-
DesignTokenHelper.drawerDefaultHeight = styles.drawerDefaultHeight;
|
|
1127
|
-
|
|
1128
629
|
class PlatformService {
|
|
1129
630
|
constructor(windowRef) {
|
|
1130
631
|
this.windowRef = windowRef;
|
|
@@ -2550,7 +2051,7 @@ AvatarComponent.decorators = [
|
|
|
2550
2051
|
selector: 'kirby-avatar',
|
|
2551
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",
|
|
2552
2053
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2553
|
-
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-
|
|
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)}"]
|
|
2554
2055
|
},] }
|
|
2555
2056
|
];
|
|
2556
2057
|
AvatarComponent.propDecorators = {
|
|
@@ -2564,19 +2065,6 @@ AvatarComponent.propDecorators = {
|
|
|
2564
2065
|
_cssClass: [{ type: HostBinding, args: ['class',] }]
|
|
2565
2066
|
};
|
|
2566
2067
|
|
|
2567
|
-
class BadgeComponent {
|
|
2568
|
-
}
|
|
2569
|
-
BadgeComponent.decorators = [
|
|
2570
|
-
{ type: Component, args: [{
|
|
2571
|
-
selector: 'kirby-badge',
|
|
2572
|
-
template: "<ion-badge color=\"none\">\n <ng-content *ngIf=\"!text\"></ng-content>\n <ng-container *ngIf=\"text\">{{ text }}</ng-container>\n</ion-badge>\n",
|
|
2573
|
-
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)}"]
|
|
2574
|
-
},] }
|
|
2575
|
-
];
|
|
2576
|
-
BadgeComponent.propDecorators = {
|
|
2577
|
-
text: [{ type: Input }]
|
|
2578
|
-
};
|
|
2579
|
-
|
|
2580
2068
|
class CardComponent {
|
|
2581
2069
|
constructor(elementRef, resizeObserverService, renderer) {
|
|
2582
2070
|
this.elementRef = elementRef;
|
|
@@ -3552,6 +3040,8 @@ function deepCopy(obj) {
|
|
|
3552
3040
|
return JSON.parse(JSON.stringify(obj));
|
|
3553
3041
|
}
|
|
3554
3042
|
|
|
3043
|
+
// re-export helpers from core, to preserve backwards compatability
|
|
3044
|
+
|
|
3555
3045
|
const { getThemeColorHexString } = ColorHelper;
|
|
3556
3046
|
/* The chart.js annotation does not allow for changing the
|
|
3557
3047
|
defaults it comes with. In order to have sensible defaults
|
|
@@ -3598,7 +3088,7 @@ const CHART_INTERACTION_FUNCTIONS_EXTENSIONS = {
|
|
|
3598
3088
|
};
|
|
3599
3089
|
|
|
3600
3090
|
const { fontSize: fontSize$2 } = DesignTokenHelper;
|
|
3601
|
-
const { getThemeColorHexString: getThemeColorHexString$1 } = ColorHelper;
|
|
3091
|
+
const { getThemeColorHexString: getThemeColorHexString$1, getThemeColorRgbString } = ColorHelper;
|
|
3602
3092
|
const CHART_TYPES_CONFIG = {
|
|
3603
3093
|
bar: {
|
|
3604
3094
|
type: 'bar',
|
|
@@ -3672,6 +3162,7 @@ const CHART_TYPES_CONFIG = {
|
|
|
3672
3162
|
line: {
|
|
3673
3163
|
type: 'line',
|
|
3674
3164
|
options: {
|
|
3165
|
+
backgroundColor: getThemeColorRgbString('semi-light', 0.5),
|
|
3675
3166
|
scales: {
|
|
3676
3167
|
x: {
|
|
3677
3168
|
grid: {
|
|
@@ -3782,7 +3273,7 @@ const CHART_GLOBAL_DEFAULTS = {
|
|
|
3782
3273
|
const CHART_SCALES = [CategoryScale, LinearScale];
|
|
3783
3274
|
const CHART_ELEMENTS = [BarElement, LineElement, PointElement];
|
|
3784
3275
|
const CHART_CONTROLLERS = [BarController, LineController];
|
|
3785
|
-
const CHART_PLUGINS = [annotationPlugin];
|
|
3276
|
+
const CHART_PLUGINS = [annotationPlugin, Filler];
|
|
3786
3277
|
/* Order matters; defaults must be merged after register as
|
|
3787
3278
|
register modifies the Chart.defaults objects */
|
|
3788
3279
|
Chart.register(Legend, ...CHART_SCALES, ...CHART_ELEMENTS, ...CHART_CONTROLLERS, ...CHART_PLUGINS);
|
|
@@ -7424,6 +6915,7 @@ class PageComponent {
|
|
|
7424
6915
|
this.titleAlignment = 'left';
|
|
7425
6916
|
this.enter = new EventEmitter();
|
|
7426
6917
|
this.leave = new EventEmitter();
|
|
6918
|
+
this.refresh = new EventEmitter();
|
|
7427
6919
|
this.pageTitleIntersectionObserverRef = this.pageTitleIntersectionObserver();
|
|
7428
6920
|
this.urls = [];
|
|
7429
6921
|
this.ngOnDestroy$ = new Subject();
|
|
@@ -7483,6 +6975,11 @@ class PageComponent {
|
|
|
7483
6975
|
this.content.scrollToTop(KirbyAnimation.Duration.LONG);
|
|
7484
6976
|
});
|
|
7485
6977
|
}
|
|
6978
|
+
delegateRefreshEvent(event) {
|
|
6979
|
+
this.refresh.emit({
|
|
6980
|
+
complete: event.target.complete.bind(event.target),
|
|
6981
|
+
});
|
|
6982
|
+
}
|
|
7486
6983
|
onEnter() {
|
|
7487
6984
|
if (this.hasEntered)
|
|
7488
6985
|
return;
|
|
@@ -7583,7 +7080,7 @@ class PageComponent {
|
|
|
7583
7080
|
PageComponent.decorators = [
|
|
7584
7081
|
{ type: Component, args: [{
|
|
7585
7082
|
selector: 'kirby-page',
|
|
7586
|
-
template: "<ion-header>\n <ion-toolbar>\n <ion-buttons slot=\"start\">\n <ion-back-button\n text=\"\"\n [defaultHref]=\"defaultBackHref\"\n icon=\"assets/kirby/icons/svg/arrow-back.svg\"\n [style.visibility]=\"hideBackButton ? 'hidden' : null\"\n ></ion-back-button>\n </ion-buttons>\n <ion-title>\n <div class=\"toolbar-title hide\" [class.fade-in]=\"toolbarTitleVisible\">\n <ng-container *ngTemplateOutlet=\"toolbarTitleTemplate\"></ng-container>\n </div>\n </ion-title>\n <ion-buttons\n class=\"hide\"\n slot=\"primary\"\n [class.fade-in]=\"toolbarStickyActionsVisible && stickyActionsTemplate\"\n >\n <ng-container *ngTemplateOutlet=\"stickyActionsTemplate\"></ng-container>\n </ion-buttons>\n <ion-buttons\n class=\"hide\"\n slot=\"secondary\"\n [class.fade-in]=\"toolbarFixedActionsVisible && fixedActionsTemplate\"\n >\n <ng-container *ngTemplateOutlet=\"fixedActionsTemplate\"></ng-container>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n\n<ion-content scrollEvents=\"true\" forceOverscroll=\"false\">\n <div class=\"content-inner\">\n <div\n class=\"page-title\"\n #pageTitle\n *ngIf=\"hasPageTitle\"\n [class.has-actions]=\"hasActionsInPage\"\n [ngClass]=\"{\n 'text-center': titleAlignment === 'center',\n 'text-right': titleAlignment === 'right'\n }\"\n >\n <ng-container\n *ngTemplateOutlet=\"customTitleTemplate || defaultPageTitleTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"pageActionsTemplate || defaultPageActionsTemplate\"\n ></ng-container>\n </div>\n <!-- Content -->\n <ng-container\n *ngTemplateOutlet=\"customContentTemplate || defaultContentTemplate\"\n ></ng-container>\n </div>\n\n <div slot=\"fixed\" class=\"fixed-content\" *ngIf=\"fixedContentTemplate\">\n <div class=\"content-inner\">\n <ng-container *ngTemplateOutlet=\"fixedContentTemplate\"></ng-container>\n </div>\n </div>\n</ion-content>\n\n<ion-footer>\n <ng-content select=\"kirby-page-footer\"></ng-content>\n</ion-footer>\n\n<ng-template #defaultPageTitleTemplate>\n <h1 [kirbyFitHeading]=\"fitHeadingConfig\">\n <ng-container *ngTemplateOutlet=\"simpleTitleTemplate\"></ng-container>\n </h1>\n</ng-template>\n\n<ng-template #defaultPageActionsTemplate>\n <ng-content select=\"kirby-page-actions\"></ng-content>\n</ng-template>\n\n<ng-template #defaultContentTemplate>\n <ng-content select=\"kirby-page-content\"></ng-content>\n</ng-template>\n\n<ng-template #simpleTitleTemplate>{{ title }}</ng-template>\n<ng-template #simpleToolbarTitleTemplate>{{ toolbarTitle }}</ng-template>\n",
|
|
7083
|
+
template: "<ion-header>\n <ion-toolbar>\n <ion-buttons slot=\"start\">\n <ion-back-button\n text=\"\"\n [defaultHref]=\"defaultBackHref\"\n icon=\"assets/kirby/icons/svg/arrow-back.svg\"\n [style.visibility]=\"hideBackButton ? 'hidden' : null\"\n ></ion-back-button>\n </ion-buttons>\n <ion-title>\n <div class=\"toolbar-title hide\" [class.fade-in]=\"toolbarTitleVisible\">\n <ng-container *ngTemplateOutlet=\"toolbarTitleTemplate\"></ng-container>\n </div>\n </ion-title>\n <ion-buttons\n class=\"hide\"\n slot=\"primary\"\n [class.fade-in]=\"toolbarStickyActionsVisible && stickyActionsTemplate\"\n >\n <ng-container *ngTemplateOutlet=\"stickyActionsTemplate\"></ng-container>\n </ion-buttons>\n <ion-buttons\n class=\"hide\"\n slot=\"secondary\"\n [class.fade-in]=\"toolbarFixedActionsVisible && fixedActionsTemplate\"\n >\n <ng-container *ngTemplateOutlet=\"fixedActionsTemplate\"></ng-container>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n\n<ion-content scrollEvents=\"true\" forceOverscroll=\"false\">\n <ion-refresher\n *ngIf=\"refresh.observers.length > 0\"\n (ionRefresh)=\"delegateRefreshEvent($event)\"\n slot=\"fixed\"\n >\n <kirby-spinner></kirby-spinner>\n </ion-refresher>\n\n <div class=\"content-inner\">\n <div\n class=\"page-title\"\n #pageTitle\n *ngIf=\"hasPageTitle\"\n [class.has-actions]=\"hasActionsInPage\"\n [ngClass]=\"{\n 'text-center': titleAlignment === 'center',\n 'text-right': titleAlignment === 'right'\n }\"\n >\n <ng-container\n *ngTemplateOutlet=\"customTitleTemplate || defaultPageTitleTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"pageActionsTemplate || defaultPageActionsTemplate\"\n ></ng-container>\n </div>\n <!-- Content -->\n <ng-container\n *ngTemplateOutlet=\"customContentTemplate || defaultContentTemplate\"\n ></ng-container>\n </div>\n\n <div slot=\"fixed\" class=\"fixed-content\" *ngIf=\"fixedContentTemplate\">\n <div class=\"content-inner\">\n <ng-container *ngTemplateOutlet=\"fixedContentTemplate\"></ng-container>\n </div>\n </div>\n</ion-content>\n\n<ion-footer>\n <ng-content select=\"kirby-page-footer\"></ng-content>\n</ion-footer>\n\n<ng-template #defaultPageTitleTemplate>\n <h1 [kirbyFitHeading]=\"fitHeadingConfig\">\n <ng-container *ngTemplateOutlet=\"simpleTitleTemplate\"></ng-container>\n </h1>\n</ng-template>\n\n<ng-template #defaultPageActionsTemplate>\n <ng-content select=\"kirby-page-actions\"></ng-content>\n</ng-template>\n\n<ng-template #defaultContentTemplate>\n <ng-content select=\"kirby-page-content\"></ng-content>\n</ng-template>\n\n<ng-template #simpleTitleTemplate>{{ title }}</ng-template>\n<ng-template #simpleToolbarTitleTemplate>{{ toolbarTitle }}</ng-template>\n",
|
|
7587
7084
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7588
7085
|
styles: ["ion-header,ion-toolbar{--background:var(--kirby-background-color);margin:0 auto}@media (min-width:1025px) and (hover:hover) and (pointer:fine){ion-header,ion-toolbar{max-width:768px}}ion-toolbar{--border-width:0!important;--padding-start:4px;--padding-end:4px;--padding-top:0;--padding-bottom:0}ion-toolbar ion-buttons[slot=secondary]{order:6}ion-toolbar ion-title .toolbar-title{text-overflow:ellipsis;white-space:nowrap;pointer-events:auto;overflow:hidden}ion-toolbar ion-title .toolbar-title ::ng-deep>*{text-overflow:ellipsis;white-space:nowrap;pointer-events:auto;overflow:hidden}.hide{visibility:hidden;opacity:0;transition:opacity .1s linear}.hide.fade-in{visibility:inherit;opacity:1}ion-title{box-sizing:border-box;font-size:16px;font-weight:400}ion-back-button{--color:var(--kirby-black);--icon-font-size:24px;height:44px;width:44px}.page-title{margin-left:16px;margin-top:8px;margin-bottom:var(--kirby-page-title-margin-bottom,40px)}.page-title.has-actions{display:flex;justify-content:space-between;align-items:flex-start}.page-title.text-center{text-align:center;margin-left:0}.page-title.text-right{text-align:right}.page-title h1,.page-title h2,.page-title h3,.page-title h4,.page-title h5,.page-title h6{margin:0}ion-content{--padding-start:var(--page-content-padding-start,16px);--padding-end:var(--page-content-padding-end,16px);--background:var(--kirby-background-color)}ion-content .content-inner{max-width:var(--page-content-max-width,720px);margin:0 auto;padding-bottom:40px}ion-content .fixed-content{width:100%;position:absolute;bottom:0}ion-content .fixed-content .content-inner{position:relative}"]
|
|
7589
7086
|
},] }
|
|
@@ -7608,6 +7105,7 @@ PageComponent.propDecorators = {
|
|
|
7608
7105
|
tabBarBottomHidden: [{ type: Input }],
|
|
7609
7106
|
enter: [{ type: Output }],
|
|
7610
7107
|
leave: [{ type: Output }],
|
|
7108
|
+
refresh: [{ type: Output }],
|
|
7611
7109
|
content: [{ type: ViewChild, args: [IonContent, { static: true },] }],
|
|
7612
7110
|
ionContentElement: [{ type: ViewChild, args: [IonContent, { static: true, read: ElementRef },] }],
|
|
7613
7111
|
ionHeaderElement: [{ type: ViewChild, args: [IonHeader, { static: true, read: ElementRef },] }],
|
|
@@ -7793,6 +7291,17 @@ FitHeadingModule.decorators = [
|
|
|
7793
7291
|
},] }
|
|
7794
7292
|
];
|
|
7795
7293
|
|
|
7294
|
+
class SpinnerModule {
|
|
7295
|
+
}
|
|
7296
|
+
SpinnerModule.decorators = [
|
|
7297
|
+
{ type: NgModule, args: [{
|
|
7298
|
+
declarations: [SpinnerComponent],
|
|
7299
|
+
imports: [CommonModule],
|
|
7300
|
+
exports: [SpinnerComponent],
|
|
7301
|
+
providers: [],
|
|
7302
|
+
},] }
|
|
7303
|
+
];
|
|
7304
|
+
|
|
7796
7305
|
class PageModule {
|
|
7797
7306
|
}
|
|
7798
7307
|
PageModule.decorators = [
|
|
@@ -7809,7 +7318,7 @@ PageModule.decorators = [
|
|
|
7809
7318
|
PageTitleDirective,
|
|
7810
7319
|
PageToolbarTitleDirective,
|
|
7811
7320
|
],
|
|
7812
|
-
imports: [CommonModule, IonicModule, FitHeadingModule],
|
|
7321
|
+
imports: [CommonModule, IonicModule, FitHeadingModule, SpinnerModule],
|
|
7813
7322
|
exports: [
|
|
7814
7323
|
PageComponent,
|
|
7815
7324
|
PageActionsComponent,
|
|
@@ -7939,10 +7448,10 @@ class SegmentedControlComponent {
|
|
|
7939
7448
|
SegmentedControlComponent.decorators = [
|
|
7940
7449
|
{ type: Component, args: [{
|
|
7941
7450
|
selector: 'kirby-segmented-control',
|
|
7942
|
-
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
|
|
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",
|
|
7943
7452
|
// tslint:disable-next-line: no-host-metadata-property
|
|
7944
7453
|
host: { role: 'group' },
|
|
7945
|
-
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}
|
|
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}"]
|
|
7946
7455
|
},] }
|
|
7947
7456
|
];
|
|
7948
7457
|
SegmentedControlComponent.propDecorators = {
|
|
@@ -8579,7 +8088,6 @@ ThemeColorDirective.decorators = [
|
|
|
8579
8088
|
// tslint:disable-next-line:directive-selector
|
|
8580
8089
|
selector: `kirby-avatar[themeColor],
|
|
8581
8090
|
kirby-card[themeColor],
|
|
8582
|
-
kirby-badge[themeColor],
|
|
8583
8091
|
kirby-icon[themeColor],
|
|
8584
8092
|
kirby-progress-circle-ring[themeColor],
|
|
8585
8093
|
kirby-modal-footer[themeColor],
|
|
@@ -8604,6 +8112,82 @@ ThemeColorDirective.propDecorators = {
|
|
|
8604
8112
|
themeColor: [{ type: Input }]
|
|
8605
8113
|
};
|
|
8606
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
|
+
|
|
8607
8191
|
class ChartModule {
|
|
8608
8192
|
}
|
|
8609
8193
|
ChartModule.decorators = [
|
|
@@ -8614,17 +8198,6 @@ ChartModule.decorators = [
|
|
|
8614
8198
|
},] }
|
|
8615
8199
|
];
|
|
8616
8200
|
|
|
8617
|
-
class SpinnerModule {
|
|
8618
|
-
}
|
|
8619
|
-
SpinnerModule.decorators = [
|
|
8620
|
-
{ type: NgModule, args: [{
|
|
8621
|
-
declarations: [SpinnerComponent],
|
|
8622
|
-
imports: [CommonModule],
|
|
8623
|
-
exports: [SpinnerComponent],
|
|
8624
|
-
providers: [],
|
|
8625
|
-
},] }
|
|
8626
|
-
];
|
|
8627
|
-
|
|
8628
8201
|
const exportedDeclarations = [
|
|
8629
8202
|
ListComponent,
|
|
8630
8203
|
ListItemComponent,
|
|
@@ -8709,6 +8282,20 @@ ToggleButtonModule.decorators = [
|
|
|
8709
8282
|
},] }
|
|
8710
8283
|
];
|
|
8711
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
|
+
|
|
8712
8299
|
class ModalRouterLinkDirective {
|
|
8713
8300
|
constructor(modalNavigationService) {
|
|
8714
8301
|
this.modalNavigationService = modalNavigationService;
|
|
@@ -8751,7 +8338,7 @@ const exportedDeclarations$1 = [
|
|
|
8751
8338
|
ModalRouterLinkDirective,
|
|
8752
8339
|
SegmentedControlComponent,
|
|
8753
8340
|
ChipComponent,
|
|
8754
|
-
|
|
8341
|
+
KirbyBadge,
|
|
8755
8342
|
ThemeColorDirective,
|
|
8756
8343
|
DateInputDirective,
|
|
8757
8344
|
DecimalMaskDirective,
|
|
@@ -8812,6 +8399,7 @@ const providers = [
|
|
|
8812
8399
|
LoadingOverlayService,
|
|
8813
8400
|
ResizeObserverFactory,
|
|
8814
8401
|
ResizeObserverService,
|
|
8402
|
+
customElementsInitializer(),
|
|
8815
8403
|
];
|
|
8816
8404
|
const entryComponents = [
|
|
8817
8405
|
ModalWrapperComponent,
|
|
@@ -8866,5 +8454,5 @@ KirbyModule.ctorParameters = () => [
|
|
|
8866
8454
|
* Generated bundle index. Do not edit.
|
|
8867
8455
|
*/
|
|
8868
8456
|
|
|
8869
|
-
export { AccordionDirective, AccordionItemComponent, ActionSheetComponent, AppComponent, AppModule, AvatarComponent, AvatarSize, BadgeComponent, ButtonComponent, ButtonSize, COMPONENT_PROPS, CalendarComponent, CardComponent, CardFooterComponent, CardHeaderComponent, ChartComponent, ChartDeprecatedComponent, ChartDeprecatedType, CheckboxComponent, ChipComponent,
|
|
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 };
|
|
8870
8458
|
//# sourceMappingURL=kirbydesign-designsystem.js.map
|