@koobiq/components 19.4.1 → 19.5.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 (171) hide show
  1. package/LICENSE +1 -1
  2. package/accordion/accordion-content.d.ts +1 -1
  3. package/accordion/accordion-content.directive.d.ts +18 -7
  4. package/accordion/accordion-header.directive.d.ts +2 -2
  5. package/accordion/accordion-item.d.ts +74 -3
  6. package/accordion/accordion-trigger.component.d.ts +15 -2
  7. package/accordion/accordion-trigger.directive.d.ts +9 -5
  8. package/accordion/accordion.component.d.ts +67 -6
  9. package/accordion/accordion.component.scss +9 -27
  10. package/accordion/public-api.d.ts +0 -2
  11. package/checkbox/checkbox.scss +5 -5
  12. package/clamped-text/clamped-list.d.ts +41 -0
  13. package/clamped-text/clamped-text.d.ts +10 -6
  14. package/clamped-text/constants.d.ts +21 -1
  15. package/clamped-text/index.d.ts +1 -0
  16. package/clamped-text/module.d.ts +2 -1
  17. package/code-block/code-block.d.ts +10 -3
  18. package/code-block/code-block.module.d.ts +1 -1
  19. package/code-block/code-block.scss +1 -0
  20. package/code-block/types.d.ts +9 -0
  21. package/core/common-behaviors/flex.d.ts +4 -0
  22. package/core/common-behaviors/index.d.ts +1 -0
  23. package/core/form-field/form-field-ref.d.ts +3 -1
  24. package/core/locales/en-US.d.ts +2 -0
  25. package/core/locales/es-LA.d.ts +2 -0
  26. package/core/locales/locale-service.d.ts +10 -0
  27. package/core/locales/pt-BR.d.ts +2 -0
  28. package/core/locales/ru-RU.d.ts +2 -0
  29. package/core/locales/tk-TM.d.ts +2 -0
  30. package/core/locales/types.d.ts +2 -0
  31. package/core/option/_option-theme.scss +4 -17
  32. package/core/option/option.d.ts +5 -1
  33. package/core/pop-up/pop-up-trigger.d.ts +10 -1
  34. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +2 -2
  35. package/core/styles/common/_overlay.scss +1 -1
  36. package/dropdown/dropdown.component.d.ts +2 -1
  37. package/fesm2022/koobiq-components-accordion.mjs +278 -236
  38. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  39. package/fesm2022/koobiq-components-actions-panel.mjs +10 -10
  40. package/fesm2022/koobiq-components-alert.mjs +16 -16
  41. package/fesm2022/koobiq-components-app-switcher.mjs +19 -19
  42. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  43. package/fesm2022/koobiq-components-autocomplete.mjs +13 -13
  44. package/fesm2022/koobiq-components-badge.mjs +13 -13
  45. package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
  46. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  47. package/fesm2022/koobiq-components-button-toggle.mjs +10 -10
  48. package/fesm2022/koobiq-components-button.mjs +13 -13
  49. package/fesm2022/koobiq-components-checkbox.mjs +11 -11
  50. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  51. package/fesm2022/koobiq-components-clamped-text.mjs +134 -47
  52. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  53. package/fesm2022/koobiq-components-code-block.mjs +35 -16
  54. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  55. package/fesm2022/koobiq-components-content-panel.mjs +28 -28
  56. package/fesm2022/koobiq-components-core.mjs +267 -233
  57. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  58. package/fesm2022/koobiq-components-datepicker.mjs +40 -40
  59. package/fesm2022/koobiq-components-divider.mjs +7 -7
  60. package/fesm2022/koobiq-components-dl.mjs +13 -13
  61. package/fesm2022/koobiq-components-dropdown.mjs +29 -21
  62. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  63. package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
  64. package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
  65. package/fesm2022/koobiq-components-empty-state.mjs +19 -19
  66. package/fesm2022/koobiq-components-file-upload.mjs +39 -39
  67. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  68. package/fesm2022/koobiq-components-filter-bar.mjs +88 -88
  69. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  70. package/fesm2022/koobiq-components-form-field.mjs +68 -63
  71. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  72. package/fesm2022/koobiq-components-icon.mjs +14 -14
  73. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-inline-edit.mjs +26 -16
  75. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-input.mjs +28 -26
  77. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  78. package/fesm2022/koobiq-components-link.mjs +13 -7
  79. package/fesm2022/koobiq-components-link.mjs.map +1 -1
  80. package/fesm2022/koobiq-components-list.mjs +19 -19
  81. package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
  82. package/fesm2022/koobiq-components-markdown.mjs +10 -10
  83. package/fesm2022/koobiq-components-modal.mjs +90 -63
  84. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  85. package/fesm2022/koobiq-components-navbar-ic.mjs +34 -34
  86. package/fesm2022/koobiq-components-navbar.mjs +51 -44
  87. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-notification-center.mjs +16 -16
  89. package/fesm2022/koobiq-components-overflow-items.mjs +29 -17
  90. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  91. package/fesm2022/koobiq-components-popover.mjs +16 -16
  92. package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
  93. package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
  94. package/fesm2022/koobiq-components-radio.mjs +10 -10
  95. package/fesm2022/koobiq-components-resizer.mjs +10 -10
  96. package/fesm2022/koobiq-components-risk-level.mjs +7 -7
  97. package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
  98. package/fesm2022/koobiq-components-search-expandable.mjs +8 -8
  99. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-select.mjs +13 -12
  101. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  102. package/fesm2022/koobiq-components-sidebar.mjs +13 -13
  103. package/fesm2022/koobiq-components-sidepanel.mjs +49 -40
  104. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  105. package/fesm2022/koobiq-components-skeleton.mjs +26 -10
  106. package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
  107. package/fesm2022/koobiq-components-split-button.mjs +7 -7
  108. package/fesm2022/koobiq-components-splitter.mjs +16 -16
  109. package/fesm2022/koobiq-components-table.mjs +10 -10
  110. package/fesm2022/koobiq-components-tabs.mjs +54 -54
  111. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  112. package/fesm2022/koobiq-components-tags.mjs +42 -45
  113. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  114. package/fesm2022/koobiq-components-textarea.mjs +10 -9
  115. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  116. package/fesm2022/koobiq-components-time-range.mjs +24 -24
  117. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  118. package/fesm2022/koobiq-components-timepicker.mjs +10 -10
  119. package/fesm2022/koobiq-components-timezone.mjs +24 -24
  120. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  121. package/fesm2022/koobiq-components-title.mjs +7 -7
  122. package/fesm2022/koobiq-components-toast.mjs +16 -16
  123. package/fesm2022/koobiq-components-toggle.mjs +7 -7
  124. package/fesm2022/koobiq-components-tooltip.mjs +28 -18
  125. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  126. package/fesm2022/koobiq-components-top-bar.mjs +13 -13
  127. package/fesm2022/koobiq-components-tree-select.mjs +10 -9
  128. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  129. package/fesm2022/koobiq-components-tree.mjs +63 -50
  130. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  131. package/fesm2022/koobiq-components-username.mjs +27 -27
  132. package/filter-bar/pipes/pipe-date.scss +3 -15
  133. package/form-field/form-field.d.ts +7 -1
  134. package/form-field/form-field.scss +4 -0
  135. package/icon/icon-button.scss +4 -0
  136. package/inline-edit/inline-edit.d.ts +1 -0
  137. package/input/input-password.d.ts +1 -0
  138. package/input/input.d.ts +1 -0
  139. package/link/_link-theme.scss +15 -7
  140. package/link/link-tokens.scss +2 -0
  141. package/link/link.component.d.ts +4 -1
  142. package/markdown/markdown.component.d.ts +1 -1
  143. package/modal/modal-ref.class.d.ts +1 -0
  144. package/modal/modal.component.d.ts +14 -8
  145. package/modal/modal.scss +1 -0
  146. package/modal/modal.type.d.ts +5 -0
  147. package/navbar/navbar-item.component.d.ts +3 -1
  148. package/overflow-items/overflow-items.d.ts +8 -2
  149. package/package.json +4 -4
  150. package/prebuilt-themes/dark-theme.css +1 -1
  151. package/prebuilt-themes/light-theme.css +1 -1
  152. package/prebuilt-themes/theme.css +1 -1
  153. package/schematics/ng-add/index.js +4 -5
  154. package/select/select.component.d.ts +1 -0
  155. package/sidepanel/_sidepanel-theme.scss +1 -7
  156. package/sidepanel/sidepanel-config.d.ts +4 -1
  157. package/sidepanel/sidepanel.service.d.ts +0 -1
  158. package/skeleton/skeleton.d.ts +5 -0
  159. package/skeleton/skeleton.scss +3 -2
  160. package/tabs/_tabs-common.scss +2 -1
  161. package/tags/tag-input.d.ts +4 -3
  162. package/tags/tag-list.component.d.ts +1 -0
  163. package/textarea/textarea.component.d.ts +1 -0
  164. package/tooltip/tooltip.component.d.ts +2 -0
  165. package/tree/_tree-theme.scss +0 -19
  166. package/tree/tree-option.component.d.ts +9 -3
  167. package/tree/tree-option.scss +2 -5
  168. package/tree/tree-selection.component.d.ts +2 -0
  169. package/tree-select/tree-select.component.d.ts +1 -0
  170. package/accordion/accordion-item.directive.d.ts +0 -72
  171. package/accordion/accordion-root.directive.d.ts +0 -64
