@kirbydesign/designsystem 10.3.1 → 10.4.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.
Files changed (128) hide show
  1. package/README.md +7 -0
  2. package/calendar/calendar.component.d.ts.map +1 -1
  3. package/checkbox/checkbox.component.d.ts +5 -3
  4. package/checkbox/checkbox.component.d.ts.map +1 -1
  5. package/config/index.d.ts +6 -0
  6. package/config/kirbydesign-designsystem-config.d.ts.map +1 -0
  7. package/config/provide-kirby.d.ts +27 -0
  8. package/config/provide-kirby.d.ts.map +1 -0
  9. package/config/public_api.d.ts +2 -0
  10. package/config/public_api.d.ts.map +1 -0
  11. package/dropdown/dropdown.module.d.ts +2 -1
  12. package/dropdown/dropdown.module.d.ts.map +1 -1
  13. package/fesm2022/kirbydesign-designsystem-accordion.mjs +12 -12
  14. package/fesm2022/kirbydesign-designsystem-action-group.mjs +4 -4
  15. package/fesm2022/kirbydesign-designsystem-avatar.mjs +4 -4
  16. package/fesm2022/kirbydesign-designsystem-badge.mjs +4 -4
  17. package/fesm2022/kirbydesign-designsystem-button.mjs +4 -4
  18. package/fesm2022/kirbydesign-designsystem-calendar.mjs +8 -7
  19. package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
  20. package/fesm2022/kirbydesign-designsystem-card.mjs +18 -18
  21. package/fesm2022/kirbydesign-designsystem-card.mjs.map +1 -1
  22. package/fesm2022/kirbydesign-designsystem-chart.mjs +23 -23
  23. package/fesm2022/kirbydesign-designsystem-checkbox.mjs +13 -8
  24. package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
  25. package/fesm2022/kirbydesign-designsystem-config.mjs +37 -0
  26. package/fesm2022/kirbydesign-designsystem-config.mjs.map +1 -0
  27. package/fesm2022/kirbydesign-designsystem-data-table.mjs +8 -8
  28. package/fesm2022/kirbydesign-designsystem-divider.mjs +4 -4
  29. package/fesm2022/kirbydesign-designsystem-dropdown.mjs +18 -15
  30. package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
  31. package/fesm2022/kirbydesign-designsystem-empty-state.mjs +9 -9
  32. package/fesm2022/kirbydesign-designsystem-empty-state.mjs.map +1 -1
  33. package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs +5 -5
  34. package/fesm2022/kirbydesign-designsystem-flag.mjs +4 -4
  35. package/fesm2022/kirbydesign-designsystem-form-field.mjs +143 -70
  36. package/fesm2022/kirbydesign-designsystem-form-field.mjs.map +1 -1
  37. package/fesm2022/kirbydesign-designsystem-header.mjs +21 -21
  38. package/fesm2022/kirbydesign-designsystem-header.mjs.map +1 -1
  39. package/fesm2022/kirbydesign-designsystem-helpers.mjs +9 -9
  40. package/fesm2022/kirbydesign-designsystem-icon.mjs +11 -12
  41. package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
  42. package/fesm2022/kirbydesign-designsystem-item-group.mjs +4 -4
  43. package/fesm2022/kirbydesign-designsystem-item-sliding.mjs +4 -4
  44. package/fesm2022/kirbydesign-designsystem-item.mjs +11 -11
  45. package/fesm2022/kirbydesign-designsystem-kirby-app.mjs +8 -8
  46. package/fesm2022/kirbydesign-designsystem-list.mjs +41 -41
  47. package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs +7 -7
  48. package/fesm2022/kirbydesign-designsystem-menu.mjs +5 -5
  49. package/fesm2022/kirbydesign-designsystem-modal.mjs +45 -47
  50. package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
  51. package/fesm2022/kirbydesign-designsystem-page.mjs +86 -47
  52. package/fesm2022/kirbydesign-designsystem-page.mjs.map +1 -1
  53. package/fesm2022/kirbydesign-designsystem-popover.mjs +4 -4
  54. package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +7 -7
  55. package/fesm2022/kirbydesign-designsystem-radio.mjs +36 -18
  56. package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
  57. package/fesm2022/kirbydesign-designsystem-range.mjs +4 -4
  58. package/fesm2022/kirbydesign-designsystem-reorder-list.mjs +4 -4
  59. package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +8 -8
  60. package/fesm2022/kirbydesign-designsystem-section-header.mjs +4 -4
  61. package/fesm2022/kirbydesign-designsystem-shared-floating.mjs +4 -4
  62. package/fesm2022/kirbydesign-designsystem-shared-portal.mjs +4 -4
  63. package/fesm2022/kirbydesign-designsystem-shared.mjs +65 -23
  64. package/fesm2022/kirbydesign-designsystem-shared.mjs.map +1 -1
  65. package/fesm2022/kirbydesign-designsystem-slide-button.mjs +4 -4
  66. package/fesm2022/kirbydesign-designsystem-slide.mjs +14 -14
  67. package/fesm2022/kirbydesign-designsystem-spinner.mjs +8 -8
  68. package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs +11 -11
  69. package/fesm2022/kirbydesign-designsystem-tabs.mjs +14 -14
  70. package/fesm2022/kirbydesign-designsystem-testing-base.mjs +287 -287
  71. package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs +4 -4
  72. package/fesm2022/kirbydesign-designsystem-testing-jest.mjs +4 -4
  73. package/fesm2022/kirbydesign-designsystem-testing.mjs +4 -4
  74. package/fesm2022/kirbydesign-designsystem-toast.mjs +6 -6
  75. package/fesm2022/kirbydesign-designsystem-toggle-button.mjs +77 -9
  76. package/fesm2022/kirbydesign-designsystem-toggle-button.mjs.map +1 -1
  77. package/fesm2022/kirbydesign-designsystem-toggle.mjs +50 -19
  78. package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
  79. package/fesm2022/kirbydesign-designsystem-types.mjs +3 -3
  80. package/fesm2022/kirbydesign-designsystem.mjs +84 -26
  81. package/fesm2022/kirbydesign-designsystem.mjs.map +1 -1
  82. package/form-field/form-field.component.d.ts +21 -6
  83. package/form-field/form-field.component.d.ts.map +1 -1
  84. package/form-field/input/input.component.d.ts +11 -7
  85. package/form-field/input/input.component.d.ts.map +1 -1
  86. package/form-field/textarea/textarea.component.d.ts +8 -4
  87. package/form-field/textarea/textarea.component.d.ts.map +1 -1
  88. package/icon/kirby-icon-settings.d.ts.map +1 -1
  89. package/lib/components/segmented-control/segmented-control.component.d.ts +35 -1
  90. package/lib/components/segmented-control/segmented-control.component.d.ts.map +1 -1
  91. package/lib/index.d.ts +1 -1
  92. package/lib/index.d.ts.map +1 -1
  93. package/lib/kirby.module.d.ts +45 -48
  94. package/lib/kirby.module.d.ts.map +1 -1
  95. package/modal/modal/modal-component/modal.component.d.ts.map +1 -1
  96. package/package.json +40 -40
  97. package/page/page.component.d.ts +9 -2
  98. package/page/page.component.d.ts.map +1 -1
  99. package/radio/radio-group/radio-group.component.d.ts +13 -5
  100. package/radio/radio-group/radio-group.component.d.ts.map +1 -1
  101. package/readme.md +1 -1
  102. package/shared/controls/label-helpers.d.ts +13 -0
  103. package/shared/controls/label-helpers.d.ts.map +1 -1
  104. package/shared/fit-heading/fit-heading.directive.d.ts +1 -1
  105. package/shared/fit-heading/fit-heading.directive.d.ts.map +1 -1
  106. package/shared/translation/translation.interface.d.ts +1 -0
  107. package/shared/translation/translation.interface.d.ts.map +1 -1
  108. package/shared/translation/translation.service.d.ts.map +1 -1
  109. package/shared/translation/translations/da.d.ts.map +1 -1
  110. package/shared/translation/translations/de.d.ts +3 -0
  111. package/shared/translation/translations/de.d.ts.map +1 -0
  112. package/shared/translation/translations/en.d.ts.map +1 -1
  113. package/toggle/toggle.component.d.ts +13 -6
  114. package/toggle/toggle.component.d.ts.map +1 -1
  115. package/toggle-button/toggle-button.component.d.ts +35 -1
  116. package/toggle-button/toggle-button.component.d.ts.map +1 -1
  117. package/types/form-field-control.d.ts +6 -0
  118. package/types/form-field-control.d.ts.map +1 -0
  119. package/types/public_api.d.ts +1 -0
  120. package/types/public_api.d.ts.map +1 -1
  121. package/fesm2022/kirbydesign-designsystem-kirby-ionic-module.mjs +0 -30
  122. package/fesm2022/kirbydesign-designsystem-kirby-ionic-module.mjs.map +0 -1
  123. package/kirby-ionic-module/index.d.ts +0 -6
  124. package/kirby-ionic-module/kirby-ionic.module.d.ts +0 -7
  125. package/kirby-ionic-module/kirby-ionic.module.d.ts.map +0 -1
  126. package/kirby-ionic-module/kirbydesign-designsystem-kirby-ionic-module.d.ts.map +0 -1
  127. package/kirby-ionic-module/public_api.d.ts +0 -2
  128. package/kirby-ionic-module/public_api.d.ts.map +0 -1
