@kirbydesign/designsystem 11.5.0 → 11.6.0
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/fesm2022/kirbydesign-designsystem-accordion.mjs +11 -11
- package/fesm2022/kirbydesign-designsystem-action-group.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-avatar.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-badge.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-button.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-calendar.mjs +12 -9
- package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-card.mjs +16 -16
- package/fesm2022/kirbydesign-designsystem-chart.mjs +22 -22
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-config.mjs +1 -1
- package/fesm2022/kirbydesign-designsystem-data-table.mjs +8 -8
- package/fesm2022/kirbydesign-designsystem-data-table.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-divider.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs +43 -122
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-flag.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-form-field.mjs +28 -28
- package/fesm2022/kirbydesign-designsystem-header.mjs +19 -19
- package/fesm2022/kirbydesign-designsystem-helpers.mjs +9 -9
- package/fesm2022/kirbydesign-designsystem-icon.mjs +14 -10
- package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item-group.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-item.mjs +10 -10
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-list.mjs +40 -40
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-menu.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-modal.mjs +44 -44
- package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-page.mjs +40 -40
- package/fesm2022/kirbydesign-designsystem-popover.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-radio.mjs +11 -11
- package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-range.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-range.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-section-header.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-shared-floating.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-shared-portal.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-shared.mjs +18 -18
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide.mjs +13 -13
- package/fesm2022/kirbydesign-designsystem-spinner.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs +10 -10
- package/fesm2022/kirbydesign-designsystem-tabs.mjs +13 -13
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs +286 -286
- package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-testing-jest.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-testing.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-toast.mjs +13 -13
- package/fesm2022/kirbydesign-designsystem-toast.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-toggle.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-types.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem.mjs +15 -15
- package/fesm2022/kirbydesign-designsystem.mjs.map +1 -1
- package/icons/svg/id-card.svg +3 -0
- package/icons/svg/maintenance.svg +3 -0
- package/icons/svg/message-read.svg +3 -0
- package/icons/svg/ownership.svg +3 -0
- package/icons/svg/top-up.svg +3 -1
- package/package.json +3 -4
- package/types/kirbydesign-designsystem-action-group.d.ts +1 -1
- package/types/kirbydesign-designsystem-calendar.d.ts +5 -1
- package/types/kirbydesign-designsystem-calendar.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-config.d.ts +1 -1
- package/types/kirbydesign-designsystem-dropdown.d.ts +9 -17
- package/types/kirbydesign-designsystem-dropdown.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-icon.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-page.d.ts +1 -1
- package/types/kirbydesign-designsystem-slide.d.ts +1 -1
- package/types/kirbydesign-designsystem-toast.d.ts +2 -2
- package/types/kirbydesign-designsystem-toast.d.ts.map +1 -1
|
@@ -91,11 +91,11 @@ const MOCK_PROVIDERS = [
|
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
92
92
|
/// <reference path='../../../../../node_modules/@types/jasmine/index.d.ts' />
|
|
93
93
|
class KirbyTestingModule {
|
|
94
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
95
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
96
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
94
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KirbyTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
95
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: KirbyTestingModule, imports: [KirbyTestingBaseModule], exports: [KirbyTestingBaseModule] }); }
|
|
96
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KirbyTestingModule, providers: [...MOCK_PROVIDERS], imports: [KirbyTestingBaseModule, KirbyTestingBaseModule] }); }
|
|
97
97
|
}
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KirbyTestingModule, decorators: [{
|
|
99
99
|
type: NgModule,
|
|
100
100
|
args: [{
|
|
101
101
|
imports: [KirbyTestingBaseModule],
|
|
@@ -97,11 +97,11 @@ const MOCK_PROVIDERS = [
|
|
|
97
97
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
98
98
|
/// <reference path='../../../../../node_modules/@types/jest/index.d.ts' />
|
|
99
99
|
class KirbyTestingModule {
|
|
100
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
101
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
102
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
100
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KirbyTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
101
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: KirbyTestingModule, imports: [KirbyTestingBaseModule], exports: [KirbyTestingBaseModule] }); }
|
|
102
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KirbyTestingModule, providers: [...MOCK_PROVIDERS], imports: [KirbyTestingBaseModule, KirbyTestingBaseModule] }); }
|
|
103
103
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KirbyTestingModule, decorators: [{
|
|
105
105
|
type: NgModule,
|
|
106
106
|
args: [{
|
|
107
107
|
imports: [KirbyTestingBaseModule],
|
|
@@ -5,11 +5,11 @@ import { provideIonicAngular } from '@ionic/angular/standalone';
|
|
|
5
5
|
import { componentOnReady } from '@ionic/core';
|
|
6
6
|
|
|
7
7
|
class IonicTestingModule {
|
|
8
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
9
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
10
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
8
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IonicTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: IonicTestingModule }); }
|
|
10
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IonicTestingModule, providers: [provideIonicAngular({ mode: 'ios', _testing: true })] }); }
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IonicTestingModule, decorators: [{
|
|
13
13
|
type: NgModule,
|
|
14
14
|
args: [{
|
|
15
15
|
providers: [provideIonicAngular({ mode: 'ios', _testing: true })],
|
|
@@ -13,7 +13,7 @@ class ToastHelper {
|
|
|
13
13
|
animated: config.animated,
|
|
14
14
|
message: config.message,
|
|
15
15
|
position: 'top',
|
|
16
|
-
duration: config.durationInMs
|
|
16
|
+
duration: config.durationInMs ?? ToastHelper.DURATION_IN_MS,
|
|
17
17
|
cssClass: this.getCssClass(config.messageType),
|
|
18
18
|
});
|
|
19
19
|
await toast.present();
|
|
@@ -30,10 +30,10 @@ class ToastHelper {
|
|
|
30
30
|
}
|
|
31
31
|
return cssClass;
|
|
32
32
|
}
|
|
33
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
34
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToastHelper, deps: [{ token: i1.ToastController }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
34
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToastHelper }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToastHelper, decorators: [{
|
|
37
37
|
type: Injectable
|
|
38
38
|
}], ctorParameters: () => [{ type: i1.ToastController }] });
|
|
39
39
|
|
|
@@ -41,17 +41,17 @@ class ToastController {
|
|
|
41
41
|
constructor(toastHelper) {
|
|
42
42
|
this.toastHelper = toastHelper;
|
|
43
43
|
}
|
|
44
|
-
showToast(config, onCloseToast) {
|
|
45
|
-
this.toastHelper.showToast(config)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
async showToast(config, onCloseToast) {
|
|
45
|
+
const overlay = await this.toastHelper.showToast(config);
|
|
46
|
+
if (onCloseToast) {
|
|
47
|
+
overlay.onDidDismiss.then(() => onCloseToast());
|
|
48
|
+
}
|
|
49
|
+
return overlay;
|
|
50
50
|
}
|
|
51
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
52
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
51
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToastController, deps: [{ token: ToastHelper }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
52
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToastController }); }
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToastController, decorators: [{
|
|
55
55
|
type: Injectable
|
|
56
56
|
}], ctorParameters: () => [{ type: ToastHelper }] });
|
|
57
57
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-toast.mjs","sources":["../../toast/src/services/toast.helper.ts","../../toast/src/services/toast.controller.ts","../../toast/src/kirbydesign-designsystem-toast.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { ToastController } from '@ionic/angular/standalone';\nimport { Overlay } from '@kirbydesign/designsystem/modal';\n\nimport { MessageType, ToastConfig } from '../config/toast-config';\n\n@Injectable()\nexport class ToastHelper {\n static CSS_CLASS = 'kirby-toast';\n static DURATION_IN_MS = 4000;\n\n constructor(private toastController: ToastController) {}\n\n public async showToast(config: ToastConfig): Promise<Overlay> {\n const toast = await this.toastController.create({\n animated: config.animated,\n message: config.message,\n position: 'top',\n duration: config.durationInMs
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-toast.mjs","sources":["../../toast/src/services/toast.helper.ts","../../toast/src/services/toast.controller.ts","../../toast/src/kirbydesign-designsystem-toast.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { ToastController } from '@ionic/angular/standalone';\nimport { Overlay } from '@kirbydesign/designsystem/modal';\n\nimport { MessageType, ToastConfig } from '../config/toast-config';\n\n@Injectable()\nexport class ToastHelper {\n static CSS_CLASS = 'kirby-toast';\n static DURATION_IN_MS = 4000;\n\n constructor(private toastController: ToastController) {}\n\n public async showToast(config: ToastConfig): Promise<Overlay> {\n const toast = await this.toastController.create({\n animated: config.animated,\n message: config.message,\n position: 'top',\n duration: config.durationInMs ?? ToastHelper.DURATION_IN_MS,\n cssClass: this.getCssClass(config.messageType),\n });\n await toast.present();\n return {\n dismiss: toast.dismiss.bind(toast),\n onWillDismiss: toast.onWillDismiss(),\n onDidDismiss: toast.onDidDismiss(),\n };\n }\n\n private getCssClass(messageType: MessageType): string {\n let cssClass = ToastHelper.CSS_CLASS;\n\n if (messageType) {\n cssClass += ' ' + messageType;\n }\n\n return cssClass;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Overlay } from '@kirbydesign/designsystem/modal';\n\nimport { ToastConfig } from '../config/toast-config';\n\nimport { ToastHelper } from './toast.helper';\n\n@Injectable()\nexport class ToastController {\n constructor(private toastHelper: ToastHelper) {}\n\n public async showToast(config: ToastConfig, onCloseToast?: () => void): Promise<Overlay> {\n const overlay = await this.toastHelper.showToast(config);\n if (onCloseToast) {\n overlay.onDidDismiss.then(() => onCloseToast());\n }\n return overlay;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.ToastHelper"],"mappings":";;;;MAOa,WAAW,CAAA;aACf,IAAA,CAAA,SAAS,GAAG,aAAH,CAAiB;aAC1B,IAAA,CAAA,cAAc,GAAG,IAAH,CAAQ;AAE7B,IAAA,WAAA,CAAoB,eAAgC,EAAA;QAAhC,IAAA,CAAA,eAAe,GAAf,eAAe;IAAoB;IAEhD,MAAM,SAAS,CAAC,MAAmB,EAAA;QACxC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;YAC9C,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO;AACvB,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,QAAQ,EAAE,MAAM,CAAC,YAAY,IAAI,WAAW,CAAC,cAAc;YAC3D,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC;AAC/C,SAAA,CAAC;AACF,QAAA,MAAM,KAAK,CAAC,OAAO,EAAE;QACrB,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AAClC,YAAA,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;AACpC,YAAA,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE;SACnC;IACH;AAEQ,IAAA,WAAW,CAAC,WAAwB,EAAA;AAC1C,QAAA,IAAI,QAAQ,GAAG,WAAW,CAAC,SAAS;QAEpC,IAAI,WAAW,EAAE;AACf,YAAA,QAAQ,IAAI,GAAG,GAAG,WAAW;QAC/B;AAEA,QAAA,OAAO,QAAQ;IACjB;iIA9BW,WAAW,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,eAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;qIAAX,WAAW,EAAA,CAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB;;;MCEY,eAAe,CAAA;AAC1B,IAAA,WAAA,CAAoB,WAAwB,EAAA;QAAxB,IAAA,CAAA,WAAW,GAAX,WAAW;IAAgB;AAExC,IAAA,MAAM,SAAS,CAAC,MAAmB,EAAE,YAAyB,EAAA;QACnE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC;QACxD,IAAI,YAAY,EAAE;YAChB,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,YAAY,EAAE,CAAC;QACjD;AACA,QAAA,OAAO,OAAO;IAChB;iIATW,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;qIAAf,eAAe,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACPD;;AAEG;;;;"}
|
|
@@ -77,8 +77,8 @@ class ToggleButtonComponent {
|
|
|
77
77
|
?.toggleAttribute('disabled', isDisabled);
|
|
78
78
|
this.cdr.markForCheck();
|
|
79
79
|
}
|
|
80
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
81
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
80
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToggleButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
81
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: ToggleButtonComponent, isStandalone: true, selector: "kirby-toggle-button", inputs: { checked: "checked" }, outputs: { checkChanged: "checkChanged" }, host: { listeners: { "click": "onClick($event)", "focusout": "onFocusOut()" } }, providers: [
|
|
82
82
|
{
|
|
83
83
|
provide: NG_VALUE_ACCESSOR,
|
|
84
84
|
useExisting: forwardRef((() => ToggleButtonComponent)),
|
|
@@ -86,7 +86,7 @@ class ToggleButtonComponent {
|
|
|
86
86
|
},
|
|
87
87
|
], ngImport: i0, template: "@if (!checked) {\n <ng-content select=\"button[kirby-button][unchecked]\"></ng-content>\n}\n@if (checked) {\n <ng-content select=\"button[kirby-button][checked]\"></ng-content>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
88
88
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToggleButtonComponent, decorators: [{
|
|
90
90
|
type: Component,
|
|
91
91
|
args: [{ selector: 'kirby-toggle-button', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
92
92
|
{
|
|
@@ -108,11 +108,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
108
108
|
}] } });
|
|
109
109
|
|
|
110
110
|
class ToggleButtonModule {
|
|
111
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
112
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
113
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
111
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToggleButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
112
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: ToggleButtonModule, imports: [CommonModule, ToggleButtonComponent], exports: [ToggleButtonComponent] }); }
|
|
113
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToggleButtonModule, imports: [CommonModule] }); }
|
|
114
114
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToggleButtonModule, decorators: [{
|
|
116
116
|
type: NgModule,
|
|
117
117
|
args: [{
|
|
118
118
|
imports: [CommonModule, ToggleButtonComponent],
|
|
@@ -106,17 +106,17 @@ class ToggleComponent {
|
|
|
106
106
|
this.disabled = isDisabled;
|
|
107
107
|
this.cdr.markForCheck();
|
|
108
108
|
}
|
|
109
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
110
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
109
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToggleComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.IonicElementPartHelper }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
110
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: ToggleComponent, isStandalone: true, selector: "kirby-toggle", inputs: { checked: "checked", disabled: "disabled" }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "attr.disabled": "this._isDisabled", "class.has-hidden-label": "this._labelText" } }, providers: [
|
|
111
111
|
IonicElementPartHelper,
|
|
112
112
|
{
|
|
113
113
|
provide: NG_VALUE_ACCESSOR,
|
|
114
114
|
useExisting: forwardRef((() => ToggleComponent)),
|
|
115
115
|
multi: true,
|
|
116
116
|
},
|
|
117
|
-
], viewQueries: [{ propertyName: "ionToggleElement", first: true, predicate: IonToggle, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n", styles: [":host{display:inline-flex}:host:has(ion-toggle.in-item.toggle-justify-space-between){width:100%}:host.has-hidden-label:has(ion-toggle.in-item){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle{position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-toggle{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host[disabled]{color:var(--kirby-text-color-semi-dark)}:host[disabled] ion-toggle{--color: var(--kirby-medium);--color-checked: var(--kirby-medium);opacity:1}:host[disabled] ion-toggle::part(track){opacity:.3}@media(hover:hover)and (pointer:fine){ion-toggle{overflow:visible;contain:none}ion-toggle:focus-within::part(track){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}ion-toggle:focus-visible{outline:none}@media(hover:hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(119.28, 119.28, 119.28);--handle-background: rgb(244.8, 244.8, 244.8);--track-background-checked: rgb(45.030660793, 192.689339207, 114.1474889868);--handle-background-checked: rgb(244.8, 244.8, 244.8)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(107.92, 107.92, 107.92);--handle-background: rgb(234.6, 234.6, 234.6);--track-background-checked: rgb(40.7420264317, 174.3379735683, 103.2762995595);--handle-background-checked: rgb(234.6, 234.6, 234.6)}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04);--handle-height: 28px;--handle-width: 28px;--border-radius: 16px}ion-toggle::part(track){height:32px}ion-toggle ::part(label-text-wrapper){line-height:24px;white-space:pre-line}ion-toggle.in-item::part(label){align-items:center;padding-inline:0}ion-toggle.in-item::part(label),ion-toggle.in-item::part(label-text-wrapper){margin-block:0}ion-toggle.in-item.toggle-label-placement-start::part(label-text-wrapper){margin-inline:0 12px}ion-toggle.in-item.toggle-label-placement-end::part(label-text-wrapper){margin-inline:12px 0}ion-toggle.in-item.legacy-toggle{padding:0}:host-context(kirby-item){z-index:1}:host-context(kirby-item) ion-toggle{margin:0}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}\n"], dependencies: [{ kind: "component", type: IonToggle, selector: "ion-toggle", inputs: ["checked", "color", "disabled", "enableOnOffLabels", "errorText", "helperText", "justify", "labelPlacement", "mode", "name", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
117
|
+
], viewQueries: [{ propertyName: "ionToggleElement", first: true, predicate: IonToggle, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n", styles: [":host{display:inline-flex}:host:has(ion-toggle.in-item.toggle-justify-space-between){width:100%}:host.has-hidden-label:has(ion-toggle.in-item){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle{position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-toggle{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host[disabled]{color:var(--kirby-text-color-semi-dark)}:host[disabled] ion-toggle{--color: var(--kirby-medium);--color-checked: var(--kirby-medium);opacity:1}:host[disabled] ion-toggle::part(track){opacity:.3}@media(hover:hover)and (pointer:fine){ion-toggle{overflow:visible;contain:none}ion-toggle:focus-within::part(track):focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}ion-toggle:focus-visible:focus-within::part(track){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}ion-toggle:focus-visible{outline:none}@media(hover:hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(119.28, 119.28, 119.28);--handle-background: rgb(244.8, 244.8, 244.8);--track-background-checked: rgb(45.030660793, 192.689339207, 114.1474889868);--handle-background-checked: rgb(244.8, 244.8, 244.8)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(107.92, 107.92, 107.92);--handle-background: rgb(234.6, 234.6, 234.6);--track-background-checked: rgb(40.7420264317, 174.3379735683, 103.2762995595);--handle-background-checked: rgb(234.6, 234.6, 234.6)}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04);--handle-height: 28px;--handle-width: 28px;--border-radius: 16px}ion-toggle::part(track){height:32px}ion-toggle ::part(label-text-wrapper){line-height:24px;white-space:pre-line}ion-toggle.in-item::part(label){align-items:center;padding-inline:0}ion-toggle.in-item::part(label),ion-toggle.in-item::part(label-text-wrapper){margin-block:0}ion-toggle.in-item.toggle-label-placement-start::part(label-text-wrapper){margin-inline:0 12px}ion-toggle.in-item.toggle-label-placement-end::part(label-text-wrapper){margin-inline:12px 0}ion-toggle.in-item.legacy-toggle{padding:0}:host-context(kirby-item){z-index:1}:host-context(kirby-item) ion-toggle{margin:0}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}\n"], dependencies: [{ kind: "component", type: IonToggle, selector: "ion-toggle", inputs: ["checked", "color", "disabled", "enableOnOffLabels", "errorText", "helperText", "justify", "labelPlacement", "mode", "name", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ToggleComponent, decorators: [{
|
|
120
120
|
type: Component,
|
|
121
121
|
args: [{ imports: [IonToggle], selector: 'kirby-toggle', providers: [
|
|
122
122
|
IonicElementPartHelper,
|
|
@@ -125,7 +125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
125
125
|
useExisting: forwardRef((() => ToggleComponent)),
|
|
126
126
|
multi: true,
|
|
127
127
|
},
|
|
128
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n", styles: [":host{display:inline-flex}:host:has(ion-toggle.in-item.toggle-justify-space-between){width:100%}:host.has-hidden-label:has(ion-toggle.in-item){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle{position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-toggle{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host[disabled]{color:var(--kirby-text-color-semi-dark)}:host[disabled] ion-toggle{--color: var(--kirby-medium);--color-checked: var(--kirby-medium);opacity:1}:host[disabled] ion-toggle::part(track){opacity:.3}@media(hover:hover)and (pointer:fine){ion-toggle{overflow:visible;contain:none}ion-toggle:focus-within::part(track){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}ion-toggle:focus-visible{outline:none}@media(hover:hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(119.28, 119.28, 119.28);--handle-background: rgb(244.8, 244.8, 244.8);--track-background-checked: rgb(45.030660793, 192.689339207, 114.1474889868);--handle-background-checked: rgb(244.8, 244.8, 244.8)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(107.92, 107.92, 107.92);--handle-background: rgb(234.6, 234.6, 234.6);--track-background-checked: rgb(40.7420264317, 174.3379735683, 103.2762995595);--handle-background-checked: rgb(234.6, 234.6, 234.6)}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04);--handle-height: 28px;--handle-width: 28px;--border-radius: 16px}ion-toggle::part(track){height:32px}ion-toggle ::part(label-text-wrapper){line-height:24px;white-space:pre-line}ion-toggle.in-item::part(label){align-items:center;padding-inline:0}ion-toggle.in-item::part(label),ion-toggle.in-item::part(label-text-wrapper){margin-block:0}ion-toggle.in-item.toggle-label-placement-start::part(label-text-wrapper){margin-inline:0 12px}ion-toggle.in-item.toggle-label-placement-end::part(label-text-wrapper){margin-inline:12px 0}ion-toggle.in-item.legacy-toggle{padding:0}:host-context(kirby-item){z-index:1}:host-context(kirby-item) ion-toggle{margin:0}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}\n"] }]
|
|
128
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n", styles: [":host{display:inline-flex}:host:has(ion-toggle.in-item.toggle-justify-space-between){width:100%}:host.has-hidden-label:has(ion-toggle.in-item){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle{position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-toggle{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host[disabled]{color:var(--kirby-text-color-semi-dark)}:host[disabled] ion-toggle{--color: var(--kirby-medium);--color-checked: var(--kirby-medium);opacity:1}:host[disabled] ion-toggle::part(track){opacity:.3}@media(hover:hover)and (pointer:fine){ion-toggle{overflow:visible;contain:none}ion-toggle:focus-within::part(track):focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}ion-toggle:focus-visible:focus-within::part(track){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}ion-toggle:focus-visible{outline:none}@media(hover:hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(119.28, 119.28, 119.28);--handle-background: rgb(244.8, 244.8, 244.8);--track-background-checked: rgb(45.030660793, 192.689339207, 114.1474889868);--handle-background-checked: rgb(244.8, 244.8, 244.8)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(107.92, 107.92, 107.92);--handle-background: rgb(234.6, 234.6, 234.6);--track-background-checked: rgb(40.7420264317, 174.3379735683, 103.2762995595);--handle-background-checked: rgb(234.6, 234.6, 234.6)}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04);--handle-height: 28px;--handle-width: 28px;--border-radius: 16px}ion-toggle::part(track){height:32px}ion-toggle ::part(label-text-wrapper){line-height:24px;white-space:pre-line}ion-toggle.in-item::part(label){align-items:center;padding-inline:0}ion-toggle.in-item::part(label),ion-toggle.in-item::part(label-text-wrapper){margin-block:0}ion-toggle.in-item.toggle-label-placement-start::part(label-text-wrapper){margin-inline:0 12px}ion-toggle.in-item.toggle-label-placement-end::part(label-text-wrapper){margin-inline:12px 0}ion-toggle.in-item.legacy-toggle{padding:0}:host-context(kirby-item){z-index:1}:host-context(kirby-item) ion-toggle{margin:0}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}\n"] }]
|
|
129
129
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.IonicElementPartHelper }], propDecorators: { ionToggleElement: [{
|
|
130
130
|
type: ViewChild,
|
|
131
131
|
args: [IonToggle, { read: ElementRef, static: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-toggle.mjs","sources":["../../toggle/src/toggle.component.ts","../../toggle/src/toggle.component.html","../../toggle/src/kirbydesign-designsystem-toggle.ts"],"sourcesContent":["import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IonToggle } from '@ionic/angular/standalone';\nimport { inheritAriaLabelText, setAccessibleLabel } from '@kirbydesign/designsystem/shared';\nimport { IonicElementPartHelper } from '@kirbydesign/designsystem/helpers';\n\n@Component({\n imports: [IonToggle],\n selector: 'kirby-toggle',\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.component.scss'],\n providers: [\n IonicElementPartHelper,\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToggleComponent\n implements ControlValueAccessor, OnInit, AfterViewInit, AfterContentInit\n{\n @ViewChild(IonToggle, { read: ElementRef, static: true })\n private ionToggleElement?: ElementRef<HTMLIonToggleElement>;\n\n @Input() checked: boolean = false;\n\n @Input() disabled: boolean = false;\n @HostBinding('attr.disabled')\n get _isDisabled() {\n return this.disabled ? 'disabled' : null;\n }\n\n @HostBinding('class.has-hidden-label') _labelText: string;\n\n @Output() checkedChange = new EventEmitter<boolean>();\n\n _justify: 'start' | 'end' | 'space-between' = 'start';\n _labelPlacement: 'end' | 'fixed' | 'stacked' | 'start' = 'start';\n _hasSlottedContent: boolean;\n _pressed = false;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private elementRef: ElementRef<HTMLElement>,\n private ionicElementPartHelper: IonicElementPartHelper\n ) {}\n\n ngOnInit(): void {\n /**\n * We cannot query ion-toggle for slotted content at this point as the slot has not been rendered.\n * But we need to know if content is slotted to set justify and labelPlacement BEFORE ion-toggle is rendered.\n * So it has to be done by querying an additional wrapper around the default content slot like this.\n */\n this._hasSlottedContent = this.elementRef.nativeElement\n .querySelector('.default-content')\n .hasChildNodes();\n\n const slot = this.elementRef.nativeElement.getAttribute('slot');\n if (slot === 'end' && this._hasSlottedContent) {\n this._justify = 'space-between';\n }\n\n if (slot === 'start' && this._hasSlottedContent) {\n this._labelPlacement = 'end';\n }\n }\n\n ngAfterViewInit(): void {\n this.ionicElementPartHelper.setPart('label', this.ionToggleElement, '.toggle-wrapper');\n this.ionicElementPartHelper.setPart(\n 'label-text-wrapper',\n this.ionToggleElement,\n '.label-text-wrapper'\n );\n }\n\n ngAfterContentInit(): void {\n this._labelText = inheritAriaLabelText(this.elementRef.nativeElement);\n\n if (!this._labelText && !this._hasSlottedContent) {\n // if no label has been set try to find a label in an item and use its text content\n this._labelText = setAccessibleLabel(this.elementRef.nativeElement);\n }\n }\n\n onCheckedChange(checked: boolean): void {\n this.checked = checked;\n this._onChange(this.checked);\n this.checkedChange.emit(this.checked);\n }\n\n _onActive() {\n this._pressed = true;\n }\n\n _onInactive() {\n this._pressed = false;\n this._onTouched();\n }\n\n // Initialize default ControlValueAccessor callback functions (noop)\n // eslint-disable-next-line no-empty-function\n private _onChange: (value: boolean) => void = () => {};\n // eslint-disable-next-line no-empty-function\n private _onTouched = () => {};\n\n /**\n * Sets the toggle's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value: boolean): void {\n this.checked = value;\n this.cdr.markForCheck();\n }\n /**\n * Saves a callback function to be invoked when the toggle's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n /**\n * Saves a callback function to be invoked when the toggle is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n /**\n * Disables the toggle. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n}\n","<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAmCa,eAAe,CAAA;AAS1B,IAAA,IACI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,IAAI;IAC1C;AAWA,IAAA,WAAA,CACU,GAAsB,EACtB,UAAmC,EACnC,sBAA8C,EAAA;QAF9C,IAAA,CAAA,GAAG,GAAH,GAAG;QACH,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,CAAA,sBAAsB,GAAtB,sBAAsB;QApBvB,IAAA,CAAA,OAAO,GAAY,KAAK;QAExB,IAAA,CAAA,QAAQ,GAAY,KAAK;AAQxB,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAW;QAErD,IAAA,CAAA,QAAQ,GAAsC,OAAO;QACrD,IAAA,CAAA,eAAe,GAA0C,OAAO;QAEhE,IAAA,CAAA,QAAQ,GAAG,KAAK;;;AA+DR,QAAA,IAAA,CAAA,SAAS,GAA6B,MAAK,EAAE,CAAC;;AAE9C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAK,EAAE,CAAC;IA3D1B;IAEH,QAAQ,GAAA;AACN;;;;AAIG;AACH,QAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,UAAU,CAAC;aACvC,aAAa,CAAC,kBAAkB;AAChC,aAAA,aAAa,EAAE;AAElB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,MAAM,CAAC;QAC/D,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,kBAAkB,EAAE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AA,IAAA,EAAA,SAAA,EAMU,SAAS,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EAAU,UAAU,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECtC1C,4jBAkBA,
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-toggle.mjs","sources":["../../toggle/src/toggle.component.ts","../../toggle/src/toggle.component.html","../../toggle/src/kirbydesign-designsystem-toggle.ts"],"sourcesContent":["import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IonToggle } from '@ionic/angular/standalone';\nimport { inheritAriaLabelText, setAccessibleLabel } from '@kirbydesign/designsystem/shared';\nimport { IonicElementPartHelper } from '@kirbydesign/designsystem/helpers';\n\n@Component({\n imports: [IonToggle],\n selector: 'kirby-toggle',\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.component.scss'],\n providers: [\n IonicElementPartHelper,\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToggleComponent\n implements ControlValueAccessor, OnInit, AfterViewInit, AfterContentInit\n{\n @ViewChild(IonToggle, { read: ElementRef, static: true })\n private ionToggleElement?: ElementRef<HTMLIonToggleElement>;\n\n @Input() checked: boolean = false;\n\n @Input() disabled: boolean = false;\n @HostBinding('attr.disabled')\n get _isDisabled() {\n return this.disabled ? 'disabled' : null;\n }\n\n @HostBinding('class.has-hidden-label') _labelText: string;\n\n @Output() checkedChange = new EventEmitter<boolean>();\n\n _justify: 'start' | 'end' | 'space-between' = 'start';\n _labelPlacement: 'end' | 'fixed' | 'stacked' | 'start' = 'start';\n _hasSlottedContent: boolean;\n _pressed = false;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private elementRef: ElementRef<HTMLElement>,\n private ionicElementPartHelper: IonicElementPartHelper\n ) {}\n\n ngOnInit(): void {\n /**\n * We cannot query ion-toggle for slotted content at this point as the slot has not been rendered.\n * But we need to know if content is slotted to set justify and labelPlacement BEFORE ion-toggle is rendered.\n * So it has to be done by querying an additional wrapper around the default content slot like this.\n */\n this._hasSlottedContent = this.elementRef.nativeElement\n .querySelector('.default-content')\n .hasChildNodes();\n\n const slot = this.elementRef.nativeElement.getAttribute('slot');\n if (slot === 'end' && this._hasSlottedContent) {\n this._justify = 'space-between';\n }\n\n if (slot === 'start' && this._hasSlottedContent) {\n this._labelPlacement = 'end';\n }\n }\n\n ngAfterViewInit(): void {\n this.ionicElementPartHelper.setPart('label', this.ionToggleElement, '.toggle-wrapper');\n this.ionicElementPartHelper.setPart(\n 'label-text-wrapper',\n this.ionToggleElement,\n '.label-text-wrapper'\n );\n }\n\n ngAfterContentInit(): void {\n this._labelText = inheritAriaLabelText(this.elementRef.nativeElement);\n\n if (!this._labelText && !this._hasSlottedContent) {\n // if no label has been set try to find a label in an item and use its text content\n this._labelText = setAccessibleLabel(this.elementRef.nativeElement);\n }\n }\n\n onCheckedChange(checked: boolean): void {\n this.checked = checked;\n this._onChange(this.checked);\n this.checkedChange.emit(this.checked);\n }\n\n _onActive() {\n this._pressed = true;\n }\n\n _onInactive() {\n this._pressed = false;\n this._onTouched();\n }\n\n // Initialize default ControlValueAccessor callback functions (noop)\n // eslint-disable-next-line no-empty-function\n private _onChange: (value: boolean) => void = () => {};\n // eslint-disable-next-line no-empty-function\n private _onTouched = () => {};\n\n /**\n * Sets the toggle's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value: boolean): void {\n this.checked = value;\n this.cdr.markForCheck();\n }\n /**\n * Saves a callback function to be invoked when the toggle's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n /**\n * Saves a callback function to be invoked when the toggle is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n /**\n * Disables the toggle. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n}\n","<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAmCa,eAAe,CAAA;AAS1B,IAAA,IACI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,IAAI;IAC1C;AAWA,IAAA,WAAA,CACU,GAAsB,EACtB,UAAmC,EACnC,sBAA8C,EAAA;QAF9C,IAAA,CAAA,GAAG,GAAH,GAAG;QACH,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,CAAA,sBAAsB,GAAtB,sBAAsB;QApBvB,IAAA,CAAA,OAAO,GAAY,KAAK;QAExB,IAAA,CAAA,QAAQ,GAAY,KAAK;AAQxB,QAAA,IAAA,CAAA,aAAa,G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B,4BAAA,WAAW,EAAE,UAAU,EAAC,qBAAqB,EAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4jBAAA,EAAA,MAAA,EAAA,CAAA,i1FAAA,CAAA,EAAA;;sBAK9C,SAAS;uBAAC,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAGvD;;sBAEA;;sBACA,WAAW;uBAAC,eAAe;;sBAK3B,WAAW;uBAAC,wBAAwB;;sBAEpC;;;AEnDH;;AAEG;;;;"}
|
|
@@ -5,10 +5,10 @@ class WindowRef {
|
|
|
5
5
|
get nativeWindow() {
|
|
6
6
|
return window;
|
|
7
7
|
}
|
|
8
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
9
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
8
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: WindowRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: WindowRef, providedIn: 'root' }); }
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: WindowRef, decorators: [{
|
|
12
12
|
type: Injectable,
|
|
13
13
|
args: [{
|
|
14
14
|
providedIn: 'root',
|
|
@@ -267,16 +267,16 @@ class SegmentedControlComponent {
|
|
|
267
267
|
this.isDisabled = isDisabled;
|
|
268
268
|
this.cdr.markForCheck();
|
|
269
269
|
}
|
|
270
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
271
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
270
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: SegmentedControlComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
271
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: SegmentedControlComponent, isStandalone: true, selector: "kirby-segmented-control", inputs: { mode: "mode", items: "items", selectedIndex: "selectedIndex", value: "value", size: "size", disableChangeOnSwipe: "disableChangeOnSwipe" }, outputs: { selectedIndexChange: "selectedIndexChange", segmentSelect: "segmentSelect" }, host: { listeners: { "focusin": "_onFocusInOut()", "focusout": "_onFocusInOut()" }, properties: { "class": "this._modeCssClass", "class.sm": "this.isSmallSize" } }, providers: [
|
|
272
272
|
{
|
|
273
273
|
provide: NG_VALUE_ACCESSOR,
|
|
274
274
|
useExisting: forwardRef((() => SegmentedControlComponent)),
|
|
275
275
|
multi: true,
|
|
276
276
|
},
|
|
277
|
-
], viewQueries: [{ propertyName: "ionSegmentElement", first: true, predicate: IonSegment, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<ion-segment\n [value]=\"value?.id\"\n [scrollable]=\"disableChangeOnSwipe || mode !== 'default'\"\n (ionChange)=\"onSegmentSelect($event.detail.value)\"\n (click)=\"preventOutsideClick($event)\"\n [disabled]=\"isDisabled\"\n>\n @for (item of items; track item.id; let i = $index) {\n <ion-segment-button\n [value]=\"item.id\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n @if (item.badge) {\n <kirby-badge\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n @if (item.badge.icon) {\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n } @else {\n {{ item.badge.content }}\n }\n </kirby-badge>\n }\n </ion-segment-button>\n }\n</ion-segment>\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none;--kirby-badge-position: absolute;--kirby-badge-top: -8px;--kirby-badge-right: -16px;--kirby-badge-z-index: 2}:host.sm ion-segment-button{min-height:32px;font-size:12px;--padding-start: 16px;--padding-end: 16px;--kirby-badge-right: -8px}@media(hover:hover)and (pointer:fine){:host.sm ion-segment-button{outline:none;border-radius:999px}:host.sm ion-segment-button:focus{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host.sm ion-segment-button:focus:not(:focus-visible){box-shadow:0 0 0 0 transparent}:host.sm ion-segment-button:focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}:host.default-mode ion-segment{--background: var(--kirby-inputs-background-color);box-shadow:var(--kirby-inputs-elevation);overflow:visible;contain:none;width:fit-content}:host.default-mode ion-segment-button{--color-hover: rgba(var(--kirby-black-rgb), .4)}:host.chip-mode ion-segment{--background: none;border-radius:0;padding:4px;gap:8px}@media(pointer:coarse){:host.chip-mode ion-segment{scrollbar-width:none}:host.chip-mode ion-segment::-webkit-scrollbar{display:none}}:host.chip-mode ion-segment-button{--background: var(--kirby-inputs-background-color);--indicator-transition: none}:host.chip-mode ion-segment-button::part(indicator){padding-inline:0}:host.compact ion-segment{--background: transparent}:host.compact ion-segment-button{--background: transparent;--padding-start: 12px;--padding-end: 12px}@media(hover:hover){:host.chip-mode ion-segment-button:hover,:host.compact ion-segment-button:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--background-hover: var(--state-layer-background-color);--background-hover-opacity: var(--state-layer-opacity)}}@media(hover:hover){:host.chip-mode ion-segment-button.segment-button-checked:hover,:host.compact ion-segment-button.segment-button-checked:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);--background-hover: var(--state-layer-background-color);--background-hover-opacity: var(--state-layer-opacity)}}ion-segment{border-radius:999px;grid-auto-columns:max-content;box-sizing:border-box}@media(hover:hover)and (pointer:fine){ion-segment-button:focus-within::part(native){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}ion-segment-button{position:relative}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%}ion-segment-button{--border-radius: 999px;--border-style: none;--background: none;--color: var(--kirby-inputs-color);--indicator-color: var(--kirby-inputs-indicator-background-color);--color-checked: var(--kirby-inputs-indicator-color);--indicator-box-shadow: none;--indicator-transform: none;--padding-start: 24px;--padding-end: 24px;--margin-bottom: 0;--margin-end: 0;--margin-start: 0;--margin-top: 0;min-height:40px;min-width:fit-content;font-weight:400;font-size:14px;text-transform:none;margin:0}ion-segment-button::part(native){border-radius:var(--border-radius);contain:none;overflow:visible;opacity:1}ion-segment-button::part(native):after{transition:all 80ms linear 0ms;border-radius:var(--border-radius)}ion-segment-button::part(indicator){padding-inline:0}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "kirby-icon", inputs: ["size", "name"] }, { kind: "component", type: BadgeComponent, selector: "kirby-badge", inputs: ["text", "size"] }, { kind: "component", type: IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: IonSegmentButton, selector: "ion-segment-button", inputs: ["contentId", "disabled", "layout", "mode", "type", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
277
|
+
], viewQueries: [{ propertyName: "ionSegmentElement", first: true, predicate: IonSegment, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<ion-segment\n [value]=\"value?.id\"\n [scrollable]=\"disableChangeOnSwipe || mode !== 'default'\"\n (ionChange)=\"onSegmentSelect($event.detail.value)\"\n (click)=\"preventOutsideClick($event)\"\n [disabled]=\"isDisabled\"\n>\n @for (item of items; track item.id; let i = $index) {\n <ion-segment-button\n [value]=\"item.id\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n @if (item.badge) {\n <kirby-badge\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n @if (item.badge.icon) {\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n } @else {\n {{ item.badge.content }}\n }\n </kirby-badge>\n }\n </ion-segment-button>\n }\n</ion-segment>\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none;--kirby-badge-position: absolute;--kirby-badge-top: -8px;--kirby-badge-right: -16px;--kirby-badge-z-index: 2}:host.sm ion-segment-button{min-height:32px;font-size:12px;--padding-start: 16px;--padding-end: 16px;--kirby-badge-right: -8px}@media(hover:hover)and (pointer:fine){:host.sm ion-segment-button{outline:none;border-radius:999px}:host.sm ion-segment-button:focus{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host.sm ion-segment-button:focus:not(:focus-visible){box-shadow:0 0 0 0 transparent}:host.sm ion-segment-button:focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}:host.default-mode ion-segment{--background: var(--kirby-inputs-background-color);box-shadow:var(--kirby-inputs-elevation);overflow:visible;contain:none;width:fit-content}:host.default-mode ion-segment-button{--color-hover: rgba(var(--kirby-black-rgb), .4)}:host.chip-mode ion-segment{--background: none;border-radius:0;padding:4px;gap:8px}@media(pointer:coarse){:host.chip-mode ion-segment{scrollbar-width:none}:host.chip-mode ion-segment::-webkit-scrollbar{display:none}}:host.chip-mode ion-segment-button{--background: var(--kirby-inputs-background-color);--indicator-transition: none}:host.chip-mode ion-segment-button::part(indicator){padding-inline:0}:host.compact ion-segment{--background: transparent}:host.compact ion-segment-button{--background: transparent;--padding-start: 12px;--padding-end: 12px}@media(hover:hover){:host.chip-mode ion-segment-button:hover,:host.compact ion-segment-button:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--background-hover: var(--state-layer-background-color);--background-hover-opacity: var(--state-layer-opacity)}}@media(hover:hover){:host.chip-mode ion-segment-button.segment-button-checked:hover,:host.compact ion-segment-button.segment-button-checked:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);--background-hover: var(--state-layer-background-color);--background-hover-opacity: var(--state-layer-opacity)}}ion-segment{border-radius:999px;grid-auto-columns:max-content;box-sizing:border-box}@media(hover:hover)and (pointer:fine){ion-segment-button:focus-within::part(native):focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}ion-segment-button:focus-visible:focus-within::part(native){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}ion-segment-button{position:relative}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%}ion-segment-button{--border-radius: 999px;--border-style: none;--background: none;--color: var(--kirby-inputs-color);--indicator-color: var(--kirby-inputs-indicator-background-color);--color-checked: var(--kirby-inputs-indicator-color);--indicator-box-shadow: none;--indicator-transform: none;--padding-start: 24px;--padding-end: 24px;--margin-bottom: 0;--margin-end: 0;--margin-start: 0;--margin-top: 0;min-height:40px;min-width:fit-content;font-weight:400;font-size:14px;text-transform:none;margin:0}ion-segment-button::part(native){border-radius:var(--border-radius);contain:none;overflow:visible;opacity:1}ion-segment-button::part(native):after{transition:all 80ms linear 0ms;border-radius:var(--border-radius)}ion-segment-button::part(indicator){padding-inline:0}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "kirby-icon", inputs: ["size", "name"] }, { kind: "component", type: BadgeComponent, selector: "kirby-badge", inputs: ["text", "size"] }, { kind: "component", type: IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: IonSegmentButton, selector: "ion-segment-button", inputs: ["contentId", "disabled", "layout", "mode", "type", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
278
278
|
}
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: SegmentedControlComponent, decorators: [{
|
|
280
280
|
type: Component,
|
|
281
281
|
args: [{ imports: [IconComponent, BadgeComponent, IonSegment, IonSegmentButton], selector: 'kirby-segmented-control', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
282
282
|
{
|
|
@@ -284,7 +284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
284
284
|
useExisting: forwardRef((() => SegmentedControlComponent)),
|
|
285
285
|
multi: true,
|
|
286
286
|
},
|
|
287
|
-
], template: "<ion-segment\n [value]=\"value?.id\"\n [scrollable]=\"disableChangeOnSwipe || mode !== 'default'\"\n (ionChange)=\"onSegmentSelect($event.detail.value)\"\n (click)=\"preventOutsideClick($event)\"\n [disabled]=\"isDisabled\"\n>\n @for (item of items; track item.id; let i = $index) {\n <ion-segment-button\n [value]=\"item.id\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n @if (item.badge) {\n <kirby-badge\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n @if (item.badge.icon) {\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n } @else {\n {{ item.badge.content }}\n }\n </kirby-badge>\n }\n </ion-segment-button>\n }\n</ion-segment>\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none;--kirby-badge-position: absolute;--kirby-badge-top: -8px;--kirby-badge-right: -16px;--kirby-badge-z-index: 2}:host.sm ion-segment-button{min-height:32px;font-size:12px;--padding-start: 16px;--padding-end: 16px;--kirby-badge-right: -8px}@media(hover:hover)and (pointer:fine){:host.sm ion-segment-button{outline:none;border-radius:999px}:host.sm ion-segment-button:focus{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host.sm ion-segment-button:focus:not(:focus-visible){box-shadow:0 0 0 0 transparent}:host.sm ion-segment-button:focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}:host.default-mode ion-segment{--background: var(--kirby-inputs-background-color);box-shadow:var(--kirby-inputs-elevation);overflow:visible;contain:none;width:fit-content}:host.default-mode ion-segment-button{--color-hover: rgba(var(--kirby-black-rgb), .4)}:host.chip-mode ion-segment{--background: none;border-radius:0;padding:4px;gap:8px}@media(pointer:coarse){:host.chip-mode ion-segment{scrollbar-width:none}:host.chip-mode ion-segment::-webkit-scrollbar{display:none}}:host.chip-mode ion-segment-button{--background: var(--kirby-inputs-background-color);--indicator-transition: none}:host.chip-mode ion-segment-button::part(indicator){padding-inline:0}:host.compact ion-segment{--background: transparent}:host.compact ion-segment-button{--background: transparent;--padding-start: 12px;--padding-end: 12px}@media(hover:hover){:host.chip-mode ion-segment-button:hover,:host.compact ion-segment-button:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--background-hover: var(--state-layer-background-color);--background-hover-opacity: var(--state-layer-opacity)}}@media(hover:hover){:host.chip-mode ion-segment-button.segment-button-checked:hover,:host.compact ion-segment-button.segment-button-checked:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);--background-hover: var(--state-layer-background-color);--background-hover-opacity: var(--state-layer-opacity)}}ion-segment{border-radius:999px;grid-auto-columns:max-content;box-sizing:border-box}@media(hover:hover)and (pointer:fine){ion-segment-button:focus-within::part(native){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}ion-segment-button{position:relative}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%}ion-segment-button{--border-radius: 999px;--border-style: none;--background: none;--color: var(--kirby-inputs-color);--indicator-color: var(--kirby-inputs-indicator-background-color);--color-checked: var(--kirby-inputs-indicator-color);--indicator-box-shadow: none;--indicator-transform: none;--padding-start: 24px;--padding-end: 24px;--margin-bottom: 0;--margin-end: 0;--margin-start: 0;--margin-top: 0;min-height:40px;min-width:fit-content;font-weight:400;font-size:14px;text-transform:none;margin:0}ion-segment-button::part(native){border-radius:var(--border-radius);contain:none;overflow:visible;opacity:1}ion-segment-button::part(native):after{transition:all 80ms linear 0ms;border-radius:var(--border-radius)}ion-segment-button::part(indicator){padding-inline:0}\n"] }]
|
|
287
|
+
], template: "<ion-segment\n [value]=\"value?.id\"\n [scrollable]=\"disableChangeOnSwipe || mode !== 'default'\"\n (ionChange)=\"onSegmentSelect($event.detail.value)\"\n (click)=\"preventOutsideClick($event)\"\n [disabled]=\"isDisabled\"\n>\n @for (item of items; track item.id; let i = $index) {\n <ion-segment-button\n [value]=\"item.id\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n @if (item.badge) {\n <kirby-badge\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n @if (item.badge.icon) {\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n } @else {\n {{ item.badge.content }}\n }\n </kirby-badge>\n }\n </ion-segment-button>\n }\n</ion-segment>\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none;--kirby-badge-position: absolute;--kirby-badge-top: -8px;--kirby-badge-right: -16px;--kirby-badge-z-index: 2}:host.sm ion-segment-button{min-height:32px;font-size:12px;--padding-start: 16px;--padding-end: 16px;--kirby-badge-right: -8px}@media(hover:hover)and (pointer:fine){:host.sm ion-segment-button{outline:none;border-radius:999px}:host.sm ion-segment-button:focus{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host.sm ion-segment-button:focus:not(:focus-visible){box-shadow:0 0 0 0 transparent}:host.sm ion-segment-button:focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}:host.default-mode ion-segment{--background: var(--kirby-inputs-background-color);box-shadow:var(--kirby-inputs-elevation);overflow:visible;contain:none;width:fit-content}:host.default-mode ion-segment-button{--color-hover: rgba(var(--kirby-black-rgb), .4)}:host.chip-mode ion-segment{--background: none;border-radius:0;padding:4px;gap:8px}@media(pointer:coarse){:host.chip-mode ion-segment{scrollbar-width:none}:host.chip-mode ion-segment::-webkit-scrollbar{display:none}}:host.chip-mode ion-segment-button{--background: var(--kirby-inputs-background-color);--indicator-transition: none}:host.chip-mode ion-segment-button::part(indicator){padding-inline:0}:host.compact ion-segment{--background: transparent}:host.compact ion-segment-button{--background: transparent;--padding-start: 12px;--padding-end: 12px}@media(hover:hover){:host.chip-mode ion-segment-button:hover,:host.compact ion-segment-button:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--background-hover: var(--state-layer-background-color);--background-hover-opacity: var(--state-layer-opacity)}}@media(hover:hover){:host.chip-mode ion-segment-button.segment-button-checked:hover,:host.compact ion-segment-button.segment-button-checked:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);--background-hover: var(--state-layer-background-color);--background-hover-opacity: var(--state-layer-opacity)}}ion-segment{border-radius:999px;grid-auto-columns:max-content;box-sizing:border-box}@media(hover:hover)and (pointer:fine){ion-segment-button:focus-within::part(native):focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}ion-segment-button:focus-visible:focus-within::part(native){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}ion-segment-button{position:relative}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%}ion-segment-button{--border-radius: 999px;--border-style: none;--background: none;--color: var(--kirby-inputs-color);--indicator-color: var(--kirby-inputs-indicator-background-color);--color-checked: var(--kirby-inputs-indicator-color);--indicator-box-shadow: none;--indicator-transform: none;--padding-start: 24px;--padding-end: 24px;--margin-bottom: 0;--margin-end: 0;--margin-start: 0;--margin-top: 0;min-height:40px;min-width:fit-content;font-weight:400;font-size:14px;text-transform:none;margin:0}ion-segment-button::part(native){border-radius:var(--border-radius);contain:none;overflow:visible;opacity:1}ion-segment-button::part(native):after{transition:all 80ms linear 0ms;border-radius:var(--border-radius)}ion-segment-button::part(indicator){padding-inline:0}\n"] }]
|
|
288
288
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { ionSegmentElement: [{
|
|
289
289
|
type: ViewChild,
|
|
290
290
|
args: [IonSegment, { static: true, read: ElementRef }]
|
|
@@ -332,10 +332,10 @@ class KeyHandlerDirective {
|
|
|
332
332
|
hostElement.click();
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
336
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
335
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KeyHandlerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
336
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.4", type: KeyHandlerDirective, isStandalone: true, selector: "[keyHandler]", host: { listeners: { "keyup": "keyEvent($event)" } }, ngImport: i0 }); }
|
|
337
337
|
}
|
|
338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KeyHandlerDirective, decorators: [{
|
|
339
339
|
type: Directive,
|
|
340
340
|
args: [{
|
|
341
341
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -358,10 +358,10 @@ class ModalRouterLinkDirective {
|
|
|
358
358
|
this.modalNavigationService.navigateToModal(this.path, typeof this.queryParams !== 'string' ? this.queryParams : null);
|
|
359
359
|
return false;
|
|
360
360
|
}
|
|
361
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
362
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
361
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ModalRouterLinkDirective, deps: [{ token: i1.ModalNavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
362
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.4", type: ModalRouterLinkDirective, isStandalone: true, selector: "[kirbyModalRouterLink]", inputs: { path: ["kirbyModalRouterLink", "path"], queryParams: ["kirbyModalQueryParams", "queryParams"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
|
|
363
363
|
}
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ModalRouterLinkDirective, decorators: [{
|
|
365
365
|
type: Directive,
|
|
366
366
|
args: [{ selector: `[kirbyModalRouterLink]` }]
|
|
367
367
|
}], ctorParameters: () => [{ type: i1.ModalNavigationService }, { type: i0.ElementRef }], propDecorators: { path: [{
|
|
@@ -443,8 +443,8 @@ class KirbyModule {
|
|
|
443
443
|
constructor(modalController, config) {
|
|
444
444
|
modalController.initialize(config && config.moduleRootRoutePath);
|
|
445
445
|
}
|
|
446
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
447
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
446
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KirbyModule, deps: [{ token: i1.ModalController }, { token: KIRBY_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
447
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: KirbyModule, imports: [CommonModule, RouterModule, KirbyAppModule,
|
|
448
448
|
RouterOutletModule,
|
|
449
449
|
PageModule,
|
|
450
450
|
HeaderModule,
|
|
@@ -551,7 +551,7 @@ class KirbyModule {
|
|
|
551
551
|
BadgeComponent,
|
|
552
552
|
ModalComponent,
|
|
553
553
|
TableSortableComponent, ModalRouterLinkDirective] }); }
|
|
554
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
554
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KirbyModule, providers: [provideKirby()], imports: [CommonModule, RouterModule, KirbyAppModule,
|
|
555
555
|
RouterOutletModule,
|
|
556
556
|
PageModule,
|
|
557
557
|
HeaderModule,
|
|
@@ -622,7 +622,7 @@ class KirbyModule {
|
|
|
622
622
|
AccordionModule,
|
|
623
623
|
HeaderModule] }); }
|
|
624
624
|
}
|
|
625
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: KirbyModule, decorators: [{
|
|
626
626
|
type: NgModule,
|
|
627
627
|
args: [{
|
|
628
628
|
imports: [CommonModule, RouterModule, ...importedModules, imports],
|