@@ -12,7 +12,7 @@ import { KbqButtonModule } from '@koobiq/components/button';
12
12
  import { KbqComponentColors } from '@koobiq/components/core';
13
13
  import * as i5 from '@koobiq/components/icon';
14
14
  import { KbqIconModule } from '@koobiq/components/icon';
15
- import { take, filter } from 'rxjs/operators';
15
+ import { take, switchMap, filter } from 'rxjs/operators';
16
16
  import { Subject } from 'rxjs';
17
17
  import { KbqTitleDirective, KbqTitleModule } from '@koobiq/components/title';
18
18
  import { ComponentPortal } from '@angular/cdk/portal';
@@ -29,16 +29,28 @@ class CssUnitPipe {
29
29
  const formatted = +value;
30
30
  return isNaN(formatted) ? `${value}` : `${formatted}${defaultUnit}`;
31
31
  }
32
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CssUnitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
33
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: CssUnitPipe, isStandalone: true, name: "toCssUnit" }); }
32
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CssUnitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
33
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: CssUnitPipe, isStandalone: true, name: "toCssUnit" }); }
34
34
  }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CssUnitPipe, decorators: [{
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CssUnitPipe, decorators: [{
36
36
  type: Pipe,
37
37
  args: [{
38
38
  name: 'toCssUnit'
39
39
  }]
40
40
  }] });