@@ -1,9 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, ElementRef, Component, ChangeDetectionStrategy, ViewChild, Input, HostBinding, Output, HostListener, Directive, InjectionToken, NgModule, Optional, Inject } from '@angular/core';
2
+ import { EventEmitter, ElementRef, forwardRef, HostListener, Output, Input, HostBinding, ViewChild, ChangeDetectionStrategy, Component, Directive, Optional, Inject, NgModule } from '@angular/core';
3
3
  import * as i1 from '@kirbydesign/designsystem/icon';
4
4
  import { IconModule } from '@kirbydesign/designsystem/icon';
5
5
  export * from '@kirbydesign/designsystem/icon';
6
6
  import { BadgeComponent } from '@kirbydesign/designsystem/badge';
7
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
8
  import { IonSegment, IonSegmentButton } from '@ionic/angular/standalone';
8
9
  import * as i2 from '@angular/common';
9
10
  import { CommonModule } from '@angular/common';
@@ -22,6 +23,8 @@ import { CardModule } from '@kirbydesign/designsystem/card';
22
23
  export * from '@kirbydesign/designsystem/card';
23
24
  import { CheckboxComponent } from '@kirbydesign/designsystem/checkbox';
24
25
  export * from '@kirbydesign/designsystem/checkbox';
26
+ import { provideKirby, KIRBY_CONFIG } from '@kirbydesign/designsystem/config';
27
+ export * from '@kirbydesign/designsystem/config';
25
28
  import { TableSortableComponent } from '@kirbydesign/designsystem/data-table';
26
29
  export * from '@kirbydesign/designsystem/data-table';
27
30
  import { DividerComponent } from '@kirbydesign/designsystem/divider';
@@ -46,8 +49,6 @@ import { ItemSlidingComponent } from '@kirbydesign/designsystem/item-sliding';
46
49
  export * from '@kirbydesign/designsystem/item-sliding';
47
50
  import { KirbyAppModule } from '@kirbydesign/designsystem/kirby-app';
48
51
  export * from '@kirbydesign/designsystem/kirby-app';
49
- import { KirbyIonicModule } from '@kirbydesign/designsystem/kirby-ionic-module';
50
- export * from '@kirbydesign/designsystem/kirby-ionic-module';
51
52
  import { ListModule } from '@kirbydesign/designsystem/list';
52
53
  export * from '@kirbydesign/designsystem/list';
53
54
  import { LoadingOverlayComponent, LoadingOverlayService } from '@kirbydesign/designsystem/loading-overlay';
@@ -106,11 +107,17 @@ class SegmentedControlComponent {
106
107
  constructor() {
107
108
  this.mode = SegmentedControlMode.default;
108
109
  this._items = [];
110
+ this.isDisabled = false;
109
111
  this._selectedIndex = -1;
110
112
  this.selectedIndexChange = new EventEmitter();
111
113
  this._disableChangeOnSwipe = false;
112
114
  this.segmentSelect = new EventEmitter();
113
115
  this._segmentElementHasFocus = false;
116
+ // Initialize default ControlValueAccessor callback functions (noop)
117
+ // eslint-disable-next-line no-empty-function
118
+ this.onChange = () => { };
119
+ // eslint-disable-next-line no-empty-function
120
+ this.onTouched = () => { };
114
121
  }
115
122
  /**
116
123
  * Ensure that the click actually did originate from within the segment-button.
@@ -192,6 +199,8 @@ class SegmentedControlComponent {
192
199
  this.selectedIndex = selectedItemIndex;
193
200
  setTimeout(() => {
194
201
  this.segmentSelect.emit(this.value);
202
+ this.onChange(this.value);
203
+ this.onTouched();
195
204
  });
196
205
  }
197
206
  }
@@ -214,13 +223,68 @@ class SegmentedControlComponent {
214
223
  _onFocusInOut() {
215
224
  // @HostListener(focusin|focusout) triggers Change Detection and updates attr.tabindex on each ion-segment-button
216
225
  this._segmentElementHasFocus = this.ionSegmentElement.nativeElement.matches(':focus-within');
226
+ if (!this._segmentElementHasFocus) {
227
+ this.onTouched();
228
+ }
229
+ }
230
+ /**
231
+ * Sets the segmented control's value. Part of the ControlValueAccessor interface
232
+ * required to integrate with Angular's core forms API.
233
+ *
234
+ * @param value New value to be written to the model.
235
+ */
236
+ writeValue(value) {
237
+ if (value !== this._value) {
238
+ this.value = value;
239
+ }
240
+ }
241
+ /**
242
+ * Saves a callback function to be invoked when the segmented control's value
243
+ * changes from user input. Part of the ControlValueAccessor interface
244
+ * required to integrate with Angular's core forms API.
245
+ *
246
+ * @param fn Callback to be triggered when the value changes.
247
+ */
248
+ registerOnChange(fn) {
249
+ this.onChange = fn;
250
+ }
251
+ /**
252
+ * Saves a callback function to be invoked when the segmented control is blurred
253
+ * by the user. Part of the ControlValueAccessor interface required
254
+ * to integrate with Angular's core forms API.
255
+ *
256
+ * @param fn Callback to be triggered when the component has been touched.
257
+ */
258
+ registerOnTouched(fn) {
259
+ this.onTouched = fn;
260
+ }
261
+ /**
262
+ * Disables the segmented control. Part of the ControlValueAccessor interface required
263
+ * to integrate with Angular's core forms API.
264
+ *
265
+ * @param isDisabled Sets whether the component is disabled.
266
+ */
267
+ setDisabledState(isDisabled) {
268
+ this.isDisabled = isDisabled;
217
269
  }
218
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
219
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.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" } }, 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>\n <ion-segment-button\n *ngFor=\"let item of items; let i = index\"\n [value]=\"item.id\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n <kirby-badge\n *ngIf=\"item.badge\"\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n <ng-container *ngIf=\"item.badge.icon; else badgeContent\">\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n </ng-container>\n <ng-template #badgeContent>\n {{ item.badge.content }}\n </ng-template>\n </kirby-badge>\n </ion-segment-button>\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: "ngmodule", type: IconModule }, { kind: "component", type: i1.IconComponent, selector: "kirby-icon", inputs: ["size", "name"] }, { kind: "component", type: BadgeComponent, selector: "kirby-badge", inputs: ["text", "size"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: IonSegmentButton, selector: "ion-segment-button", inputs: ["disabled", "layout", "mode", "type", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
270
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
271
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", 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
+ {
273
+ provide: NG_VALUE_ACCESSOR,
274
+ useExisting: forwardRef((() => SegmentedControlComponent)),
275
+ multi: true,
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 <ion-segment-button\n *ngFor=\"let item of items; let i = index\"\n [value]=\"item.id\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n <kirby-badge\n *ngIf=\"item.badge\"\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n <ng-container *ngIf=\"item.badge.icon; else badgeContent\">\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n </ng-container>\n <ng-template #badgeContent>\n {{ item.badge.content }}\n </ng-template>\n </kirby-badge>\n </ion-segment-button>\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: "ngmodule", type: IconModule }, { kind: "component", type: i1.IconComponent, selector: "kirby-icon", inputs: ["size", "name"] }, { kind: "component", type: BadgeComponent, selector: "kirby-badge", inputs: ["text", "size"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: IonSegmentButton, selector: "ion-segment-button", inputs: ["disabled", "layout", "mode", "type", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
220
278
  }
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SegmentedControlComponent, decorators: [{
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SegmentedControlComponent, decorators: [{
222
280
  type: Component,
223
- args: [{ imports: [IconModule, BadgeComponent, CommonModule, IonSegment, IonSegmentButton], selector: 'kirby-segmented-control', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-segment\n [value]=\"value?.id\"\n [scrollable]=\"disableChangeOnSwipe || mode !== 'default'\"\n (ionChange)=\"onSegmentSelect($event.detail.value)\"\n (click)=\"preventOutsideClick($event)\"\n>\n <ion-segment-button\n *ngFor=\"let item of items; let i = index\"\n [value]=\"item.id\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n <kirby-badge\n *ngIf=\"item.badge\"\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n <ng-container *ngIf=\"item.badge.icon; else badgeContent\">\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n </ng-container>\n <ng-template #badgeContent>\n {{ item.badge.content }}\n </ng-template>\n </kirby-badge>\n </ion-segment-button>\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"] }]
281
+ args: [{ imports: [IconModule, BadgeComponent, CommonModule, IonSegment, IonSegmentButton], selector: 'kirby-segmented-control', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
282
+ {
283
+ provide: NG_VALUE_ACCESSOR,
284
+ useExisting: forwardRef((() => SegmentedControlComponent)),
285
+ multi: true,
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 <ion-segment-button\n *ngFor=\"let item of items; let i = index\"\n [value]=\"item.id\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n <kirby-badge\n *ngIf=\"item.badge\"\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n <ng-container *ngIf=\"item.badge.icon; else badgeContent\">\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n </ng-container>\n <ng-template #badgeContent>\n {{ item.badge.content }}\n </ng-template>\n </kirby-badge>\n </ion-segment-button>\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"] }]
224
288
  }], propDecorators: { ionSegmentElement: [{
225
289
  type: ViewChild,
226
290
  args: [IonSegment, { static: true, read: ElementRef }]
@@ -268,10 +332,10 @@ class KeyHandlerDirective {
268
332
  hostElement.click();
269
333
  }
270
334
  }
271
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: KeyHandlerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
272
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: KeyHandlerDirective, isStandalone: false, selector: "[keyHandler]", host: { listeners: { "keyup": "keyEvent($event)" } }, ngImport: i0 }); }
335
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: KeyHandlerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
336
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: KeyHandlerDirective, isStandalone: false, selector: "[keyHandler]", host: { listeners: { "keyup": "keyEvent($event)" } }, ngImport: i0 }); }
273
337
  }