41
41
 
42
+ var ModalSize;
43
+ (function (ModalSize) {
44
+ ModalSize["Small"] = "small";
45
+ ModalSize["Medium"] = "medium";
46
+ ModalSize["Large"] = "large";
47
+ })(ModalSize || (ModalSize = {}));
48
+ /**
49
+ * Duration when perform animations (ms)
50
+ * @docs-private
51
+ */
52
+ const MODAL_ANIMATE_DURATION = 300;
53
+
42
54
  class KbqModalControlService {
43
55
  // Track singleton afterAllClose through over the injection tree
44
56
  get afterAllClose() {
@@ -95,29 +107,40 @@ class KbqModalControlService {
95
107
  handleMultipleMasks(modalRef) {
96
108
  const modals = Array.from(this.registeredMetaMap.values()).map((v) => v.modalRef);
97
109
  if (modals.filter((modal) => modal.kbqVisible).length > 1) {
98
- const otherModals = modals
110
+ const visibleModalsWithMask = modals
99
111
  .splice(0, modals.length - 1)
100
112
  .filter((modal) => modal.kbqVisible && modal.kbqMask);
101
- // hide other masks
102
- setTimeout(() => {
103
- otherModals.forEach((modal) => {
113
+ // Trigger leave animation on other masks, then disable them after animation completes
114
+ visibleModalsWithMask.forEach((modal) => {
115
+ setTimeout(() => {
116
+ modal.getInstance().animateMaskTo(null);
104
117
  modal.getInstance().kbqMask = false;
105
118
  modal.markForCheck();
106
- });
119
+ }, MODAL_ANIMATE_DURATION);
120
+ modal.getInstance().animateMaskTo('leave');
121
+ modal.markForCheck();
107
122
  });
108
- // show other masks on close
109
- modalRef.afterClose.subscribe(() => {
110
- otherModals.forEach((modal) => {
123
+ // On close, restore other masks with enter animation, then reset animation state after it completes
124
+ modalRef.beforeClose.subscribe(() => {
125
+ visibleModalsWithMask.forEach((modal) => {
126
+ setTimeout(() => {
127
+ modalRef.getInstance().animateMaskTo(null);
128
+ modalRef.getInstance().kbqMask = false;
129
+ modal.getInstance().animateMaskTo(null);
130
+ modal.markForCheck();
131
+ }, MODAL_ANIMATE_DURATION);
132
+ modalRef.getInstance().animateMaskTo('leave');
111
133
  modal.getInstance().kbqMask = true;
134
+ modal.getInstance().animateMaskTo('enter');
112
135
  modal.markForCheck();
113
136
  });
114
137
  });
115
138
  }
116
139
  }
117
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalControlService, deps: [{ token: KbqModalControlService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
118
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalControlService }); }
140
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalControlService, deps: [{ token: KbqModalControlService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
141
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalControlService }); }
119
142
  }
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalControlService, decorators: [{
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalControlService, decorators: [{
121
144
  type: Injectable
122
145
  }], ctorParameters: () => [{ type: KbqModalControlService, decorators: [{
123
146
  type: Optional
@@ -147,18 +170,6 @@ const modalUtilObject = new ModalUtil(
147
170
  // eslint-disable-next-line no-restricted-globals
148
171
  typeof document === 'undefined' ? undefined : document);
149
172
 
150
- var ModalSize;
151
- (function (ModalSize) {
152
- ModalSize["Small"] = "small";
153
- ModalSize["Medium"] = "medium";
154
- ModalSize["Large"] = "large";
155
- })(ModalSize || (ModalSize = {}));
156
-
157
- /**
158
- * Duration when perform animations (ms)
159
- * @docs-private
160
- */
161
- const MODAL_ANIMATE_DURATION = 200;
162
173
  class KbqModalComponent extends KbqModalRef {
163
174
  get kbqVisible() {
164
175
  return this._kbqVisible;
@@ -200,6 +211,10 @@ class KbqModalComponent extends KbqModalRef {
200
211
  get afterOpen() {
201
212
  return this.kbqAfterOpen.asObservable();
202
213
  }
214
+ /** Observable alias for `kbqBeforeClose` */
215
+ get beforeClose() {
216
+ return this.kbqBeforeClose.asObservable();
217
+ }
203
218
  // Observable alias for kbqAfterClose
204
219
  get afterClose() {
205
220
  return this.kbqAfterClose.asObservable();
@@ -238,6 +253,8 @@ class KbqModalComponent extends KbqModalRef {
238
253
  this.kbqAfterOpen = new EventEmitter();
239
254
  // Trigger when modal leave-animation over
240
255
  this.kbqAfterClose = new EventEmitter();
256
+ /** Emitted before the modal begins its closing animation. */
257
+ this.kbqBeforeClose = new EventEmitter();
241
258
  this.kbqOkType = KbqComponentColors.Contrast;
242
259
  this.kbqRestoreFocus = true;
243
260
  this._kbqOkLoading = false;
@@ -454,12 +471,27 @@ class KbqModalComponent extends KbqModalRef {
454
471
  result.then(() => (button.loading = false)).catch(() => (button.loading = false));
455
472
  }
456
473
  }
474
+ /**
475
+ * Sets mask animation classes for the given state, or clears them if state is null.
476
+ * @docs-private
477
+ */
478
+ animateMaskTo(state) {
479
+ this.maskAnimationClassMap = state
480
+ ? {
481
+ [`fade-${state}`]: true,
482
+ [`fade-${state}-active`]: true
483
+ }
484
+ : null;
485
+ }
457
486
  // Do rest things when visible state changed
458
487
  handleVisibleStateChange(visible, animation = true, closeResult) {
459
488
  // Hide scrollbar at the first time when shown up
460
489
  if (visible) {
461
490
  this.changeBodyOverflow(1);
462
491
  }
492
+ else {
493
+ this.kbqBeforeClose.emit(closeResult);
494
+ }
463
495
  return (Promise.resolve(animation && this.animateTo(visible))
464
496
  // Emit open/close event after animations over
465
497
  .then(() => {
@@ -485,20 +517,15 @@ class KbqModalComponent extends KbqModalRef {
485
517
  }
486
518
  changeAnimationState(state) {
487
519
  this.animationState = state;
520
+ this.animateMaskTo(state);
488
521
  if (state) {
489
- this.maskAnimationClassMap = {
490
- [`fade-${state}`]: true,
491
- [`fade-${state}-active`]: true
492
- };
493
522
  this.modalAnimationClassMap = {
494
523
  [`zoom-${state}`]: true,
495
524
  [`zoom-${state}-active`]: true
496
525
  };
497
526
  }
498
527
  else {
499
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
500
- // @ts-ignore
501
- this.maskAnimationClassMap = this.modalAnimationClassMap = null;
528
+ this.modalAnimationClassMap = null;
502
529
  }
503
530
  if (this.contentComponentRef) {
504
531
  this.contentComponentRef.changeDetectorRef.markForCheck();
@@ -580,10 +607,10 @@ class KbqModalComponent extends KbqModalRef {
580
607
  this.renderer.removeStyle(this.document.body, 'overflow');
581
608
  }
582
609
  }
583
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalComponent, deps: [{ token: i1.Overlay }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: KbqModalControlService }, { token: i0.ChangeDetectorRef }, { token: i3.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
584
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: KbqModalComponent, isStandalone: true, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqComponentParams: "kbqComponentParams", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCloseByESC: "kbqCloseByESC", kbqClosable: "kbqClosable", kbqMask: "kbqMask", kbqMaskClosable: "kbqMaskClosable", kbqMaskStyle: "kbqMaskStyle", kbqBodyStyle: "kbqBodyStyle", kbqOkText: "kbqOkText", kbqOkType: "kbqOkType", kbqRestoreFocus: "kbqRestoreFocus", kbqOkLoading: "kbqOkLoading", kbqOnOk: "kbqOnOk", kbqCancelText: "kbqCancelText", kbqCancelLoading: "kbqCancelLoading", kbqOnCancel: "kbqOnCancel", kbqGetContainer: "kbqGetContainer" }, outputs: { kbqVisibleChange: "kbqVisibleChange", kbqAfterOpen: "kbqAfterOpen", kbqAfterClose: "kbqAfterClose", kbqOnOk: "kbqOnOk", kbqOnCancel: "kbqOnCancel" }, host: { listeners: { "keydown": "onKeyDown($event)" }, classAttribute: "kbq-modal" }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, static: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "modalBody", first: true, predicate: ["modalBody"], descendants: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n tabindex=\"-1\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal-container {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div cdkTrapFocus class=\"kbq-modal-content\">\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div kbq-title class=\"kbq-modal-header\" [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n type=\"button\"\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i kbq-icon=\"kbq-xmark_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n }\n </div>\n }\n <div #modalBody class=\"kbq-modal-body kbq-scrollbar\" [ngStyle]=\"kbqBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div class=\"kbq-modal-footer\" [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"kbqBodyStyle\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button kbq-button [attr.autofocus]=\"true\" [color]=\"kbqOkType\" (click)=\"onClickOkCancel('ok')\">\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-container{box-sizing:border-box;position:relative;top:var(--kbq-size-5xl);border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal-container.zoom-enter,.kbq-modal-container.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal-container.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal-container.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal-container.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal-container .kbq-modal-close{position:absolute;top:var(--kbq-size-l);right:var(--kbq-size-l)}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;padding-top:var(--kbq-size-3xs);padding-bottom:var(--kbq-size-3xs)}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);overflow-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal-container{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal-container .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal-container .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal-container .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal-container .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal-container .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-style:var(--kbq-typography-title-font-style);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-6xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 1px;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i4.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i4.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i5.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
610
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalComponent, deps: [{ token: i1.Overlay }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: KbqModalControlService }, { token: i0.ChangeDetectorRef }, { token: i3.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
611
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: KbqModalComponent, isStandalone: true, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqComponentParams: "kbqComponentParams", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCloseByESC: "kbqCloseByESC", kbqClosable: "kbqClosable", kbqMask: "kbqMask", kbqMaskClosable: "kbqMaskClosable", kbqMaskStyle: "kbqMaskStyle", kbqBodyStyle: "kbqBodyStyle", kbqOkText: "kbqOkText", kbqOkType: "kbqOkType", kbqRestoreFocus: "kbqRestoreFocus", kbqOkLoading: "kbqOkLoading", kbqOnOk: "kbqOnOk", kbqCancelText: "kbqCancelText", kbqCancelLoading: "kbqCancelLoading", kbqOnCancel: "kbqOnCancel", kbqGetContainer: "kbqGetContainer" }, outputs: { kbqVisibleChange: "kbqVisibleChange", kbqAfterOpen: "kbqAfterOpen", kbqAfterClose: "kbqAfterClose", kbqBeforeClose: "kbqBeforeClose", kbqOnOk: "kbqOnOk", kbqOnCancel: "kbqOnCancel" }, host: { listeners: { "keydown": "onKeyDown($event)" }, classAttribute: "kbq-modal" }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, static: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "modalBody", first: true, predicate: ["modalBody"], descendants: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n tabindex=\"-1\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal-container {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div cdkTrapFocus class=\"kbq-modal-content\">\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div kbq-title class=\"kbq-modal-header\" [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n type=\"button\"\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i kbq-icon=\"kbq-xmark_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n }\n </div>\n }\n <div #modalBody class=\"kbq-modal-body kbq-scrollbar\" [ngStyle]=\"kbqBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div class=\"kbq-modal-footer\" [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"kbqBodyStyle\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button kbq-button [attr.autofocus]=\"true\" [color]=\"kbqOkType\" (click)=\"onClickOkCancel('ok')\">\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}@keyframes mcFadeIn{0%{opacity:0}to{opacity:1}}@keyframes mcFadeOut{0%{opacity:1}to{opacity:0}}@keyframes mcZoomIn{0%{opacity:0;transform:translateY(-25%)}to{opacity:1;transform:scale(1)}}@keyframes mcZoomOut{0%{transform:scale(1)}to{opacity:0;transform:translateY(-30%)}}.fade-enter,.fade-appear,.fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.fade-enter.fade-enter-active,.fade-appear.fade-appear-active{animation-name:mcFadeIn;animation-play-state:running}.fade-leave.fade-leave-active{animation-name:mcFadeOut;animation-play-state:running;pointer-events:none}.className-enter,.className-appear{opacity:0;animation-timing-function:ease-out}.className-leave{animation-timing-function:ease-out}.zoom-enter,.zoom-appear,.zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.zoom-enter.zoom-enter-active,.zoom-appear.zoom-appear-active{animation-name:mcZoomIn;animation-play-state:running}.zoom-leave.zoom-leave-active{animation-name:mcZoomOut;animation-play-state:running;pointer-events:none}.className-enter,.className-appear{transform:translateY(-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.className-leave{transform:translate(0);animation-timing-function:cubic-bezier(.785,.135,.15,.86)}.kbq-modal-container{box-sizing:border-box;position:relative;top:var(--kbq-size-5xl);border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal-container.zoom-enter,.kbq-modal-container.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal-container.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal-container.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal-container.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal-container .kbq-modal-close{position:absolute;top:var(--kbq-size-l);right:var(--kbq-size-l)}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;padding-top:var(--kbq-size-3xs);padding-bottom:var(--kbq-size-3xs)}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);overflow-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal-container{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal-container .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal-container .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal-container .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal-container .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal-container .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-style:var(--kbq-typography-title-font-style);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-6xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 1px;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i4.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i4.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i5.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
585
612
  }
586
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalComponent, decorators: [{
613
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalComponent, decorators: [{
587
614
  type: Component,
588
615
  args: [{ selector: 'kbq-modal', imports: [
589
616
  CdkTrapFocus,
@@ -596,7 +623,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
596
623
  ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
597
624
  class: 'kbq-modal',
598
625
  '(keydown)': 'onKeyDown($event)'
599
- }, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n tabindex=\"-1\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal-container {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div cdkTrapFocus class=\"kbq-modal-content\">\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div kbq-title class=\"kbq-modal-header\" [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n type=\"button\"\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i kbq-icon=\"kbq-xmark_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n }\n </div>\n }\n <div #modalBody class=\"kbq-modal-body kbq-scrollbar\" [ngStyle]=\"kbqBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div class=\"kbq-modal-footer\" [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"kbqBodyStyle\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button kbq-button [attr.autofocus]=\"true\" [color]=\"kbqOkType\" (click)=\"onClickOkCancel('ok')\">\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-container{box-sizing:border-box;position:relative;top:var(--kbq-size-5xl);border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal-container.zoom-enter,.kbq-modal-container.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal-container.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal-container.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal-container.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal-container .kbq-modal-close{position:absolute;top:var(--kbq-size-l);right:var(--kbq-size-l)}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;padding-top:var(--kbq-size-3xs);padding-bottom:var(--kbq-size-3xs)}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);overflow-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal-container{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal-container .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal-container .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal-container .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal-container .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal-container .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-style:var(--kbq-typography-title-font-style);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-6xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 1px;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"] }]
626
+ }, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n tabindex=\"-1\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal-container {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div cdkTrapFocus class=\"kbq-modal-content\">\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div kbq-title class=\"kbq-modal-header\" [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n type=\"button\"\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i kbq-icon=\"kbq-xmark_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n }\n </div>\n }\n <div #modalBody class=\"kbq-modal-body kbq-scrollbar\" [ngStyle]=\"kbqBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div class=\"kbq-modal-footer\" [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"kbqBodyStyle\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button kbq-button [attr.autofocus]=\"true\" [color]=\"kbqOkType\" (click)=\"onClickOkCancel('ok')\">\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}@keyframes mcFadeIn{0%{opacity:0}to{opacity:1}}@keyframes mcFadeOut{0%{opacity:1}to{opacity:0}}@keyframes mcZoomIn{0%{opacity:0;transform:translateY(-25%)}to{opacity:1;transform:scale(1)}}@keyframes mcZoomOut{0%{transform:scale(1)}to{opacity:0;transform:translateY(-30%)}}.fade-enter,.fade-appear,.fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.fade-enter.fade-enter-active,.fade-appear.fade-appear-active{animation-name:mcFadeIn;animation-play-state:running}.fade-leave.fade-leave-active{animation-name:mcFadeOut;animation-play-state:running;pointer-events:none}.className-enter,.className-appear{opacity:0;animation-timing-function:ease-out}.className-leave{animation-timing-function:ease-out}.zoom-enter,.zoom-appear,.zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.zoom-enter.zoom-enter-active,.zoom-appear.zoom-appear-active{animation-name:mcZoomIn;animation-play-state:running}.zoom-leave.zoom-leave-active{animation-name:mcZoomOut;animation-play-state:running;pointer-events:none}.className-enter,.className-appear{transform:translateY(-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.className-leave{transform:translate(0);animation-timing-function:cubic-bezier(.785,.135,.15,.86)}.kbq-modal-container{box-sizing:border-box;position:relative;top:var(--kbq-size-5xl);border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal-container.zoom-enter,.kbq-modal-container.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal-container.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal-container.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal-container.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal-container .kbq-modal-close{position:absolute;top:var(--kbq-size-l);right:var(--kbq-size-l)}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;padding-top:var(--kbq-size-3xs);padding-bottom:var(--kbq-size-3xs)}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);overflow-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal-container{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal-container .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal-container .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal-container .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal-container .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal-container .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-style:var(--kbq-typography-title-font-style);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-6xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 1px;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"] }]
600
627
  }], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Renderer2 }, { type: i0.ComponentFactoryResolver }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: KbqModalControlService }, { type: i0.ChangeDetectorRef }, { type: i3.FocusMonitor }], propDecorators: { kbqModalType: [{
601
628
  type: Input
602
629
  }], kbqComponent: [{
@@ -639,6 +666,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
639
666
  type: Output
640
667
  }], kbqAfterClose: [{
641
668
  type: Output
669
+ }], kbqBeforeClose: [{
670
+ type: Output
642
671
  }], kbqOkText: [{
643
672
  type: Input
644
673
  }], kbqOkType: [{
@@ -685,8 +714,8 @@ class KbqModalTitle {
685
714
  constructor(modal) {
686
715
  this.modal = modal;
687
716
  }
688
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalTitle, deps: [{ token: KbqModalComponent }], target: i0.ɵɵFactoryTarget.Component }); }
689
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: KbqModalTitle, isStandalone: true, selector: "[kbq-modal-title], kbq-modal-title, [kbqModalTitle]", host: { properties: { "class.kbq-modal-header_closable": "modal.kbqClosable" }, classAttribute: "kbq-modal-header" }, ngImport: i0, template: `
717
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalTitle, deps: [{ token: KbqModalComponent }], target: i0.ɵɵFactoryTarget.Component }); }
718
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: KbqModalTitle, isStandalone: true, selector: "[kbq-modal-title], kbq-modal-title, [kbqModalTitle]", host: { properties: { "class.kbq-modal-header_closable": "modal.kbqClosable" }, classAttribute: "kbq-modal-header" }, ngImport: i0, template: `
690
719
  <div class="kbq-modal-title" kbq-title>
691
720
  <ng-content />
692
721
  </div>
@@ -704,7 +733,7 @@ class KbqModalTitle {
704
733
  }
705
734
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i5.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i4.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i4.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }] }); }
706
735
  }
707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalTitle, decorators: [{
736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalTitle, decorators: [{
708
737
  type: Component,
709
738
  args: [{
710
739
  selector: `[kbq-modal-title], kbq-modal-title, [kbqModalTitle]`,
@@ -737,10 +766,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
737
766
  }]
738
767
  }], ctorParameters: () => [{ type: KbqModalComponent }] });
739
768
  class KbqModalBody {
740
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalBody, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
741
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: KbqModalBody, isStandalone: true, selector: "[kbq-modal-body], kbq-modal-body, [kbqModalBody]", host: { classAttribute: "kbq-modal-body" }, ngImport: i0 }); }
769
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalBody, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
770
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: KbqModalBody, isStandalone: true, selector: "[kbq-modal-body], kbq-modal-body, [kbqModalBody]", host: { classAttribute: "kbq-modal-body" }, ngImport: i0 }); }
742
771
  }
743
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalBody, decorators: [{
772
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalBody, decorators: [{
744
773
  type: Directive,
745
774
  args: [{
746
775
  selector: `[kbq-modal-body], kbq-modal-body, [kbqModalBody]`,
@@ -750,10 +779,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
750
779
  }]
751
780
  }] });
752
781
  class KbqModalFooter {
753
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
754
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: KbqModalFooter, isStandalone: true, selector: "[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]", host: { classAttribute: "kbq-modal-footer" }, ngImport: i0 }); }
782
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
783
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: KbqModalFooter, isStandalone: true, selector: "[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]", host: { classAttribute: "kbq-modal-footer" }, ngImport: i0 }); }
755
784
  }