274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: KeyHandlerDirective, decorators: [{
338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: KeyHandlerDirective, decorators: [{
275
339
  type: Directive,
276
340
  args: [{
277
341
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -295,10 +359,10 @@ class ModalRouterLinkDirective {
295
359
  this.modalNavigationService.navigateToModal(this.path, typeof this.queryParams !== 'string' ? this.queryParams : null);
296
360
  return false;
297
361
  }
298
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ModalRouterLinkDirective, deps: [{ token: i1$1.ModalNavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
299
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: ModalRouterLinkDirective, isStandalone: false, selector: "[kirbyModalRouterLink]", inputs: { path: ["kirbyModalRouterLink", "path"], queryParams: ["kirbyModalQueryParams", "queryParams"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
362
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ModalRouterLinkDirective, deps: [{ token: i1$1.ModalNavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
363
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: ModalRouterLinkDirective, isStandalone: false, selector: "[kirbyModalRouterLink]", inputs: { path: ["kirbyModalRouterLink", "path"], queryParams: ["kirbyModalQueryParams", "queryParams"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
300
364
  }
301
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ModalRouterLinkDirective, decorators: [{
365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ModalRouterLinkDirective, decorators: [{
302
366
  type: Directive,
303
367
  args: [{
304
368
  selector: `[kirbyModalRouterLink]`,
@@ -391,24 +455,18 @@ const providers = [
391
455
  ResizeObserverService,
392
456
  CanDismissHelper,
393
457
  ];
394
- const ConfigToken = new InjectionToken('USERCONFIG');
395
458
  class KirbyModule {
396
459
  static forChild(config) {
397
460
  return {
398
461
  ngModule: KirbyModule,
399
- providers: [
400
- {
401
- provide: ConfigToken,
402
- useValue: config,
403
- },
404
- ],
462
+ providers: [provideKirby(config)],
405
463
  };
406
464
  }
407
465
  constructor(modalController, config) {
408
466
  modalController.initialize(config && config.moduleRootRoutePath);
409
467
  }
410
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: KirbyModule, deps: [{ token: i1$1.ModalController }, { token: ConfigToken, optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
411
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: KirbyModule, declarations: [ModalRouterLinkDirective, KeyHandlerDirective], imports: [CommonModule, RouterModule, KirbyIonicModule, KirbyAppModule,
468
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: KirbyModule, deps: [{ token: i1$1.ModalController }, { token: KIRBY_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
469
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: KirbyModule, declarations: [ModalRouterLinkDirective, KeyHandlerDirective], imports: [CommonModule, RouterModule, KirbyAppModule,
412
470
  RouterOutletModule,
413
471
  PageModule,
414
472
  HeaderModule,
@@ -515,7 +573,7 @@ class KirbyModule {
515
573
  BadgeComponent,
516
574
  ModalComponent,
517
575
  TableSortableComponent, ModalRouterLinkDirective] }); }
518
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: KirbyModule, providers: providers, imports: [CommonModule, RouterModule, KirbyIonicModule, KirbyAppModule,
576
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: KirbyModule, providers: providers, imports: [CommonModule, RouterModule, KirbyAppModule,
519
577
  RouterOutletModule,
520
578
  PageModule,
521
579
  HeaderModule,
@@ -586,10 +644,10 @@ class KirbyModule {
586
644
  AccordionModule,
587
645
  HeaderModule] }); }
588
646
  }
589
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: KirbyModule, decorators: [{
647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: KirbyModule, decorators: [{
590
648
  type: NgModule,
591
649
  args: [{
592
- imports: [CommonModule, RouterModule, KirbyIonicModule, ...importedModules],
650
+ imports: [CommonModule, RouterModule, ...importedModules],
593
651
  declarations: [declarations],
594
652
  providers: providers,
595
653
  exports: [allExports],
@@ -598,7 +656,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
598
656
  type: Optional
599
657
  }, {
600
658
  type: Inject,
601
- args: [ConfigToken]
659
+ args: [KIRBY_CONFIG]
602
660
  }] }] });
603
661
 
604
662
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"kirbydesign-designsystem.mjs","sources":["../../src/lib/components/segmented-control/segmented-control.component.ts","../../src/lib/components/segmented-control/segmented-control.component.html","../../src/lib/components/index.ts","../../src/lib/directives/key-handler/key-handler.directive.ts","../../src/lib/directives/modal-router-link/modal-router-link.directive.ts","../../src/lib/kirby.module.ts","../../src/kirbydesign-designsystem.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { IconModule } from '@kirbydesign/designsystem/icon';\nimport { BadgeComponent } from '@kirbydesign/designsystem/badge';\n\nimport { IonSegment, IonSegmentButton } from '@ionic/angular/standalone';\nimport { CommonModule } from '@angular/common';\nimport { SegmentItem } from './segment-item';\n\nexport enum SegmentedControlMode {\n chip = 'chip',\n compactChip = 'compactChip',\n default = 'default',\n}\n\n@Component({\n imports: [IconModule, BadgeComponent, CommonModule, IonSegment, IonSegmentButton],\n selector: 'kirby-segmented-control',\n templateUrl: './segmented-control.component.html',\n styleUrls: ['./segmented-control.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SegmentedControlComponent<TItem extends SegmentItem = SegmentItem> {\n @ViewChild(IonSegment, { static: true, read: ElementRef })\n private ionSegmentElement: ElementRef<HTMLIonSegmentElement>;\n\n /**\n * Ensure that the click actually did originate from within the segment-button.\n * We do not want to react to clicks on e.g. segment-btn-wrapper or badge.\n */\n preventOutsideClick(event: TouchEvent) {\n if (event.target instanceof HTMLElement) {\n const targetIsInSegmentBtn = !!event.target.closest('ion-segment-button');\n if (!targetIsInSegmentBtn) {\n event.stopImmediatePropagation();\n }\n }\n }\n\n @Input() mode: SegmentedControlMode | `${SegmentedControlMode}` = SegmentedControlMode.default;\n\n @HostBinding('class')\n get _modeCssClass() {\n return {\n [SegmentedControlMode.chip]: 'chip-mode',\n [SegmentedControlMode.default]: 'default-mode',\n [SegmentedControlMode.compactChip]: 'compact chip-mode',\n }[this.mode];\n }\n\n private _items: TItem[] = [];\n get items(): TItem[] {\n return this._items;\n }\n\n @Input() set items(value: TItem[]) {\n this._items = value || [];\n this._value = this.items[this.selectedIndex];\n this.ensureIonSegmentSelected();\n }\n\n /**\n * After upgrading to Ionic standalone components (Ionic v.7.6.6)\n * there is a lifecycle bug between Angular/Ionic/Stencil that prevents\n * the value of the segment component to be reflected in the checked state\n * of it's slotted segment buttons.\n * This has been patched here: https://github.com/ionic-team/ionic-framework/pull/28837\n * However the patch doesn't fix the problem if `items` are updated after first initialization\n * and the ion-segment-button(s) are re-rerendered.\n */\n private ensureIonSegmentSelected() {\n const ionSegment = this.ionSegmentElement.nativeElement;\n const ionSelectEvent = ionSegment['ionSelect'];\n if (this._value && typeof ionSelectEvent?.emit === 'function') {\n // Ensure changes has been reflected to the DOM:\n setTimeout(() => {\n const selectedSegmentButton = ionSegment.querySelector(\n 'ion-segment-button.segment-button-checked'\n );\n if (selectedSegmentButton) return; // Nothing to patch\n\n ionSelectEvent.emit({ value: this._value?.id });\n });\n }\n }\n\n private _selectedIndex: number = -1;\n get selectedIndex(): number {\n return this._selectedIndex;\n }\n\n @Input() set selectedIndex(index: number) {\n if (index !== this._selectedIndex) {\n this._selectedIndex = index;\n this._value = this.items[this.selectedIndex];\n this.selectedIndexChange.emit(this.selectedIndex);\n }\n }\n\n @Output() selectedIndexChange = new EventEmitter<number>();\n\n private _value: NoInfer<TItem>;\n get value(): NoInfer<TItem> {\n return this._value;\n }\n\n @Input() set value(value: NoInfer<TItem>) {\n this.selectedIndex = this.items.indexOf(value);\n }\n\n @HostBinding('class.sm')\n isSmallSize: boolean;\n\n @Input() set size(size: 'sm' | 'md') {\n this.isSmallSize = size === 'sm';\n }\n\n private _disableChangeOnSwipe: boolean = false;\n get disableChangeOnSwipe(): boolean {\n return this._disableChangeOnSwipe;\n }\n\n @Input() set disableChangeOnSwipe(value: boolean) {\n this._disableChangeOnSwipe = value;\n }\n\n @Output() segmentSelect = new EventEmitter<TItem>();\n\n onSegmentSelect(selectedId: string) {\n const selectedItemIndex = this.items.findIndex((item) => selectedId === item.id);\n\n if (selectedItemIndex !== this.selectedIndex) {\n this.selectedIndex = selectedItemIndex;\n setTimeout(() => {\n this.segmentSelect.emit(this.value);\n });\n }\n }\n\n focusNativeButton(event: UIEvent) {\n (event.target as HTMLIonSegmentButtonElement)?.setFocus();\n }\n\n private _segmentElementHasFocus = false;\n\n getTabIndex(item: TItem, index: number) {\n // When focused prevent tab stop from inner native button to outer ion-segment-button:\n if (this._segmentElementHasFocus) return -1;\n // Allow tab stop on selected item:\n if (item.id === this.value?.id) return null;\n // Allow tab stop on first item if no value is set:\n if (!this.value && index === 0) return null;\n // Prevent tab stop on all other items:\n return -1;\n }\n\n @HostListener('focusin')\n @HostListener('focusout')\n _onFocusInOut() {\n // @HostListener(focusin|focusout) triggers Change Detection and updates attr.tabindex on each ion-segment-button\n this._segmentElementHasFocus = this.ionSegmentElement.nativeElement.matches(':focus-within');\n }\n}\n","<ion-segment\n [value]=\"value?.id\"\n [scrollable]=\"disableChangeOnSwipe || mode !== 'default'\"\n (ionChange)=\"onSegmentSelect($event.detail.value)\"\n (click)=\"preventOutsideClick($event)\"\n>\n <ion-segment-button\n *ngFor=\"let item of items; let i = index\"\n [value]=\"item.id\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n <kirby-badge\n *ngIf=\"item.badge\"\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n <ng-container *ngIf=\"item.badge.icon; else badgeContent\">\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n </ng-container>\n <ng-template #badgeContent>\n {{ item.badge.content }}\n </ng-template>\n </kirby-badge>\n </ion-segment-button>\n</ion-segment>\n","/* prettier-ignore */\nexport { SegmentedControlComponent, SegmentedControlMode} from './segmented-control/segmented-control.component'; // See issue #1555 for prettier-ignore explanation\nexport { SegmentItem } from './segmented-control/segment-item';\n","import { Directive, ElementRef, HostListener } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `[keyHandler]`,\n standalone: false,\n})\nexport class KeyHandlerDirective {\n constructor(private element: ElementRef) {}\n\n @HostListener('keyup', ['$event'])\n keyEvent(event: KeyboardEvent) {\n if (event.key === ' ' || event.key === 'Enter' || event.key === 'Spacebar') {\n // Prevent the default action to stop scrolling when space is pressed\n event.preventDefault();\n\n const hostElement = <HTMLElement>this.element.nativeElement;\n hostElement.click();\n }\n }\n}\n","import { Directive, ElementRef, HostListener, Input, OnInit } from '@angular/core';\nimport { Params } from '@angular/router';\nimport { ModalNavigationService } from '@kirbydesign/designsystem/modal';\n\n@Directive({\n selector: `[kirbyModalRouterLink]`,\n standalone: false,\n})\nexport class ModalRouterLinkDirective implements OnInit {\n constructor(\n private modalNavigationService: ModalNavigationService,\n private elementRef: ElementRef\n ) {}\n\n ngOnInit(): void {\n this.elementRef.nativeElement.setAttribute('modal-router-link', '');\n }\n\n @Input('kirbyModalRouterLink') path: string | string[];\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('kirbyModalQueryParams') queryParams?: Params;\n\n @HostListener('click')\n onClick(): boolean {\n this.modalNavigationService.navigateToModal(\n this.path,\n typeof this.queryParams !== 'string' ? this.queryParams : null\n );\n return false;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Inject, InjectionToken, ModuleWithProviders, NgModule, Optional } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { CardModule } from '@kirbydesign/designsystem/card';\nimport { IconModule } from '@kirbydesign/designsystem/icon';\nimport { KirbyIonicModule } from '@kirbydesign/designsystem/kirby-ionic-module';\nimport {\n ComponentLoaderDirective,\n ResizeObserverFactory,\n ResizeObserverService,\n ThemeColorDirective,\n} from '@kirbydesign/designsystem/shared';\nimport { FlagComponent } from '@kirbydesign/designsystem/flag';\nimport { SpinnerModule } from '@kirbydesign/designsystem/spinner';\nimport { ToggleComponent } from '@kirbydesign/designsystem/toggle';\nimport { SectionHeaderComponent } from '@kirbydesign/designsystem/section-header';\nimport { ItemModule } from '@kirbydesign/designsystem/item';\nimport { SlideModule } from '@kirbydesign/designsystem/slide';\nimport { ToggleButtonModule } from '@kirbydesign/designsystem/toggle-button';\nimport { TabsModule } from '@kirbydesign/designsystem/tabs';\nimport { SlideButtonComponent } from '@kirbydesign/designsystem/slide-button';\nimport { RangeComponent } from '@kirbydesign/designsystem/range';\nimport { PopoverComponent } from '@kirbydesign/designsystem/popover';\nimport {\n LoadingOverlayComponent,\n LoadingOverlayService,\n} from '@kirbydesign/designsystem/loading-overlay';\nimport { DividerComponent } from '@kirbydesign/designsystem/divider';\nimport { CheckboxComponent } from '@kirbydesign/designsystem/checkbox';\nimport { AccordionModule } from '@kirbydesign/designsystem/accordion';\nimport { ItemSlidingComponent } from '@kirbydesign/designsystem/item-sliding';\nimport { ListModule } from '@kirbydesign/designsystem/list';\nimport { RadioModule } from '@kirbydesign/designsystem/radio';\nimport {\n AffixDirective,\n FormFieldModule,\n InputComponent,\n TextareaComponent,\n} from '@kirbydesign/designsystem/form-field';\nimport { AvatarComponent } from '@kirbydesign/designsystem/avatar';\nimport {\n ProgressCircleComponent,\n ProgressCircleRingComponent,\n} from '@kirbydesign/designsystem/progress-circle';\nimport { RouterOutletModule } from '@kirbydesign/designsystem/router-outlet';\n\nimport { ItemGroupComponent } from '@kirbydesign/designsystem/item-group';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { CalendarComponent } from '@kirbydesign/designsystem/calendar';\nimport {\n ActionSheetComponent,\n ActionSheetHelper,\n AlertComponent,\n AlertHelper,\n CanDismissHelper,\n ModalCompactWrapperComponent,\n ModalController,\n ModalFooterComponent,\n ModalHelper,\n ModalWrapperComponent,\n} from '@kirbydesign/designsystem/modal';\nimport { ModalComponent } from '@kirbydesign/designsystem/modal';\nimport { PageModule } from '@kirbydesign/designsystem/page';\nimport { HeaderModule } from '@kirbydesign/designsystem/header';\nimport { EmptyStateModule } from '@kirbydesign/designsystem/empty-state';\nimport { DropdownModule } from '@kirbydesign/designsystem/dropdown';\nimport { KirbyAppModule } from '@kirbydesign/designsystem/kirby-app';\nimport { ChartsModule } from '@kirbydesign/designsystem/chart';\nimport { FabSheetComponent } from '@kirbydesign/designsystem/fab-sheet';\nimport { TableSortableComponent } from '@kirbydesign/designsystem/data-table';\nimport { ReorderListComponent } from '@kirbydesign/designsystem/reorder-list';\n\nimport { ToastController, ToastHelper } from '@kirbydesign/designsystem/toast';\nimport { ActionGroupComponent } from '@kirbydesign/designsystem/action-group';\nimport { MenuComponent } from '@kirbydesign/designsystem/menu';\nimport { TabNavigationModule } from '@kirbydesign/designsystem/tab-navigation';\nimport { BadgeComponent } from '@kirbydesign/designsystem/badge';\nimport { SegmentedControlComponent } from './components/segmented-control/segmented-control.component';\nimport { KeyHandlerDirective } from './directives/key-handler/key-handler.directive';\nimport { ModalRouterLinkDirective } from './directives/modal-router-link/modal-router-link.directive';\n\nconst exportedDeclarations = [ModalRouterLinkDirective];\n\nconst declarations = [...exportedDeclarations, KeyHandlerDirective];\n\nconst standaloneComponents = [\n ActionGroupComponent,\n ItemGroupComponent,\n ModalCompactWrapperComponent,\n TextareaComponent,\n InputComponent,\n AffixDirective,\n DividerComponent,\n ThemeColorDirective,\n SegmentedControlComponent,\n AlertComponent,\n PopoverComponent,\n ProgressCircleRingComponent,\n ModalWrapperComponent,\n SectionHeaderComponent,\n RangeComponent,\n ItemSlidingComponent,\n ProgressCircleComponent,\n ReorderListComponent,\n LoadingOverlayComponent,\n FabSheetComponent,\n ToggleComponent,\n SlideButtonComponent,\n SegmentedControlComponent,\n CheckboxComponent,\n MenuComponent,\n ActionSheetComponent,\n ModalFooterComponent,\n AvatarComponent,\n CalendarComponent,\n ButtonComponent,\n ComponentLoaderDirective,\n FlagComponent,\n BadgeComponent,\n ModalComponent,\n TableSortableComponent,\n];\nconst exportedModules = [\n KirbyAppModule,\n RouterOutletModule,\n PageModule,\n HeaderModule,\n TabNavigationModule,\n TabsModule,\n IconModule,\n ItemModule,\n ToggleButtonModule,\n ListModule,\n ChartsModule,\n SpinnerModule,\n CardModule,\n RadioModule,\n EmptyStateModule,\n DropdownModule,\n FormFieldModule,\n SlideModule,\n AccordionModule,\n HeaderModule,\n ...standaloneComponents,\n];\n\nconst allExports = [...exportedModules, ...exportedDeclarations];\n\nconst importedModules = [...exportedModules];\n\nconst providers = [\n ModalController,\n ActionSheetHelper,\n ModalHelper,\n AlertHelper,\n ToastHelper,\n ToastController,\n LoadingOverlayService,\n ResizeObserverFactory,\n ResizeObserverService,\n CanDismissHelper,\n];\n\nconst ConfigToken = new InjectionToken<unknown>('USERCONFIG');\nexport interface KirbyConfig {\n moduleRootRoutePath?: string;\n}\n\n@NgModule({\n imports: [CommonModule, RouterModule, KirbyIonicModule, ...importedModules],\n declarations: [declarations],\n providers: providers,\n exports: [allExports],\n})\nexport class KirbyModule {\n static forChild(config?: KirbyConfig): ModuleWithProviders<KirbyModule> {\n return {\n ngModule: KirbyModule,\n providers: [\n {\n provide: ConfigToken,\n useValue: config,\n },\n ],\n };\n }\n\n constructor(\n modalController: ModalController,\n @Optional() @Inject(ConfigToken) config?: KirbyConfig\n ) {\n modalController.initialize(config && config.moduleRootRoutePath);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkBY;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,oBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,oBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,GAI/B,EAAA,CAAA,CAAA;MASY,yBAAyB,CAAA;AAPtC,IAAA,WAAA,GAAA;AAwBW,QAAA,IAAA,CAAA,IAAI,GAAqD,oBAAoB,CAAC,OAAO;QAWtF,IAAM,CAAA,MAAA,GAAY,EAAE;QAoCpB,IAAc,CAAA,cAAA,GAAW,CAAC,CAAC;AAazB,QAAA,IAAA,CAAA,mB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a;YACb,oBAAoB;YACpB,oBAAoB;YACpB,eAAe;YACf,iBAAiB;YACjB,eAAe;YAEf,aAAa;YACb,cAAc;YACd,cAAc;AACd,YAAA,sBAAsB,EAGtB,cAAc;YACd,kBAAkB;YAClB,UAAU;YACV,YAAY;YACZ,mBAAmB;YACnB,UAAU;YACV,UAAU;YACV,UAAU;YACV,kBAAkB;YAClB,UAAU;YACV,YAAY;YACZ,aAAa;YACb,UAAU;YACV,WAAW;YACX,gBAAgB;YAChB,cAAc;YACd,eAAe;YACf,WAAW;YACX,eAAe;YACf,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAgCD,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,eAAe,CAAC;oBAC3E,YAAY,EAAE,CAAC,YAAY,CAAC;AAC5B,oBAAA,SAAS,EAAE,SAAS;oBACpB,OAAO,EAAE,CAAC,UAAU,CAAC;AACtB,iBAAA;;0BAgBI;;0BAAY,MAAM;2BAAC,WAAW;;;AC9LnC;;AAEG;;;;"}
1
+ {"version":3,"file":"kirbydesign-designsystem.mjs","sources":["../../src/lib/components/segmented-control/segmented-control.component.ts","../../src/lib/components/segmented-control/segmented-control.component.html","../../src/lib/components/index.ts","../../src/lib/directives/key-handler/key-handler.directive.ts","../../src/lib/directives/modal-router-link/modal-router-link.directive.ts","../../src/lib/kirby.module.ts","../../src/kirbydesign-designsystem.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { IconModule } from '@kirbydesign/designsystem/icon';\nimport { BadgeComponent } from '@kirbydesign/designsystem/badge';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { IonSegment, IonSegmentButton } from '@ionic/angular/standalone';\nimport { CommonModule } from '@angular/common';\nimport { SegmentItem } from './segment-item';\n\nexport enum SegmentedControlMode {\n chip = 'chip',\n compactChip = 'compactChip',\n default = 'default',\n}\n\n@Component({\n imports: [IconModule, BadgeComponent, CommonModule, IonSegment, IonSegmentButton],\n selector: 'kirby-segmented-control',\n templateUrl: './segmented-control.component.html',\n styleUrls: ['./segmented-control.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SegmentedControlComponent),\n multi: true,\n },\n ],\n})\nexport class SegmentedControlComponent<TItem extends SegmentItem = SegmentItem>\n implements ControlValueAccessor\n{\n @ViewChild(IonSegment, { static: true, read: ElementRef })\n private ionSegmentElement: ElementRef<HTMLIonSegmentElement>;\n\n /**\n * Ensure that the click actually did originate from within the segment-button.\n * We do not want to react to clicks on e.g. segment-btn-wrapper or badge.\n */\n preventOutsideClick(event: TouchEvent) {\n if (event.target instanceof HTMLElement) {\n const targetIsInSegmentBtn = !!event.target.closest('ion-segment-button');\n if (!targetIsInSegmentBtn) {\n event.stopImmediatePropagation();\n }\n }\n }\n\n @Input() mode: SegmentedControlMode | `${SegmentedControlMode}` = SegmentedControlMode.default;\n\n @HostBinding('class')\n get _modeCssClass() {\n return {\n [SegmentedControlMode.chip]: 'chip-mode',\n [SegmentedControlMode.default]: 'default-mode',\n [SegmentedControlMode.compactChip]: 'compact chip-mode',\n }[this.mode];\n }\n\n private _items: TItem[] = [];\n get items(): TItem[] {\n return this._items;\n }\n\n @Input() set items(value: TItem[]) {\n this._items = value || [];\n this._value = this.items[this.selectedIndex];\n this.ensureIonSegmentSelected();\n }\n\n protected isDisabled = false;\n\n /**\n * After upgrading to Ionic standalone components (Ionic v.7.6.6)\n * there is a lifecycle bug between Angular/Ionic/Stencil that prevents\n * the value of the segment component to be reflected in the checked state\n * of it's slotted segment buttons.\n * This has been patched here: https://github.com/ionic-team/ionic-framework/pull/28837\n * However the patch doesn't fix the problem if `items` are updated after first initialization\n * and the ion-segment-button(s) are re-rerendered.\n */\n private ensureIonSegmentSelected() {\n const ionSegment = this.ionSegmentElement.nativeElement;\n const ionSelectEvent = ionSegment['ionSelect'];\n if (this._value && typeof ionSelectEvent?.emit === 'function') {\n // Ensure changes has been reflected to the DOM:\n setTimeout(() => {\n const selectedSegmentButton = ionSegment.querySelector(\n 'ion-segment-button.segment-button-checked'\n );\n if (selectedSegmentButton) return; // Nothing to patch\n\n ionSelectEvent.emit({ value: this._value?.id });\n });\n }\n }\n\n private _selectedIndex: number = -1;\n get selectedIndex(): number {\n return this._selectedIndex;\n }\n\n @Input() set selectedIndex(index: number) {\n if (index !== this._selectedIndex) {\n this._selectedIndex = index;\n this._value = this.items[this.selectedIndex];\n this.selectedIndexChange.emit(this.selectedIndex);\n }\n }\n\n @Output() selectedIndexChange = new EventEmitter<number>();\n\n private _value: NoInfer<TItem>;\n get value(): NoInfer<TItem> {\n return this._value;\n }\n\n @Input() set value(value: NoInfer<TItem>) {\n this.selectedIndex = this.items.indexOf(value);\n }\n\n @HostBinding('class.sm')\n isSmallSize: boolean;\n\n @Input() set size(size: 'sm' | 'md') {\n this.isSmallSize = size === 'sm';\n }\n\n private _disableChangeOnSwipe: boolean = false;\n get disableChangeOnSwipe(): boolean {\n return this._disableChangeOnSwipe;\n }\n\n @Input() set disableChangeOnSwipe(value: boolean) {\n this._disableChangeOnSwipe = value;\n }\n\n @Output() segmentSelect = new EventEmitter<TItem>();\n\n onSegmentSelect(selectedId: string) {\n const selectedItemIndex = this.items.findIndex((item) => selectedId === item.id);\n\n if (selectedItemIndex !== this.selectedIndex) {\n this.selectedIndex = selectedItemIndex;\n setTimeout(() => {\n this.segmentSelect.emit(this.value);\n this.onChange(this.value);\n this.onTouched();\n });\n }\n }\n\n focusNativeButton(event: UIEvent) {\n (event.target as HTMLIonSegmentButtonElement)?.setFocus();\n }\n\n private _segmentElementHasFocus = false;\n\n getTabIndex(item: TItem, index: number) {\n // When focused prevent tab stop from inner native button to outer ion-segment-button:\n if (this._segmentElementHasFocus) return -1;\n // Allow tab stop on selected item:\n if (item.id === this.value?.id) return null;\n // Allow tab stop on first item if no value is set:\n if (!this.value && index === 0) return null;\n // Prevent tab stop on all other items:\n return -1;\n }\n\n @HostListener('focusin')\n @HostListener('focusout')\n _onFocusInOut() {\n // @HostListener(focusin|focusout) triggers Change Detection and updates attr.tabindex on each ion-segment-button\n this._segmentElementHasFocus = this.ionSegmentElement.nativeElement.matches(':focus-within');\n if (!this._segmentElementHasFocus) {\n this.onTouched();\n }\n }\n\n // Initialize default ControlValueAccessor callback functions (noop)\n // eslint-disable-next-line no-empty-function\n private onChange: (value: NoInfer<TItem>) => void = () => {};\n // eslint-disable-next-line no-empty-function\n private onTouched: () => void = () => {};\n /**\n * Sets the segmented control'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: NoInfer<TItem>): void {\n if (value !== this._value) {\n this.value = value;\n }\n }\n\n /**\n * Saves a callback function to be invoked when the segmented control'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: (value: NoInfer<TItem>) => void): void {\n this.onChange = fn;\n }\n\n /**\n * Saves a callback function to be invoked when the segmented control 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: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Disables the segmented control. 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.isDisabled = isDisabled;\n }\n}\n","<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 <ion-segment-button\n *ngFor=\"let item of items; let i = index\"\n [value]=\"item.id\"\n [attr.tabindex]=\"getTabIndex(item, i)\"\n (click)=\"focusNativeButton($event)\"\n >\n {{ item.text }}\n <kirby-badge\n *ngIf=\"item.badge\"\n role=\"text\"\n [attr.aria-label]=\"item.badge.description\"\n [themeColor]=\"item.badge.themeColor\"\n >\n <ng-container *ngIf=\"item.badge.icon; else badgeContent\">\n <kirby-icon [name]=\"item.badge.icon\"></kirby-icon>\n </ng-container>\n <ng-template #badgeContent>\n {{ item.badge.content }}\n </ng-template>\n </kirby-badge>\n </ion-segment-button>\n</ion-segment>\n","/* prettier-ignore */\nexport { SegmentedControlComponent, SegmentedControlMode} from './segmented-control/segmented-control.component'; // See issue #1555 for prettier-ignore explanation\nexport { SegmentItem } from './segmented-control/segment-item';\n","import { Directive, ElementRef, HostListener } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `[keyHandler]`,\n standalone: false,\n})\nexport class KeyHandlerDirective {\n constructor(private element: ElementRef) {}\n\n @HostListener('keyup', ['$event'])\n keyEvent(event: KeyboardEvent) {\n if (event.key === ' ' || event.key === 'Enter' || event.key === 'Spacebar') {\n // Prevent the default action to stop scrolling when space is pressed\n event.preventDefault();\n\n const hostElement = <HTMLElement>this.element.nativeElement;\n hostElement.click();\n }\n }\n}\n","import { Directive, ElementRef, HostListener, Input, OnInit } from '@angular/core';\nimport { Params } from '@angular/router';\nimport { ModalNavigationService } from '@kirbydesign/designsystem/modal';\n\n@Directive({\n selector: `[kirbyModalRouterLink]`,\n standalone: false,\n})\nexport class ModalRouterLinkDirective implements OnInit {\n constructor(\n private modalNavigationService: ModalNavigationService,\n private elementRef: ElementRef\n ) {}\n\n ngOnInit(): void {\n this.elementRef.nativeElement.setAttribute('modal-router-link', '');\n }\n\n @Input('kirbyModalRouterLink') path: string | string[];\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('kirbyModalQueryParams') queryParams?: Params;\n\n @HostListener('click')\n onClick(): boolean {\n this.modalNavigationService.navigateToModal(\n this.path,\n typeof this.queryParams !== 'string' ? this.queryParams : null\n );\n return false;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Inject, ModuleWithProviders, NgModule, Optional } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { CardModule } from '@kirbydesign/designsystem/card';\nimport { IconModule } from '@kirbydesign/designsystem/icon';\nimport { KIRBY_CONFIG, KirbyConfig } from '@kirbydesign/designsystem/config';\nimport {\n ComponentLoaderDirective,\n ResizeObserverFactory,\n ResizeObserverService,\n ThemeColorDirective,\n} from '@kirbydesign/designsystem/shared';\nimport { FlagComponent } from '@kirbydesign/designsystem/flag';\nimport { SpinnerModule } from '@kirbydesign/designsystem/spinner';\nimport { ToggleComponent } from '@kirbydesign/designsystem/toggle';\nimport { SectionHeaderComponent } from '@kirbydesign/designsystem/section-header';\nimport { ItemModule } from '@kirbydesign/designsystem/item';\nimport { SlideModule } from '@kirbydesign/designsystem/slide';\nimport { ToggleButtonModule } from '@kirbydesign/designsystem/toggle-button';\nimport { TabsModule } from '@kirbydesign/designsystem/tabs';\nimport { SlideButtonComponent } from '@kirbydesign/designsystem/slide-button';\nimport { RangeComponent } from '@kirbydesign/designsystem/range';\nimport { PopoverComponent } from '@kirbydesign/designsystem/popover';\nimport {\n LoadingOverlayComponent,\n LoadingOverlayService,\n} from '@kirbydesign/designsystem/loading-overlay';\nimport { DividerComponent } from '@kirbydesign/designsystem/divider';\nimport { CheckboxComponent } from '@kirbydesign/designsystem/checkbox';\nimport { AccordionModule } from '@kirbydesign/designsystem/accordion';\nimport { ItemSlidingComponent } from '@kirbydesign/designsystem/item-sliding';\nimport { ListModule } from '@kirbydesign/designsystem/list';\nimport { RadioModule } from '@kirbydesign/designsystem/radio';\nimport {\n AffixDirective,\n FormFieldModule,\n InputComponent,\n TextareaComponent,\n} from '@kirbydesign/designsystem/form-field';\nimport { AvatarComponent } from '@kirbydesign/designsystem/avatar';\nimport {\n ProgressCircleComponent,\n ProgressCircleRingComponent,\n} from '@kirbydesign/designsystem/progress-circle';\nimport { RouterOutletModule } from '@kirbydesign/designsystem/router-outlet';\n\nimport { ItemGroupComponent } from '@kirbydesign/designsystem/item-group';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { CalendarComponent } from '@kirbydesign/designsystem/calendar';\nimport {\n ActionSheetComponent,\n ActionSheetHelper,\n AlertComponent,\n AlertHelper,\n CanDismissHelper,\n ModalCompactWrapperComponent,\n ModalController,\n ModalFooterComponent,\n ModalHelper,\n ModalWrapperComponent,\n} from '@kirbydesign/designsystem/modal';\nimport { ModalComponent } from '@kirbydesign/designsystem/modal';\nimport { PageModule } from '@kirbydesign/designsystem/page';\nimport { HeaderModule } from '@kirbydesign/designsystem/header';\nimport { EmptyStateModule } from '@kirbydesign/designsystem/empty-state';\nimport { DropdownModule } from '@kirbydesign/designsystem/dropdown';\nimport { KirbyAppModule } from '@kirbydesign/designsystem/kirby-app';\nimport { ChartsModule } from '@kirbydesign/designsystem/chart';\nimport { FabSheetComponent } from '@kirbydesign/designsystem/fab-sheet';\nimport { TableSortableComponent } from '@kirbydesign/designsystem/data-table';\nimport { ReorderListComponent } from '@kirbydesign/designsystem/reorder-list';\n\nimport { ToastController, ToastHelper } from '@kirbydesign/designsystem/toast';\nimport { ActionGroupComponent } from '@kirbydesign/designsystem/action-group';\nimport { MenuComponent } from '@kirbydesign/designsystem/menu';\nimport { TabNavigationModule } from '@kirbydesign/designsystem/tab-navigation';\nimport { BadgeComponent } from '@kirbydesign/designsystem/badge';\n\nimport { provideKirby } from '@kirbydesign/designsystem/config';\nimport { SegmentedControlComponent } from './components/segmented-control/segmented-control.component';\nimport { KeyHandlerDirective } from './directives/key-handler/key-handler.directive';\nimport { ModalRouterLinkDirective } from './directives/modal-router-link/modal-router-link.directive';\n\nconst exportedDeclarations = [ModalRouterLinkDirective];\n\nconst declarations = [...exportedDeclarations, KeyHandlerDirective];\n\nconst standaloneComponents = [\n ActionGroupComponent,\n ItemGroupComponent,\n ModalCompactWrapperComponent,\n TextareaComponent,\n InputComponent,\n AffixDirective,\n DividerComponent,\n ThemeColorDirective,\n SegmentedControlComponent,\n AlertComponent,\n PopoverComponent,\n ProgressCircleRingComponent,\n ModalWrapperComponent,\n SectionHeaderComponent,\n RangeComponent,\n ItemSlidingComponent,\n ProgressCircleComponent,\n ReorderListComponent,\n LoadingOverlayComponent,\n FabSheetComponent,\n ToggleComponent,\n SlideButtonComponent,\n SegmentedControlComponent,\n CheckboxComponent,\n MenuComponent,\n ActionSheetComponent,\n ModalFooterComponent,\n AvatarComponent,\n CalendarComponent,\n ButtonComponent,\n ComponentLoaderDirective,\n FlagComponent,\n BadgeComponent,\n ModalComponent,\n TableSortableComponent,\n];\nconst exportedModules = [\n KirbyAppModule,\n RouterOutletModule,\n PageModule,\n HeaderModule,\n TabNavigationModule,\n TabsModule,\n IconModule,\n ItemModule,\n ToggleButtonModule,\n ListModule,\n ChartsModule,\n SpinnerModule,\n CardModule,\n RadioModule,\n EmptyStateModule,\n DropdownModule,\n FormFieldModule,\n SlideModule,\n AccordionModule,\n HeaderModule,\n ...standaloneComponents,\n];\n\nconst allExports = [...exportedModules, ...exportedDeclarations];\n\nconst importedModules = [...exportedModules];\n\nconst providers = [\n ModalController,\n ActionSheetHelper,\n ModalHelper,\n AlertHelper,\n ToastHelper,\n ToastController,\n LoadingOverlayService,\n ResizeObserverFactory,\n ResizeObserverService,\n CanDismissHelper,\n];\n\n@NgModule({\n imports: [CommonModule, RouterModule, ...importedModules],\n declarations: [declarations],\n providers: providers,\n exports: [allExports],\n})\nexport class KirbyModule {\n static forChild(config?: KirbyConfig): ModuleWithProviders<KirbyModule> {\n return {\n ngModule: KirbyModule,\n providers: [provideKirby(config)],\n };\n }\n\n constructor(\n modalController: ModalController,\n @Optional() @Inject(KIRBY_CONFIG) config?: KirbyConfig\n ) {\n modalController.initialize(config && config.mo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;AACtB,iBAAA;;0BAWI;;0BAAY,MAAM;2BAAC,YAAY;;;ACtLpC;;AAEG;;;;"}
@@ -1,32 +1,43 @@
1
- import { AfterContentChecked, AfterContentInit, ElementRef, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core';
1
+ import { AfterContentChecked, AfterContentInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core';
2
2
  import { PlatformService } from '@kirbydesign/designsystem/helpers';
3
3
  import { ResizeObserverService } from '@kirbydesign/designsystem/shared';
4
4
  import { WindowRef } from '@kirbydesign/designsystem/types';
5
5
  import { AffixDirective } from './directives/affix/affix.directive';
6
6
  import { DateInputDirective } from './directives/date/date-input.directive';
7
7
  import { InputCounterComponent } from './input-counter/input-counter.component';
8
+ import { InputComponent } from './input/input.component';
9
+ import { TextareaComponent } from './textarea/textarea.component';
8
10
  import * as i0 from "@angular/core";
9
11
  export declare class FormFieldComponent implements AfterContentChecked, AfterContentInit, OnInit, OnDestroy {
10
12
  private platform;
11
13
  private renderer;
12
14
  private windowRef;
13
15
  private resizeObserverService;
16
+ private cdr;
14
17
  private isRegistered;
15
18
  private element;
16
- private inputElement;
17
19
  private isTouch;
20
+ private nestedInteractiveElement;
21
+ private nestedInteractiveErrorSubscription;
22
+ private _message;
18
23
  showDefaultCalendarIcon: boolean;
24
+ _nestedInteractiveHasError: boolean;
19
25
  _labelId: string;
26
+ _errorMessageId: string;
27
+ _messageId: string;
20
28
  label: string;
21
- message: string | null;
29
+ get message(): string | null;
30
+ set message(value: string);
22
31
  affixElements: QueryList<AffixDirective>;
23
32
  counter: InputCounterComponent;
24
33
  private radioGroupComponent;
34
+ inputComponent: InputComponent;
35
+ textareaComponent: TextareaComponent;
25
36
  private radioGroupElement;
26
37
  input: ElementRef<HTMLInputElement>;
27
38
  textarea: ElementRef<HTMLTextAreaElement>;
28
39
  dateInput: DateInputDirective;
29
- constructor(elementRef: ElementRef<HTMLElement>, platform: PlatformService, renderer: Renderer2, windowRef: WindowRef, resizeObserverService: ResizeObserverService);
40
+ constructor(elementRef: ElementRef<HTMLElement>, platform: PlatformService, renderer: Renderer2, windowRef: WindowRef, resizeObserverService: ResizeObserverService, cdr: ChangeDetectorRef);
30
41
  get _wrapContentInLabel(): boolean;
31
42
  private dispatchLoadEvent;
32
43
  _onRegisterFormField(): void;
@@ -35,9 +46,13 @@ export declare class FormFieldComponent implements AfterContentChecked, AfterCon
35
46
  ngOnInit(): void;
36
47
  ngAfterContentInit(): void;
37
48
  ngAfterContentChecked(): void;
38
- private shouldShowDefaultCalendarIcon;
39
49
  ngOnDestroy(): void;
50
+ private registerNestedInteractive;
51
+ private getNestedInteractiveElement;
52
+ private setNestedInteractiveElementAttributes;
53
+ private subscribeToNestedInteractiveError;
54
+ private shouldShowDefaultCalendarIcon;
40
55
  static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "kirby-form-field", never, { "label": { "alias": "label"; "required": false; }; "message": { "alias": "message"; "required": false; }; }, {}, ["counter", "radioGroupComponent", "radioGroupElement", "input", "textarea", "dateInput", "affixElements"], ["kirby-input-counter", "[kirby-affix='prefix']", "input[kirby-input]", "textarea[kirby-textarea]", "kirby-radio-group", "[kirby-affix='suffix']"], false, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "kirby-form-field", never, { "label": { "alias": "label"; "required": false; }; "message": { "alias": "message"; "required": false; }; }, {}, ["counter", "radioGroupComponent", "inputComponent", "textareaComponent", "radioGroupElement", "input", "textarea", "dateInput", "affixElements"], ["kirby-input-counter", "[kirby-affix='prefix']", "input[kirby-input]", "textarea[kirby-textarea]", "kirby-radio-group", "[kirby-affix='suffix']"], false, never>;
42
57
  }
43
58
  //# sourceMappingURL=form-field.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.component.d.ts","sourceRoot":"","sources":["../../form-field/src/form-field.component.ts"],"names":[],"m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,OAAO,CAAC,6BAA6B;yCA7M1B,kBAAkB;2CAAlB,kBAAkB;CAmN9B"}
@@ -1,32 +1,36 @@
1
1
  import { ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { FormFieldControl } from '@kirbydesign/designsystem/types';
2
3
  import * as i0 from "@angular/core";
3
4
  import * as i1 from "../directives/date/date-input.directive";
4
5
  export declare enum InputSize {
5
6
  medium = "md",
6
7
  large = "lg"
7
8
  }
8
- export declare class InputComponent implements OnChanges, OnInit {
9
+ export declare class InputComponent implements OnChanges, OnInit, FormFieldControl {
9
10
  private elementRef;
10
- constructor(elementRef: ElementRef<HTMLInputElement>);
11
- ngOnInit(): void;
12
- private static typeToInputmodeMap;
13
11
  kirbyChange: EventEmitter<string>;
12
+ private _hasError;
14
13
  set type(value: string);
15
14
  size: InputSize | `${InputSize}`;
16
15
  /**
17
16
  * Removes padding, width, rounded borders and drop-shadow when set to `true`.
18
17
  */
19
18
  borderless: boolean;
20
- hasError: boolean;
19
+ get hasError(): boolean;
20
+ set hasError(value: boolean);
21
21
  autocomplete: 'on' | 'off';
22
22
  autocorrect: 'on' | 'off';
23
23
  value: string;
24
24
  maxlength: number;
25
25
  inputmode: string;
26
+ hasErrorChange: EventEmitter<boolean>;
27
+ constructor(elementRef: ElementRef<HTMLInputElement>);
28
+ ngOnInit(): void;
29
+ ngOnChanges(changes: SimpleChanges): void;
30
+ private static typeToInputmodeMap;
26
31
  _onKeyUp(value: string): void;
27
32
  _onCutPaste(target: HTMLInputElement): void;
28
- ngOnChanges(changes: SimpleChanges): void;
29
33
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "input[kirby-input]", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "borderless": { "alias": "borderless"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "autocorrect": { "alias": "autocorrect"; "required": false; }; "value": { "alias": "value"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "inputmode": { "alias": "inputmode"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.DateInputDirective; inputs: { "prefillYear": "prefillYear"; "useNativeDatePicker": "useNativeDatePicker"; }; outputs: {}; }]>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "input[kirby-input]", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "borderless": { "alias": "borderless"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "autocorrect": { "alias": "autocorrect"; "required": false; }; "value": { "alias": "value"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "inputmode": { "alias": "inputmode"; "required": false; }; }, { "hasErrorChange": "hasErrorChange"; }, never, never, true, [{ directive: typeof i1.DateInputDirective; inputs: { "prefillYear": "prefillYear"; "useNativeDatePicker": "useNativeDatePicker"; }; outputs: {}; }]>;
31
35
  }
32
36
  //# sourceMappingURL=input.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../../form-field/src/input/input.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,UAAU,EACV,YAAY,EAIZ,SAAS,EACT,MAAM,EACN,aAAa,EACd,MAAM,eAAe,CAAC;;;AAGvB,oBAAY,SAAS;IACnB,MAAM,OAAO;IACb,KAAK,OAAO;CACb;AAED,qBAea,cAAe,YAAW,SAAS,EAAE,MAAM;IAC1C,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAE5D,QAAQ,IAAI,IAAI;IAchB,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAG/B;IAEF,WAAW,uBAA8B;IAEzC,IAAa,IAAI,CAAC,KAAK,EAAE,MAAM,EAK9B;IAID,IAAI,EAAE,SAAS,GAAG,GAAG,SAAS,E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CAAC;IAIlB,SAAS,EAAE,MAAM,CAAC;IAER,cAAc,wBAA+B;gBAEnC,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAE5D,QAAQ,IAAI,IAAI;IAchB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAG/B;IAGF,QAAQ,CAAC,KAAK,EAAE,MAAM;IAMtB,WAAW,CAAC,MAAM,EAAE,gBAAgB;yCA5FzB,cAAc;2CAAd,cAAc;CAgG1B"}
@@ -1,20 +1,24 @@
1
1
  import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { FormFieldControl } from '@kirbydesign/designsystem/types';
2
3
  import * as i0 from "@angular/core";
3
- export declare class TextareaComponent implements OnChanges {
4
+ export declare class TextareaComponent implements OnChanges, FormFieldControl {
4
5
  kirbyChange: EventEmitter<string>;
6
+ private _hasError;
5
7
  value: string;
6
8
  /**
7
9
  * Removes padding, width, rounded borders and drop-shadow when set to `true`.
8
10
  */
9
11
  borderless: boolean;
10
- hasError: boolean;
12
+ get hasError(): boolean;
13
+ set hasError(value: boolean);
11
14
  autocomplete: 'on' | 'off';
12
15
  autocorrect: 'on' | 'off';
13
16
  maxlength: number;
17
+ hasErrorChange: EventEmitter<boolean>;
18
+ ngOnChanges(changes: SimpleChanges): void;
14
19
  _onKeyUp(value: string): void;
15
20
  _onCutPaste(target: HTMLInputElement): void;
16
- ngOnChanges(changes: SimpleChanges): void;
17
21
  static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "textarea[kirby-textarea]", never, { "value": { "alias": "value"; "required": false; }; "borderless": { "alias": "borderless"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "autocorrect": { "alias": "autocorrect"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; }, {}, never, ["*"], true, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "textarea[kirby-textarea]", never, { "value": { "alias": "value"; "required": false; }; "borderless": { "alias": "borderless"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "autocorrect": { "alias": "autocorrect"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; }, { "hasErrorChange": "hasErrorChange"; }, never, ["*"], true, never>;
19
23
  }
20
24
  //# sourceMappingURL=textarea.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.component.d.ts","sourceRoot":"","sources":["../../../form-field/src/textarea/textarea.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,YAAY,EAIZ,SAAS,EACT,aAAa,EACd,MAAM,eAAe,CAAC;;AAEvB,qBAQa,iBAAkB,YAAW,SAAS;IACjD,WAAW,uBAA8B;IAEhC,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IAGH,UAAU,EAAE,OAAO,CAAC;IAIpB,QAAQ,EAAE,OAAO,CAAC;IAIlB,YAAY,EAAE,IAAI,GAAG,KAAK,CAAS;IAInC,WAAW,EAAE,IAAI,GAAG,KAAK,CAAS;IAIlC,SAAS,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,KAAK,EAAE,MAAM;IAMtB,WAAW,CAAC,MAAM,EAAE,gBAAgB;IAKpC,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;yCAxC9B,iBAAiB;2CAAjB,iBAAiB;CA6C7B"}
1
+ {"version":3,"file":"textarea.component.d.ts","sourceRoot":"","sources":["../../../form-field/src/textarea/textarea.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,YAAY,EAIZ,SAAS,EAET,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;;AAEnE,qBAQa,iBAAkB,YAAW,SAAS,EAAE,gBAAgB;IACnE,WAAW,uBAA8B;IACzC,OAAO,CAAC,SAAS,CAAkB;IAE1B,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IAGH,UAAU,EAAE,OAAO,CAAC;IAEpB,IAGI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,EAK1B;IAID,YAAY,EAAE,IAAI,GAAG,KAAK,CAAS;IAInC,WAAW,EAAE,IAAI,GAAG,KAAK,CAAS;IAIlC,SAAS,EAAE,MAAM,CAAC;IAER,cAAc,wBAA+B;IAEvD,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAOzC,QAAQ,CAAC,KAAK,EAAE,MAAM;IAMtB,WAAW,CAAC,MAAM,EAAE,gBAAgB;yCAtDzB,iBAAiB;2CAAjB,iBAAiB;CA0D7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"kirby-icon-settings.d.ts","sourceRoot":"","sources":["../../icon/src/kirby-icon-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQrD,eAAO,MAAM,iBAAiB,EAAE,YA8H/B,CAAC;AAEF,eAAO,MAAM,YAAY,UAAmD,CAAC"}
1
+ {"version":3,"file":"kirby-icon-settings.d.ts","sourceRoot":"","sources":["../../icon/src/kirby-icon-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAOrD,eAAO,MAAM,iBAAiB,EAAE,YA8H/B,CAAC;AAEF,eAAO,MAAM,YAAY,UAAmD,CAAC"}