756
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalFooter, decorators: [{
785
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalFooter, decorators: [{
757
786
  type: Directive,
758
787
  args: [{
759
788
  selector: `[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]`,
@@ -763,10 +792,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
763
792
  }]
764
793
  }] });
765
794
  class KbqModalMainAction {
766
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalMainAction, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
767
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: KbqModalMainAction, isStandalone: true, selector: "[kbq-modal-main-action]", ngImport: i0 }); }
795
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalMainAction, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
796
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.19", type: KbqModalMainAction, isStandalone: true, selector: "[kbq-modal-main-action]", ngImport: i0 }); }
768
797
  }
769
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalMainAction, decorators: [{
798
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalMainAction, decorators: [{
770
799
  type: Directive,
771
800
  args: [{
772
801
  selector: `[kbq-modal-main-action]`
@@ -789,14 +818,12 @@ class ModalBuilderForService {
789
818
  options.kbqGetContainer = undefined;
790
819
  }
791
820
  this.changeProps(options);
821
+ // Defers ESC handling until the modal is fully open, avoiding premature close during the opening animation.
822
+ this.modalRef.instance.kbqAfterOpen.pipe(switchMap(() => this.overlayRef.keydownEvents()), filter((event) => {
823
+ return !!(event.keyCode === ESCAPE && options.kbqCloseByESC);
824
+ })).subscribe(() => this.getInstance()?.handleCloseResult('cancel', () => true));
792
825
  this.modalRef.instance.open();
793
826
  this.modalRef.instance.kbqAfterClose.subscribe(() => this.destroyModal());
794
- this.overlayRef
795
- .keydownEvents()
796
- .pipe(filter((event) => {
797
- return !!(event.keyCode === ESCAPE && options.kbqCloseByESC);
798
- }))
799
- .subscribe(() => this.getInstance()?.handleCloseResult('cancel', () => true));
800
827
  }
801
828
  getInstance() {
802
829
  return this.modalRef && this.modalRef.instance;
@@ -891,16 +918,16 @@ class KbqModalService {
891
918
  delete(options = {}) {
892
919
  return this.confirm(options, 'warn');
893
920
  }
894
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalService, deps: [{ token: i1.Overlay }, { token: KbqModalControlService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
895
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalService }); }
921
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalService, deps: [{ token: i1.Overlay }, { token: KbqModalControlService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
922
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalService }); }
896
923
  }
897
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalService, decorators: [{
924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalService, decorators: [{
898
925
  type: Injectable
899
926
  }], ctorParameters: () => [{ type: i1.Overlay }, { type: KbqModalControlService }, { type: i0.Injector }] });
900
927
 
901
928
  class KbqModalModule {
902
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
903
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: KbqModalModule, imports: [OverlayModule,
929
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
930
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: KbqModalModule, imports: [OverlayModule,
904
931
  A11yModule,
905
932
  KbqButtonModule,
906
933
  KbqIconModule,
@@ -918,7 +945,7 @@ class KbqModalModule {
918
945
  KbqModalBody,
919
946
  KbqModalFooter,
920
947
  KbqModalMainAction] }); }
921
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalModule, providers: [
948
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalModule, providers: [
922
949
  KbqModalControlService,
923
950
  KbqModalService,
924
951
  { provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }
@@ -930,7 +957,7 @@ class KbqModalModule {
930
957
  KbqModalComponent,
931
958
  KbqModalTitle] }); }
932
959
  }
933
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: KbqModalModule, decorators: [{
960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: KbqModalModule, decorators: [{
934
961
  type: NgModule,
935
962
  args: [{
936
963
  imports: [