@koobiq/components 20.1.0 → 20.3.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 (249) hide show
  1. package/accordion/_accordion-theme.scss +6 -2
  2. package/accordion/accordion-tokens.scss +3 -0
  3. package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +10 -0
  4. package/accordion/accordion.scss +71 -0
  5. package/accordion/index.d.ts +264 -121
  6. package/actions-panel/index.d.ts +25 -13
  7. package/alert/_alert-theme.scss +14 -0
  8. package/alert/alert.component.scss +24 -13
  9. package/alert/index.d.ts +63 -29
  10. package/app-switcher/app-switcher-dropdown-app.scss +7 -5
  11. package/app-switcher/app-switcher-dropdown-site.scss +6 -4
  12. package/app-switcher/index.d.ts +41 -4
  13. package/app-switcher/kbq-app-switcher-list-item.scss +6 -8
  14. package/autocomplete/autocomplete.scss +2 -1
  15. package/autocomplete/index.d.ts +58 -37
  16. package/badge/index.d.ts +2 -3
  17. package/breadcrumbs/index.d.ts +1 -1
  18. package/button/index.d.ts +2 -2
  19. package/button-toggle/button-toggle-tokens.scss +2 -0
  20. package/button-toggle/button-toggle.scss +9 -0
  21. package/button-toggle/index.d.ts +5 -0
  22. package/checkbox/index.d.ts +33 -29
  23. package/clamped-text/index.d.ts +3 -2
  24. package/code-block/index.d.ts +24 -19
  25. package/content-panel/index.d.ts +1 -1
  26. package/core/index.d.ts +1217 -186
  27. package/core/option/_action-container-mixins.scss +28 -0
  28. package/core/option/_option-theme.scss +24 -0
  29. package/core/option/action.scss +7 -0
  30. package/core/styles/_core.scss +2 -0
  31. package/core/styles/_koobiq-theme.scss +2 -0
  32. package/core/styles/_tokens.scss +1 -0
  33. package/core/styles/common/_animation.scss +31 -24
  34. package/core/styles/common/_connected-overlay.scss +39 -0
  35. package/core/styles/common/_select.scss +19 -2
  36. package/core/styles/common/_tokens.scss +0 -9
  37. package/core/styles/theming/_index.scss +0 -1
  38. package/core/styles/theming/_theming.scss +34 -5
  39. package/datepicker/index.d.ts +46 -15
  40. package/dl/dl.scss +26 -0
  41. package/dl/index.d.ts +8 -1
  42. package/dropdown/_dropdown-theme.scss +28 -2
  43. package/dropdown/dropdown-item.scss +29 -0
  44. package/dropdown/dropdown-tokens.scss +2 -1
  45. package/dropdown/dropdown.scss +16 -1
  46. package/dropdown/index.d.ts +331 -17
  47. package/dynamic-translation/index.d.ts +1 -1
  48. package/fesm2022/koobiq-components-accordion.mjs +480 -317
  49. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  50. package/fesm2022/koobiq-components-actions-panel.mjs +57 -46
  51. package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
  52. package/fesm2022/koobiq-components-alert.mjs +98 -58
  53. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  54. package/fesm2022/koobiq-components-app-switcher.mjs +233 -38
  55. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  56. package/fesm2022/koobiq-components-autocomplete.mjs +89 -52
  57. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  58. package/fesm2022/koobiq-components-badge.mjs +18 -17
  59. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  60. package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
  61. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  62. package/fesm2022/koobiq-components-button-toggle.mjs +17 -12
  63. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  64. package/fesm2022/koobiq-components-button.mjs +25 -25
  65. package/fesm2022/koobiq-components-checkbox.mjs +69 -92
  66. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  67. package/fesm2022/koobiq-components-clamped-text.mjs +18 -13
  68. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  69. package/fesm2022/koobiq-components-code-block.mjs +56 -69
  70. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  71. package/fesm2022/koobiq-components-content-panel.mjs +29 -29
  72. package/fesm2022/koobiq-components-core.mjs +2485 -735
  73. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-datepicker.mjs +168 -126
  75. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-divider.mjs +7 -7
  77. package/fesm2022/koobiq-components-dl.mjs +23 -15
  78. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  79. package/fesm2022/koobiq-components-dropdown.mjs +814 -136
  80. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  81. package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
  82. package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
  83. package/fesm2022/koobiq-components-empty-state.mjs +19 -19
  84. package/fesm2022/koobiq-components-file-upload.mjs +74 -42
  85. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-filter-bar.mjs +783 -199
  87. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-flag.mjs +7 -7
  89. package/fesm2022/koobiq-components-form-field.mjs +350 -162
  90. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  91. package/fesm2022/koobiq-components-icon.mjs +52 -25
  92. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  93. package/fesm2022/koobiq-components-inline-edit.mjs +175 -28
  94. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  95. package/fesm2022/koobiq-components-input.mjs +41 -24
  96. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  97. package/fesm2022/koobiq-components-link.mjs +8 -8
  98. package/fesm2022/koobiq-components-list.mjs +657 -143
  99. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
  101. package/fesm2022/koobiq-components-markdown.mjs +14 -11
  102. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  103. package/fesm2022/koobiq-components-modal.mjs +59 -35
  104. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  105. package/fesm2022/koobiq-components-navbar.mjs +177 -67
  106. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  107. package/fesm2022/koobiq-components-notification-center.mjs +40 -24
  108. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  109. package/fesm2022/koobiq-components-overflow-items.mjs +16 -17
  110. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  111. package/fesm2022/koobiq-components-popover.mjs +31 -21
  112. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  113. package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
  114. package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
  115. package/fesm2022/koobiq-components-radio.mjs +10 -10
  116. package/fesm2022/koobiq-components-resizer.mjs +33 -14
  117. package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
  118. package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
  119. package/fesm2022/koobiq-components-search-expandable.mjs +49 -14
  120. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  121. package/fesm2022/koobiq-components-select.mjs +450 -146
  122. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  123. package/fesm2022/koobiq-components-sidebar.mjs +14 -14
  124. package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
  125. package/fesm2022/koobiq-components-skeleton.mjs +10 -10
  126. package/fesm2022/koobiq-components-split-button.mjs +10 -17
  127. package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
  128. package/fesm2022/koobiq-components-splitter.mjs +17 -17
  129. package/fesm2022/koobiq-components-table.mjs +15 -13
  130. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  131. package/fesm2022/koobiq-components-tabs.mjs +80 -68
  132. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  133. package/fesm2022/koobiq-components-tags.mjs +283 -122
  134. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  135. package/fesm2022/koobiq-components-textarea.mjs +13 -8
  136. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  137. package/fesm2022/koobiq-components-time-range.mjs +29 -24
  138. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  139. package/fesm2022/koobiq-components-timepicker.mjs +61 -30
  140. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  141. package/fesm2022/koobiq-components-timezone.mjs +77 -42
  142. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  143. package/fesm2022/koobiq-components-title.mjs +7 -7
  144. package/fesm2022/koobiq-components-toast.mjs +51 -26
  145. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  146. package/fesm2022/koobiq-components-toggle.mjs +72 -64
  147. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  148. package/fesm2022/koobiq-components-tooltip.mjs +219 -28
  149. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  150. package/fesm2022/koobiq-components-top-bar.mjs +13 -13
  151. package/fesm2022/koobiq-components-tree-select.mjs +222 -80
  152. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  153. package/fesm2022/koobiq-components-tree.mjs +302 -81
  154. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  155. package/fesm2022/koobiq-components-username.mjs +27 -27
  156. package/file-upload/index.d.ts +25 -6
  157. package/file-upload/multiple-file-upload.component.scss +14 -0
  158. package/filter-bar/_filter-bar-theme.scss +0 -10
  159. package/filter-bar/filter-bar-tokens.scss +3 -0
  160. package/filter-bar/filters.scss +3 -2
  161. package/filter-bar/index.d.ts +281 -9
  162. package/filter-bar/pipes/base-pipe.scss +0 -11
  163. package/filter-bar/pipes/pipe-input.scss +10 -0
  164. package/filter-bar/pipes/pipe-multi-tree-select.scss +0 -6
  165. package/filter-bar/pipes/pipe-multiselect.scss +0 -6
  166. package/filter-bar/pipes/pipe-tree-select.scss +0 -6
  167. package/form-field/_form-field-theme.scss +76 -20
  168. package/form-field/fieldset.scss +10 -0
  169. package/form-field/form-field-tokens.scss +15 -1
  170. package/form-field/form-field.scss +15 -19
  171. package/form-field/index.d.ts +147 -65
  172. package/icon/icon-button.scss +3 -1
  173. package/icon/index.d.ts +45 -7
  174. package/inline-edit/index.d.ts +57 -4
  175. package/inline-edit/inline-edit.scss +10 -0
  176. package/input/index.d.ts +17 -2
  177. package/list/_list-theme.scss +42 -10
  178. package/list/index.d.ts +326 -79
  179. package/list/list-tokens.scss +43 -8
  180. package/list/list.scss +186 -12
  181. package/markdown/index.d.ts +1 -1
  182. package/modal/index.d.ts +21 -4
  183. package/modal/modal-tokens.scss +1 -1
  184. package/navbar/_navbar-item_vertical.scss +7 -5
  185. package/navbar/index.d.ts +54 -5
  186. package/navbar/navbar-brand.scss +23 -7
  187. package/navbar/vertical-navbar.scss +6 -0
  188. package/notification-center/index.d.ts +2 -1
  189. package/notification-center/notification-item.scss +6 -0
  190. package/package.json +3 -6
  191. package/popover/index.d.ts +2 -2
  192. package/prebuilt-themes/dark-theme.css +1 -1
  193. package/prebuilt-themes/light-theme.css +1 -1
  194. package/prebuilt-themes/theme.css +1 -1
  195. package/resizer/index.d.ts +12 -0
  196. package/schematics/collection.json +10 -0
  197. package/schematics/migrations/alert-signals/README.md +64 -0
  198. package/schematics/migrations/alert-signals/data.js +70 -0
  199. package/schematics/migrations/alert-signals/index.js +350 -0
  200. package/schematics/migrations/alert-signals/schema.json +20 -0
  201. package/schematics/migrations/autocomplete-panel-width-auto/README.md +68 -0
  202. package/schematics/migrations/autocomplete-panel-width-auto/index.js +70 -0
  203. package/schematics/migrations/autocomplete-panel-width-auto/schema.json +15 -0
  204. package/schematics/migrations/deprecated-icons/README.md +29 -4
  205. package/schematics/migrations/deprecated-icons/data.js +7 -0
  206. package/schematics/migrations/deprecated-icons/index.js +62 -35
  207. package/schematics/migrations/filter-bar-signals/README.md +1 -1
  208. package/schematics/migrations/new-icons-pack/README.md +37 -2
  209. package/schematics/migrations/new-icons-pack/data.js +8 -0
  210. package/schematics/migrations/new-icons-pack/index.js +144 -53
  211. package/schematics/migrations.json +11 -1
  212. package/schematics/ng-add/index.js +3 -3
  213. package/schematics/utils/angular-parsing.js +41 -14
  214. package/schematics/utils/ast.js +31 -0
  215. package/schematics/utils/icon-migration.js +530 -0
  216. package/schematics/utils/typescript.js +44 -0
  217. package/scrollbar/index.d.ts +1 -1
  218. package/search-expandable/index.d.ts +3 -0
  219. package/select/index.d.ts +212 -40
  220. package/select/select-tokens.scss +0 -1
  221. package/select/select.scss +0 -2
  222. package/splitter/index.d.ts +1 -1
  223. package/table/_table-theme.scss +4 -0
  224. package/table/index.d.ts +2 -1
  225. package/table/table.scss +8 -0
  226. package/tabs/_tabs-common.scss +60 -31
  227. package/tabs/_tabs-theme.scss +12 -0
  228. package/tabs/index.d.ts +2 -2
  229. package/tabs/tab-header.scss +14 -0
  230. package/tabs/tab-nav-bar.scss +4 -0
  231. package/tabs/tabs-tokens.scss +1 -0
  232. package/tags/index.d.ts +128 -29
  233. package/textarea/index.d.ts +5 -0
  234. package/time-range/index.d.ts +1 -1
  235. package/timepicker/index.d.ts +4 -0
  236. package/timezone/index.d.ts +10 -8
  237. package/toast/index.d.ts +26 -3
  238. package/toggle/index.d.ts +34 -14
  239. package/tooltip/index.d.ts +119 -7
  240. package/tree/_tree-theme.scss +25 -5
  241. package/tree/index.d.ts +71 -3
  242. package/tree/tree-option.scss +2 -8
  243. package/tree-select/_tree-select-theme.scss +22 -0
  244. package/tree-select/index.d.ts +127 -36
  245. package/accordion/accordion.component.scss +0 -50
  246. package/core/styles/_tokens.kbq.import.scss +0 -4
  247. package/core/styles/theming/_components-theming.scss +0 -1927
  248. package/filter-bar/pipes/pipe-select.scss +0 -5
  249. package/overflow-items/overflow-items.scss +0 -20
@@ -65,14 +65,17 @@ class KbqMarkdownService {
65
65
  });
66
66
  });
67
67
  MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS.forEach((tag) => {
68
- transformed = transformed.replace(new RegExp(`<${tag}\s*>`, 'g'), (_match) => `<${tag} class="${CLASS_PREFIX}__${tag}">`);
68
+ transformed = transformed.replace(
69
+ // `\\s`, because a template literal eats the backslash first: `\s` would reach the
70
+ // constructor as a bare `s` and match `<pss>` rather than `<p >`.
71
+ new RegExp(`<${tag}\\s*>`, 'g'), (_match) => `<${tag} class="${CLASS_PREFIX}__${tag}">`);
69
72
  });
70
73
  return transformed;
71
74
  }
72
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMarkdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
73
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMarkdownService }); }
75
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMarkdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
76
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMarkdownService }); }
74
77
  }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMarkdownService, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMarkdownService, decorators: [{
76
79
  type: Injectable
77
80
  }] });
78
81
 
@@ -141,13 +144,13 @@ class KbqMarkdown {
141
144
  this.links.forEach((link) => this.focusMonitor.stopMonitoring(link));
142
145
  this.links.length = 0;
143
146
  }
144
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMarkdown, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
145
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.25", type: KbqMarkdown, isStandalone: true, selector: "kbq-markdown", inputs: { markdownText: "markdownText" }, host: { classAttribute: "kbq-markdown" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }, { propertyName: "outputWrapper", first: true, predicate: ["outputWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: `
147
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMarkdown, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
148
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.30", type: KbqMarkdown, isStandalone: true, selector: "kbq-markdown", inputs: { markdownText: "markdownText" }, host: { classAttribute: "kbq-markdown" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }, { propertyName: "outputWrapper", first: true, predicate: ["outputWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: `
146
149
  <pre #contentWrapper class="kbq-markdown__input" ngPreserveWhitespaces><ng-content /></pre>
147
150
  <div #outputWrapper class="kbq-markdown__output" [innerHtml]="resultHtml()"></div>
148
151
  `, isInline: true, styles: ["@charset \"UTF-8\";.kbq-markdown{display:block}.kbq-markdown .kbq-markdown__input{display:none}.kbq-markdown .kbq-markdown__output{flex:1}.kbq-markdown .kbq-markdown__output>:first-child{margin-top:0}.kbq-markdown .kbq-markdown__output>:last-child{margin-bottom:0}.kbq-markdown .kbq-markdown__h1{margin-top:var(--kbq-markdown-h1-size-margin-top);margin-bottom:var(--kbq-markdown-h1-size-margin-bottom)}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h1+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h2{margin-top:var(--kbq-markdown-h2-size-margin-top);margin-bottom:var(--kbq-markdown-h2-size-margin-bottom)}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h2+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h3{margin-top:var(--kbq-markdown-h3-size-margin-top);margin-bottom:var(--kbq-markdown-h3-size-margin-bottom)}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h3+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h4{margin-top:var(--kbq-markdown-h4-size-margin-top);margin-bottom:var(--kbq-markdown-h4-size-margin-bottom)}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h4+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h5{margin-top:var(--kbq-markdown-h5-size-margin-top);margin-bottom:var(--kbq-markdown-h5-size-margin-bottom)}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h5+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__h6{margin-top:var(--kbq-markdown-h6-size-margin-top);margin-bottom:var(--kbq-markdown-h6-size-margin-bottom)}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h1{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h2{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h3{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h4{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h5{margin-top:0}.kbq-markdown .kbq-markdown__h6+.kbq-markdown__h6{margin-top:0}.kbq-markdown .kbq-markdown__p{margin-top:var(--kbq-markdown-p-size-margin-top);margin-bottom:var(--kbq-markdown-p-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul,.kbq-markdown .kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top);margin-bottom:var(--kbq-markdown-list-size-margin-bottom)}.kbq-markdown .kbq-markdown__ul>li,.kbq-markdown .kbq-markdown__ol>li{margin-bottom:var(--kbq-markdown-list-size-item-margin-bottom)}.kbq-markdown .kbq-markdown__ul{position:relative;list-style:none;padding:var(--kbq-markdown-list-size-ul-padding)}.kbq-markdown .kbq-markdown__ul>li:before{content:\"\\2014\";display:block;position:absolute;width:24px;text-align:left;left:0}.kbq-markdown .kbq-markdown__ol{list-style:none;padding:0;counter-reset:li}.kbq-markdown .kbq-markdown__ol>li:before{content:counter(li) \".\";counter-increment:li;padding-right:var(--kbq-markdown-list-size-ol-number-padding-right)}.kbq-markdown .kbq-markdown__ol>li>*{display:inline-block}.kbq-markdown .kbq-markdown__p+.kbq-markdown__ul,.kbq-markdown .kbq-markdown__p+.kbq-markdown__ol{margin-top:var(--kbq-markdown-list-size-margin-top-after-paragraph)}.kbq-markdown .kbq-markdown__blockquote{margin-top:var(--kbq-markdown-blockquote-size-margin-top);margin-left:0;margin-bottom:var(--kbq-markdown-blockquote-size-margin-bottom);margin-right:0;border-left-width:var(--kbq-markdown-blockquote-size-line-width);border-left-style:solid;padding:var(--kbq-markdown-blockquote-size-padding)}.kbq-markdown .kbq-markdown__blockquote>.kbq-markdown__p{margin-top:0;margin-bottom:0}.kbq-markdown .kbq-markdown__pre{position:relative;overflow-x:auto;margin-top:var(--kbq-markdown-code-size-multiline-margin-top);margin-bottom:var(--kbq-markdown-code-size-multiline-margin-bottom);padding:var(--kbq-markdown-code-size-multiline-padding)}.kbq-markdown .kbq-markdown__pre,.kbq-markdown .kbq-markdown__code{border-radius:var(--kbq-markdown-code-size-border-radius)}.kbq-markdown .kbq-markdown__code:not(.kbq-markdown__pre>.kbq-markdown__code){white-space:nowrap;padding:var(--kbq-markdown-code-size-inline-padding)}.kbq-markdown .kbq-markdown__img{max-width:100%;margin-top:var(--kbq-markdown-image-size-margin-top);margin-bottom:var(--kbq-markdown-image-size-margin-bottom)}.kbq-markdown .kbq-markdown__img+em{display:block;margin-top:var(--kbq-markdown-image-size-caption-margin-top);margin-bottom:var(--kbq-markdown-image-size-caption-margin-bottom)}.kbq-markdown .kbq-markdown__hr{border-top:none;border-left:none;border-right:none;border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-hr-size-width);margin:var(--kbq-markdown-hr-size-margin-vertical) 0}.kbq-markdown .kbq-markdown__table{max-width:100%;overflow-x:auto;display:table;border-collapse:collapse;margin-bottom:var(--kbq-markdown-table-size-margin-bottom)}.kbq-markdown .kbq-markdown__table td{vertical-align:top}.kbq-markdown .kbq-markdown__table th,.kbq-markdown .kbq-markdown__table td{padding:var(--kbq-markdown-table-size-padding);font-weight:400}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead{border-bottom-style:solid;border-bottom-width:var(--kbq-markdown-table-size-border-width);text-align:left}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__thead th:last-child{padding-right:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:first-child{padding-left:0}.kbq-markdown .kbq-markdown__table>.kbq-markdown__tbody td:last-child{padding-right:0}\n", ".kbq-markdown{--kbq-markdown-bg: transparent;--kbq-markdown-h1-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h1-size-margin-top: 0;--kbq-markdown-h1-size-margin-bottom: var(--kbq-size-l);--kbq-markdown-h2-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h2-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h2-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h3-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h3-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h3-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h4-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h4-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h4-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-h5-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h5-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h5-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-h6-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-h6-size-margin-top: var(--kbq-size-xxl);--kbq-markdown-h6-size-margin-bottom: var(--kbq-size-s);--kbq-markdown-p-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-p-size-margin-top: var(--kbq-size-m);--kbq-markdown-p-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-list-size-margin-top: var(--kbq-size-m);--kbq-markdown-list-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-list-size-margin-top-after-paragraph: calc(-1 * var(--kbq-size-s));--kbq-markdown-list-size-ol-number-padding-right: var(--kbq-size-xxs);--kbq-markdown-list-size-ul-padding: 0 0 0 var(--kbq-size-xxl);--kbq-markdown-list-size-item-margin-bottom: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-blockquote-size-margin-top: var(--kbq-size-m);--kbq-markdown-blockquote-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-blockquote-size-padding: var(--kbq-size-3xs) var(--kbq-size-m);--kbq-markdown-blockquote-size-line-width: var(--kbq-size-xxs);--kbq-markdown-blockquote-size-border-radius: 0;--kbq-markdown-blockquote-size-border-width: 0;--kbq-markdown-code-size-multiline-margin-top: var(--kbq-size-m);--kbq-markdown-code-size-multiline-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-code-size-inline-padding: var(--kbq-size-3xs) var(--kbq-size-xs);--kbq-markdown-code-size-multiline-padding: var(--kbq-size-m) var(--kbq-size-l);--kbq-markdown-code-size-border-radius: var(--kbq-size-border-radius);--kbq-markdown-code-size-border-width: var(--kbq-size-border-width);--kbq-markdown-image-size-max-width: var(--kbq-markdown-size-max-width);--kbq-markdown-image-size-margin-top: var(--kbq-size-m);--kbq-markdown-image-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-image-size-caption-margin-top: calc(-1 * var(--kbq-size-s));--kbq-markdown-image-size-caption-margin-bottom: var(--kbq-size-xxl);--kbq-markdown-hr-size-width: 1px;--kbq-markdown-hr-size-margin-vertical: var(--kbq-size-xxl);--kbq-markdown-table-size-border-width: var(--kbq-size-border-width);--kbq-markdown-table-size-padding: var(--kbq-size-s);--kbq-markdown-table-size-margin-bottom: var(--kbq-size-m);--kbq-markdown-size-max-width: 650px;--kbq-markdown-h1-color: var(--kbq-foreground-contrast);--kbq-markdown-h2-color: var(--kbq-foreground-contrast);--kbq-markdown-h3-color: var(--kbq-foreground-contrast);--kbq-markdown-h4-color: var(--kbq-foreground-contrast);--kbq-markdown-h5-color: var(--kbq-foreground-contrast);--kbq-markdown-h6-color: var(--kbq-foreground-contrast);--kbq-markdown-p-color: var(--kbq-foreground-contrast);--kbq-markdown-list-color: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-text: var(--kbq-foreground-contrast);--kbq-markdown-blockquote-line: var(--kbq-line-contrast-less);--kbq-markdown-blockquote-background: var(--kbq-background-contrast-fade);--kbq-markdown-blockquote-border: transparent;--kbq-markdown-code-text: var(--kbq-foreground-contrast);--kbq-markdown-code-background: var(--kbq-background-contrast-fade);--kbq-markdown-code-border: var(--kbq-line-contrast-less);--kbq-markdown-image-caption-text: var(--kbq-foreground-contrast-secondary);--kbq-markdown-hr-color: var(--kbq-line-contrast-less);--kbq-markdown-table-header: var(--kbq-foreground-contrast-secondary);--kbq-markdown-table-body: var(--kbq-foreground-contrast);--kbq-markdown-table-border: var(--kbq-line-contrast-less)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
149
152
  }
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMarkdown, decorators: [{
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMarkdown, decorators: [{
151
154
  type: Component,
152
155
  args: [{ selector: 'kbq-markdown', template: `
153
156
  <pre #contentWrapper class="kbq-markdown__input" ngPreserveWhitespaces><ng-content /></pre>
@@ -163,11 +166,11 @@ const COMPONENTS = [
163
166
  KbqMarkdown
164
167
  ];
165
168
  class KbqMarkdownModule {
166
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMarkdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
167
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: KbqMarkdownModule, imports: [KbqMarkdown], exports: [KbqMarkdown] }); }
168
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMarkdownModule, providers: [KbqMarkdownService] }); }
169
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMarkdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
170
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqMarkdownModule, imports: [KbqMarkdown], exports: [KbqMarkdown] }); }
171
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMarkdownModule, providers: [KbqMarkdownService] }); }
169
172
  }
170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMarkdownModule, decorators: [{
173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMarkdownModule, decorators: [{
171
174
  type: NgModule,
172
175
  args: [{
173
176
  imports: COMPONENTS,
@@ -1 +1 @@
1
- {"version":3,"file":"koobiq-components-markdown.mjs","sources":["../../../packages/components/markdown/markdown.values.ts","../../../packages/components/markdown/markdown.service.ts","../../../packages/components/markdown/markdown.component.ts","../../../packages/components/markdown/markdown.module.ts","../../../packages/components/markdown/koobiq-components-markdown.ts"],"sourcesContent":["/** @docs-private */\nexport const MARKDOWN_TAGS_TO_CLASS_ALIAS = [\n 'a',\n 'blockquote',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'li',\n 'ol',\n 'table',\n 'tbody',\n 'thead',\n 'td',\n 'tr',\n 'ul',\n 'pre',\n 'code',\n 'img'\n];\n\n/**\n * separating `th` and `p` to prevent it's conflict with `thead` and `pre`\n *\n * @docs-private\n */\nexport const MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS = [\n 'th',\n 'p'\n];\n\n/** @docs-private */\nexport const CLASS_PREFIX: string = 'kbq-markdown';\n","import { Injectable } from '@angular/core';\nimport { marked, MarkedOptions } from 'marked';\nimport { CLASS_PREFIX, MARKDOWN_TAGS_TO_CLASS_ALIAS, MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS } from './markdown.values';\n\n/**\n * Service for converting Markdown into HTML.\n */\n@Injectable()\nexport class KbqMarkdownService {\n /**\n * Converts a given Markdown string into HTML.\n * NOTE! Method does not sanitize the output HTML string.\n *\n * @param markdown - The Markdown string to be converted.\n * @param options - Optional MarkedOptions to customize the parsing behavior.\n * @returns The transformed HTML string.\n */\n parseToHtml(markdown: string, options?: MarkedOptions): string {\n return this.transform(<string>marked.parse(markdown, options));\n }\n\n private transform(htmlContent: string): string {\n let transformed = htmlContent;\n\n MARKDOWN_TAGS_TO_CLASS_ALIAS.forEach((tag) => {\n transformed = transformed.replace(new RegExp(`<${tag}`, 'g'), (_match: string) => {\n if (tag === 'a') {\n return `<${tag} class=\"${CLASS_PREFIX}__${tag} kbq-link kbq-text-only kbq-link_use-visited\"`;\n }\n\n return `<${tag} class=\"${CLASS_PREFIX}__${tag}\"`;\n });\n });\n\n MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS.forEach((tag) => {\n transformed = transformed.replace(\n new RegExp(`<${tag}\\s*>`, 'g'),\n (_match: string) => `<${tag} class=\"${CLASS_PREFIX}__${tag}\">`\n );\n });\n\n return transformed;\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n Input,\n OnDestroy,\n Provider,\n signal,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { MarkedOptions } from 'marked';\nimport { KbqMarkdownService } from './markdown.service';\n\n/** List of options for `marked` library. */\nexport const KBQ_MARKDOWN_MARKED_OPTIONS = new InjectionToken<MarkedOptions>('KBQ_MARKDOWN_MARKED_OPTIONS');\n\n/** Utility provider for `KBQ_MARKDOWN_MARKED_OPTIONS`. */\nexport const kbqMarkdownMarkedOptionsProvider = (options: MarkedOptions): Provider => ({\n provide: KBQ_MARKDOWN_MARKED_OPTIONS,\n useValue: options\n});\n\n/** Component which allows to convert `Markdown` into `HTML` */\n@Component({\n selector: 'kbq-markdown',\n // no need format line with ng-content it's broke textContent for markdownService.parseToHtml()\n template: `\n <pre #contentWrapper class=\"kbq-markdown__input\" ngPreserveWhitespaces><ng-content /></pre>\n <div #outputWrapper class=\"kbq-markdown__output\" [innerHtml]=\"resultHtml()\"></div>\n `,\n styleUrls: ['./markdown.scss', 'markdown-tokens.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-markdown'\n }\n})\nexport class KbqMarkdown implements OnDestroy {\n private readonly markdownService = inject(KbqMarkdownService);\n private sanitizer = inject(DomSanitizer);\n private readonly markedOptions =\n inject<MarkedOptions | undefined>(KBQ_MARKDOWN_MARKED_OPTIONS, { optional: true }) ?? undefined;\n\n private readonly contentWrapper = viewChild.required<ElementRef<HTMLPreElement>>('contentWrapper');\n private readonly outputWrapper = viewChild.required<ElementRef<HTMLDivElement>>('outputWrapper');\n\n protected resultHtml = signal<SafeHtml | null>(null);\n\n /** `Markdown` text. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get markdownText(): string | null {\n return this._markdownText;\n }\n\n set markdownText(value: string | null) {\n if (value && this.markdownText !== value) {\n this.resultHtml.set(this.getResultHTML(value));\n }\n\n this._markdownText = value;\n }\n\n private _markdownText: string | null = null;\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly links: HTMLAnchorElement[] = [];\n\n constructor() {\n afterNextRender(() => {\n const contentWrapper = this.contentWrapper();\n\n if (!this.markdownText && contentWrapper?.nativeElement.textContent) {\n this.resultHtml.set(this.getResultHTML(contentWrapper?.nativeElement.textContent));\n }\n });\n\n effect(() => {\n if (this.resultHtml()) {\n Promise.resolve().then(() => this.startMonitoringLinks());\n } else {\n this.stopMonitoringLinks();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.stopMonitoringLinks();\n }\n\n private getResultHTML(markdown: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(this.markdownService.parseToHtml(markdown, this.markedOptions));\n }\n\n private startMonitoringLinks(): void {\n this.stopMonitoringLinks();\n this.outputWrapper()\n .nativeElement.querySelectorAll<HTMLAnchorElement>('.kbq-markdown__a')\n .forEach((link) => {\n this.links.push(link);\n this.focusMonitor.monitor(link, true);\n });\n }\n\n private stopMonitoringLinks(): void {\n this.links.forEach((link) => this.focusMonitor.stopMonitoring(link));\n this.links.length = 0;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { KbqMarkdown } from './markdown.component';\nimport { KbqMarkdownService } from './markdown.service';\n\nconst COMPONENTS = [\n KbqMarkdown\n];\n\n@NgModule({\n imports: COMPONENTS,\n providers: [KbqMarkdownService],\n exports: COMPONENTS\n})\nexport class KbqMarkdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AACO,MAAM,4BAA4B,GAAG;IACxC,GAAG;IACH,YAAY;IACZ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,MAAM;IACN;;AAGJ;;;;AAIG;AACI,MAA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AAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACF,wBAAA,KAAK,EAAE;AACV,qBAAA,EAAA,MAAA,EAAA,CAAA,stNAAA,EAAA,22IAAA,CAAA,EAAA;AAQgF,SAAA,CAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,gBAAgB,uEACjB,eAAe,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA;sBAO9F;;;ACtDL,MAAM,UAAU,GAAG;IACf;CACH;MAOY,iBAAiB,CAAA;kIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mIAAjB,iBAAiB,EAAA,OAAA,EAAA,CAR1B,WAAW,CAAA,EAAA,OAAA,EAAA,CAAX,WAAW,CAAA,EAAA,CAAA,CAAA;mIAQF,iBAAiB,EAAA,SAAA,EAHf,CAAC,kBAAkB,CAAC,EAAA,CAAA,CAAA;;4FAGtB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,UAAU;oBACnB,SAAS,EAAE,CAAC,kBAAkB,CAAC;AAC/B,oBAAA,OAAO,EAAE;AACZ,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"koobiq-components-markdown.mjs","sources":["../../../packages/components/markdown/markdown.values.ts","../../../packages/components/markdown/markdown.service.ts","../../../packages/components/markdown/markdown.component.ts","../../../packages/components/markdown/markdown.module.ts","../../../packages/components/markdown/koobiq-components-markdown.ts"],"sourcesContent":["/** @docs-private */\nexport const MARKDOWN_TAGS_TO_CLASS_ALIAS = [\n 'a',\n 'blockquote',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'li',\n 'ol',\n 'table',\n 'tbody',\n 'thead',\n 'td',\n 'tr',\n 'ul',\n 'pre',\n 'code',\n 'img'\n];\n\n/**\n * separating `th` and `p` to prevent it's conflict with `thead` and `pre`\n *\n * @docs-private\n */\nexport const MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS = [\n 'th',\n 'p'\n];\n\n/** @docs-private */\nexport const CLASS_PREFIX: string = 'kbq-markdown';\n","import { Injectable } from '@angular/core';\nimport { marked, MarkedOptions } from 'marked';\nimport { CLASS_PREFIX, MARKDOWN_TAGS_TO_CLASS_ALIAS, MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS } from './markdown.values';\n\n/**\n * Service for converting Markdown into HTML.\n */\n@Injectable()\nexport class KbqMarkdownService {\n /**\n * Converts a given Markdown string into HTML.\n * NOTE! Method does not sanitize the output HTML string.\n *\n * @param markdown - The Markdown string to be converted.\n * @param options - Optional MarkedOptions to customize the parsing behavior.\n * @returns The transformed HTML string.\n */\n parseToHtml(markdown: string, options?: MarkedOptions): string {\n return this.transform(<string>marked.parse(markdown, options));\n }\n\n private transform(htmlContent: string): string {\n let transformed = htmlContent;\n\n MARKDOWN_TAGS_TO_CLASS_ALIAS.forEach((tag) => {\n transformed = transformed.replace(new RegExp(`<${tag}`, 'g'), (_match: string) => {\n if (tag === 'a') {\n return `<${tag} class=\"${CLASS_PREFIX}__${tag} kbq-link kbq-text-only kbq-link_use-visited\"`;\n }\n\n return `<${tag} class=\"${CLASS_PREFIX}__${tag}\"`;\n });\n });\n\n MARKDOWN_WHOLE_TAGS_TO_CLASS_ALIAS.forEach((tag) => {\n transformed = transformed.replace(\n // `\\\\s`, because a template literal eats the backslash first: `\\s` would reach the\n // constructor as a bare `s` and match `<pss>` rather than `<p >`.\n new RegExp(`<${tag}\\\\s*>`, 'g'),\n (_match: string) => `<${tag} class=\"${CLASS_PREFIX}__${tag}\">`\n );\n });\n\n return transformed;\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n Input,\n OnDestroy,\n Provider,\n signal,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { MarkedOptions } from 'marked';\nimport { KbqMarkdownService } from './markdown.service';\n\n/** List of options for `marked` library. */\nexport const KBQ_MARKDOWN_MARKED_OPTIONS = new InjectionToken<MarkedOptions>('KBQ_MARKDOWN_MARKED_OPTIONS');\n\n/** Utility provider for `KBQ_MARKDOWN_MARKED_OPTIONS`. */\nexport const kbqMarkdownMarkedOptionsProvider = (options: MarkedOptions): Provider => ({\n provide: KBQ_MARKDOWN_MARKED_OPTIONS,\n useValue: options\n});\n\n/** Component which allows to convert `Markdown` into `HTML` */\n@Component({\n selector: 'kbq-markdown',\n // no need format line with ng-content it's broke textContent for markdownService.parseToHtml()\n template: `\n <pre #contentWrapper class=\"kbq-markdown__input\" ngPreserveWhitespaces><ng-content /></pre>\n <div #outputWrapper class=\"kbq-markdown__output\" [innerHtml]=\"resultHtml()\"></div>\n `,\n styleUrls: ['./markdown.scss', 'markdown-tokens.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-markdown'\n }\n})\nexport class KbqMarkdown implements OnDestroy {\n private readonly markdownService = inject(KbqMarkdownService);\n private sanitizer = inject(DomSanitizer);\n private readonly markedOptions =\n inject<MarkedOptions | undefined>(KBQ_MARKDOWN_MARKED_OPTIONS, { optional: true }) ?? undefined;\n\n private readonly contentWrapper = viewChild.required<ElementRef<HTMLPreElement>>('contentWrapper');\n private readonly outputWrapper = viewChild.required<ElementRef<HTMLDivElement>>('outputWrapper');\n\n protected resultHtml = signal<SafeHtml | null>(null);\n\n /** `Markdown` text. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get markdownText(): string | null {\n return this._markdownText;\n }\n\n set markdownText(value: string | null) {\n if (value && this.markdownText !== value) {\n this.resultHtml.set(this.getResultHTML(value));\n }\n\n this._markdownText = value;\n }\n\n private _markdownText: string | null = null;\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly links: HTMLAnchorElement[] = [];\n\n constructor() {\n afterNextRender(() => {\n const contentWrapper = this.contentWrapper();\n\n if (!this.markdownText && contentWrapper?.nativeElement.textContent) {\n this.resultHtml.set(this.getResultHTML(contentWrapper?.nativeElement.textContent));\n }\n });\n\n effect(() => {\n if (this.resultHtml()) {\n Promise.resolve().then(() => this.startMonitoringLinks());\n } else {\n this.stopMonitoringLinks();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.stopMonitoringLinks();\n }\n\n private getResultHTML(markdown: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(this.markdownService.parseToHtml(markdown, this.markedOptions));\n }\n\n private startMonitoringLinks(): void {\n this.stopMonitoringLinks();\n this.outputWrapper()\n .nativeElement.querySelectorAll<HTMLAnchorElement>('.kbq-markdown__a')\n .forEach((link) => {\n this.links.push(link);\n this.focusMonitor.monitor(link, true);\n });\n }\n\n private stopMonitoringLinks(): void {\n this.links.forEach((link) => this.focusMonitor.stopMonitoring(link));\n this.links.length = 0;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { KbqMarkdown } from './markdown.component';\nimport { KbqMarkdownService } from './markdown.service';\n\nconst COMPONENTS = [\n KbqMarkdown\n];\n\n@NgModule({\n imports: COMPONENTS,\n providers: [KbqMarkdownService],\n exports: COMPONENTS\n})\nexport class KbqMarkdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AACO,MAAM,4BAA4B,GAAG;IACxC,GAAG;IACH,YAAY;IACZ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;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CUMENT, NgTemplateOutlet } from '@angular/common';
5
5
  import * as i0 from '@angular/core';
6
- import { Pipe, inject, Injectable, Renderer2, ComponentFactoryResolver, ElementRef, ViewContainerRef, ChangeDetectorRef, output, EventEmitter, viewChild, viewChildren, TemplateRef, Type, Injector, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, InjectionToken, isDevMode, NgModule } from '@angular/core';
6
+ import { Pipe, inject, Injectable, Renderer2, ComponentFactoryResolver, ElementRef, ViewContainerRef, ChangeDetectorRef, output, EventEmitter, viewChild, viewChildren, signal, TemplateRef, Type, Injector, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, Component, effect, Directive, InjectionToken, isDevMode, NgModule } from '@angular/core';
7
7
  import * as i1 from '@koobiq/components/button';
8
8
  import { KbqButtonModule } from '@koobiq/components/button';
9
+ import * as i3$1 from '@koobiq/components/core';
9
10
  import { KbqComponentColors, ESCAPE, ENTER, KbqOverflowShadowContainer, KbqOverflowShadowTop, KbqOverflowShadowBottom } from '@koobiq/components/core';
10
11
  import * as i2 from '@koobiq/components/icon';
11
12
  import { KbqIconModule } from '@koobiq/components/icon';
@@ -27,10 +28,10 @@ class CssUnitPipe {
27
28
  const formatted = +value;
28
29
  return isNaN(formatted) ? `${value}` : `${formatted}${defaultUnit}`;
29
30
  }
30
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CssUnitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
31
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: CssUnitPipe, isStandalone: true, name: "toCssUnit" }); }
31
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: CssUnitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
32
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: CssUnitPipe, isStandalone: true, name: "toCssUnit" }); }
32
33
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CssUnitPipe, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: CssUnitPipe, decorators: [{
34
35
  type: Pipe,
35
36
  args: [{
36
37
  name: 'toCssUnit'
@@ -141,10 +142,10 @@ class KbqModalControlService {
141
142
  });
142
143
  }
143
144
  }
144
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalControlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
145
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalControlService, providedIn: 'root' }); }
145
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalControlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
146
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalControlService, providedIn: 'root' }); }
146
147
  }
147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalControlService, decorators: [{
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalControlService, decorators: [{
148
149
  type: Injectable,
149
150
  args: [{ providedIn: 'root' }]
150
151
  }] });
@@ -231,6 +232,13 @@ class KbqModalComponent extends KbqModalRef {
231
232
  this.autoFocusedButtons = viewChildren('autoFocusedButton', ...(ngDevMode ? [{ debugName: "autoFocusedButtons", read: ElementRef }] : [{ read: ElementRef }]));
232
233
  // The origin point that animation based on
233
234
  this.transformOrigin = '0px 0px 0px';
235
+ /**
236
+ * Scroll-shadow state published by `KbqModalBody` when the modal content is composed
237
+ * manually (`kbq-modal-title`/`kbq-modal-body`/`kbq-modal-footer`), so the header/footer
238
+ * can render matching shadows without a direct template reference between them.
239
+ * @docs-private
240
+ */
241
+ this.bodyOverflow = signal({ top: false, bottom: false }, ...(ngDevMode ? [{ debugName: "bodyOverflow" }] : []));
234
242
  // TODO: Skipped for migration because:
235
243
  // This input overrides a field from a superclass, while the superclass field
236
244
  // is not migrated.
@@ -640,10 +648,10 @@ class KbqModalComponent extends KbqModalRef {
640
648
  this.renderer.removeStyle(this.document.body, 'overflow');
641
649
  }
642
650
  }
643
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
644
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqModalComponent, isStandalone: true, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCaption: "kbqCaption", 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, isSignal: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef, isSignal: true }], 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 [class]=\"maskAnimationClassMap\"\n [style]=\"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]=\"getContainerClasses()\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [style]=\"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 || kbqCaption) {\n <div class=\"kbq-modal-header\" [kbqOverflowShadowTop]=\"modalBodyOverflow\">\n <div class=\"kbq-modal-header-content\">\n @if (kbqTitle) {\n <div class=\"kbq-modal-title\" kbq-title>\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div #kbqTitleText [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n }\n @if (kbqCaption) {\n <div class=\"kbq-modal-caption\" kbq-title>\n @switch (true) {\n @case (isTemplateRef(kbqCaption)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqCaption)\" />\n }\n @case (isNonEmptyString(kbqCaption)) {\n <div #kbqTitleText [innerHTML]=\"kbqCaption\"></div>\n }\n }\n </div>\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\n #modalBodyOverflow=\"kbqOverflowShadowContainer\"\n kbqOverflowShadowContainer\n class=\"kbq-modal-body kbq-scrollbar\"\n [style]=\"kbqBodyStyle\"\n >\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\" [kbqOverflowShadowBottom]=\"modalBodyOverflow\">\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\" [style]=\"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}.fade-enter,.fade-appear{opacity:0;animation-timing-function:ease-out}.fade-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}.zoom-enter,.zoom-appear{transform:translateY(-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.zoom-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-header-content{display:flex;flex:1;flex-direction:column;min-width:0}.kbq-modal-caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.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-caption{color:var(--kbq-foreground-contrast-secondary)}.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-caption,.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: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: KbqOverflowShadowContainer, selector: "[kbqOverflowShadowContainer]", inputs: ["debounce"], exportAs: ["kbqOverflowShadowContainer"] }, { kind: "directive", type: KbqOverflowShadowTop, selector: "[kbqOverflowShadowTop]", inputs: ["kbqOverflowShadowTop", "shadow"], exportAs: ["kbqOverflowShadowTop"] }, { kind: "directive", type: KbqOverflowShadowBottom, selector: "[kbqOverflowShadowBottom]", inputs: ["kbqOverflowShadowBottom", "shadow"], exportAs: ["kbqOverflowShadowBottom"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i3.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
651
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
652
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqModalComponent, isStandalone: true, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCaption: "kbqCaption", 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, isSignal: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef, isSignal: true }], 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 [class]=\"maskAnimationClassMap\"\n [style]=\"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]=\"getContainerClasses()\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [style]=\"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 || kbqCaption) {\n <div class=\"kbq-modal-header\" [kbqOverflowShadowTop]=\"modalBodyOverflow\">\n <div class=\"kbq-modal-header-content\">\n @if (kbqTitle) {\n <div class=\"kbq-modal-title\" kbq-title>\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div #kbqTitleText [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n }\n @if (kbqCaption) {\n <div class=\"kbq-modal-caption\" kbq-title>\n @switch (true) {\n @case (isTemplateRef(kbqCaption)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqCaption)\" />\n }\n @case (isNonEmptyString(kbqCaption)) {\n <div #kbqTitleText [innerHTML]=\"kbqCaption\"></div>\n }\n }\n </div>\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\n #modalBodyOverflow=\"kbqOverflowShadowContainer\"\n kbqOverflowShadowContainer\n class=\"kbq-modal-body kbq-scrollbar\"\n [style]=\"kbqBodyStyle\"\n >\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\" [kbqOverflowShadowBottom]=\"modalBodyOverflow\">\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\" [style]=\"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}.fade-enter,.fade-appear{opacity:0;animation-timing-function:ease-out}.fade-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}.zoom-enter,.zoom-appear{transform:translateY(-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.zoom-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-header-content{display:flex;flex:1;flex-direction:column;min-width:0}.kbq-modal-caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.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-caption{color:var(--kbq-foreground-contrast-secondary)}.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-caption,.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-m);--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: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: KbqOverflowShadowContainer, selector: "[kbqOverflowShadowContainer]", inputs: ["debounce"], exportAs: ["kbqOverflowShadowContainer"] }, { kind: "directive", type: KbqOverflowShadowTop, selector: "[kbqOverflowShadowTop]", inputs: ["kbqOverflowShadowTop", "shadow"], exportAs: ["kbqOverflowShadowTop"] }, { kind: "directive", type: KbqOverflowShadowBottom, selector: "[kbqOverflowShadowBottom]", inputs: ["kbqOverflowShadowBottom", "shadow"], exportAs: ["kbqOverflowShadowBottom"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i3.KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
645
653
  }
646
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalComponent, decorators: [{
654
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalComponent, decorators: [{
647
655
  type: Component,
648
656
  args: [{ selector: 'kbq-modal', imports: [
649
657
  CdkTrapFocus,
@@ -658,7 +666,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
658
666
  ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
659
667
  class: 'kbq-modal',
660
668
  '(keydown)': 'onKeyDown($event)'
661
- }, 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 [class]=\"maskAnimationClassMap\"\n [style]=\"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]=\"getContainerClasses()\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [style]=\"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 || kbqCaption) {\n <div class=\"kbq-modal-header\" [kbqOverflowShadowTop]=\"modalBodyOverflow\">\n <div class=\"kbq-modal-header-content\">\n @if (kbqTitle) {\n <div class=\"kbq-modal-title\" kbq-title>\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div #kbqTitleText [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n }\n @if (kbqCaption) {\n <div class=\"kbq-modal-caption\" kbq-title>\n @switch (true) {\n @case (isTemplateRef(kbqCaption)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqCaption)\" />\n }\n @case (isNonEmptyString(kbqCaption)) {\n <div #kbqTitleText [innerHTML]=\"kbqCaption\"></div>\n }\n }\n </div>\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\n #modalBodyOverflow=\"kbqOverflowShadowContainer\"\n kbqOverflowShadowContainer\n class=\"kbq-modal-body kbq-scrollbar\"\n [style]=\"kbqBodyStyle\"\n >\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\" [kbqOverflowShadowBottom]=\"modalBodyOverflow\">\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\" [style]=\"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}.fade-enter,.fade-appear{opacity:0;animation-timing-function:ease-out}.fade-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}.zoom-enter,.zoom-appear{transform:translateY(-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.zoom-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-header-content{display:flex;flex:1;flex-direction:column;min-width:0}.kbq-modal-caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.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-caption{color:var(--kbq-foreground-contrast-secondary)}.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-caption,.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"] }]
669
+ }, 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 [class]=\"maskAnimationClassMap\"\n [style]=\"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]=\"getContainerClasses()\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [style]=\"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 || kbqCaption) {\n <div class=\"kbq-modal-header\" [kbqOverflowShadowTop]=\"modalBodyOverflow\">\n <div class=\"kbq-modal-header-content\">\n @if (kbqTitle) {\n <div class=\"kbq-modal-title\" kbq-title>\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div #kbqTitleText [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n }\n @if (kbqCaption) {\n <div class=\"kbq-modal-caption\" kbq-title>\n @switch (true) {\n @case (isTemplateRef(kbqCaption)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqCaption)\" />\n }\n @case (isNonEmptyString(kbqCaption)) {\n <div #kbqTitleText [innerHTML]=\"kbqCaption\"></div>\n }\n }\n </div>\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\n #modalBodyOverflow=\"kbqOverflowShadowContainer\"\n kbqOverflowShadowContainer\n class=\"kbq-modal-body kbq-scrollbar\"\n [style]=\"kbqBodyStyle\"\n >\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\" [kbqOverflowShadowBottom]=\"modalBodyOverflow\">\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\" [style]=\"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}.fade-enter,.fade-appear{opacity:0;animation-timing-function:ease-out}.fade-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}.zoom-enter,.zoom-appear{transform:translateY(-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.zoom-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-header-content{display:flex;flex:1;flex-direction:column;min-width:0}.kbq-modal-caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.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-caption{color:var(--kbq-foreground-contrast-secondary)}.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-caption,.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-m);--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"] }]
662
670
  }], propDecorators: { kbqModalType: [{
663
671
  type: Input
664
672
  }], kbqComponent: [{
@@ -735,8 +743,8 @@ class KbqModalTitle {
735
743
  constructor() {
736
744
  this.modal = inject(KbqModalComponent);
737
745
  }
738
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalTitle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
739
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", 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: `
746
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalTitle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
747
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqModalTitle, isStandalone: true, selector: "[kbq-modal-title], kbq-modal-title, [kbqModalTitle]", host: { properties: { "class.kbq-modal-header_closable": "modal.kbqClosable", "style.box-shadow": "modal.bodyOverflow().top ? \"var(--kbq-shadow-overflow-normal-bottom)\" : null" }, classAttribute: "kbq-modal-header" }, ngImport: i0, template: `
740
748
  <div class="kbq-modal-title" kbq-title>
741
749
  <ng-content />
742
750
  </div>
@@ -754,7 +762,7 @@ class KbqModalTitle {
754
762
  }
755
763
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }] }); }
756
764
  }
757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalTitle, decorators: [{
765
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalTitle, decorators: [{
758
766
  type: Component,
759
767
  args: [{
760
768
  selector: `[kbq-modal-title], kbq-modal-title, [kbqModalTitle]`,
@@ -782,41 +790,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
782
790
  `,
783
791
  host: {
784
792
  class: 'kbq-modal-header',
785
- '[class.kbq-modal-header_closable]': 'modal.kbqClosable'
793
+ '[class.kbq-modal-header_closable]': 'modal.kbqClosable',
794
+ '[style.box-shadow]': 'modal.bodyOverflow().top ? "var(--kbq-shadow-overflow-normal-bottom)" : null'
786
795
  }
787
796
  }]
788
797
  }] });
798
+ /**
799
+ * Scrollable body of a manually composed modal (`kbqComponent`). Publishes its scroll-shadow
800
+ * state onto the modal instance so a sibling `KbqModalTitle`/`KbqModalFooter` can render the
801
+ * matching shadow, since they have no direct template reference to this element.
802
+ */
789
803
  class KbqModalBody {
790
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalBody, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
791
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqModalBody, isStandalone: true, selector: "[kbq-modal-body], kbq-modal-body, [kbqModalBody]", host: { classAttribute: "kbq-modal-body" }, ngImport: i0 }); }
804
+ constructor() {
805
+ this.modal = inject(KbqModalComponent);
806
+ this.overflowContainer = inject(KbqOverflowShadowContainer);
807
+ effect(() => this.modal.bodyOverflow.set(this.overflowContainer.overflow()));
808
+ }
809
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalBody, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
810
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqModalBody, isStandalone: true, selector: "[kbq-modal-body], kbq-modal-body, [kbqModalBody]", host: { classAttribute: "kbq-modal-body kbq-scrollbar" }, hostDirectives: [{ directive: i3$1.KbqOverflowShadowContainer }], ngImport: i0 }); }
792
811
  }
793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalBody, decorators: [{
812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalBody, decorators: [{
794
813
  type: Directive,
795
814
  args: [{
796
815
  selector: `[kbq-modal-body], kbq-modal-body, [kbqModalBody]`,
797
816
  host: {
798
- class: 'kbq-modal-body'
799
- }
817
+ class: 'kbq-modal-body kbq-scrollbar'
818
+ },
819
+ hostDirectives: [KbqOverflowShadowContainer]
800
820
  }]
801
- }] });
821
+ }], ctorParameters: () => [] });
802
822
  class KbqModalFooter {
803
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
804
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqModalFooter, isStandalone: true, selector: "[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]", host: { classAttribute: "kbq-modal-footer" }, ngImport: i0 }); }
823
+ constructor() {
824
+ this.modal = inject(KbqModalComponent);
825
+ }
826
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
827
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqModalFooter, isStandalone: true, selector: "[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]", host: { properties: { "style.box-shadow": "modal.bodyOverflow().bottom ? \"var(--kbq-shadow-overflow-normal-top)\" : null" }, classAttribute: "kbq-modal-footer" }, ngImport: i0 }); }
805
828
  }
806
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalFooter, decorators: [{
829
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalFooter, decorators: [{
807
830
  type: Directive,
808
831
  args: [{
809
832
  selector: `[kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]`,
810
833
  host: {
811
- class: 'kbq-modal-footer'
834
+ class: 'kbq-modal-footer',
835
+ '[style.box-shadow]': 'modal.bodyOverflow().bottom ? "var(--kbq-shadow-overflow-normal-top)" : null'
812
836
  }
813
837
  }]
814
838
  }] });
815
839
  class KbqModalMainAction {
816
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalMainAction, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
817
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqModalMainAction, isStandalone: true, selector: "[kbq-modal-main-action]", ngImport: i0 }); }
840
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalMainAction, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
841
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqModalMainAction, isStandalone: true, selector: "[kbq-modal-main-action]", ngImport: i0 }); }
818
842
  }
819
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalMainAction, decorators: [{
843
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalMainAction, decorators: [{
820
844
  type: Directive,
821
845
  args: [{
822
846
  selector: `[kbq-modal-main-action]`
@@ -939,17 +963,17 @@ class KbqModalService {
939
963
  delete(options = {}) {
940
964
  return this.confirm(options, 'warn');
941
965
  }
942
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
943
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalService, providedIn: 'root' }); }
966
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
967
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalService, providedIn: 'root' }); }
944
968
  }
945
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalService, decorators: [{
969
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalService, decorators: [{
946
970
  type: Injectable,
947
971
  args: [{ providedIn: 'root' }]
948
972
  }] });
949
973
 
950
974
  class KbqModalModule {
951
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
952
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: KbqModalModule, imports: [OverlayModule,
975
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
976
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqModalModule, imports: [OverlayModule,
953
977
  A11yModule,
954
978
  KbqButtonModule,
955
979
  KbqIconModule,
@@ -965,7 +989,7 @@ class KbqModalModule {
965
989
  KbqModalBody,
966
990
  KbqModalFooter,
967
991
  KbqModalMainAction] }); }
968
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalModule, providers: [
992
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalModule, providers: [
969
993
  KbqModalControlService,
970
994
  KbqModalService,
971
995
  { provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }
@@ -977,7 +1001,7 @@ class KbqModalModule {
977
1001
  KbqModalComponent,
978
1002
  KbqModalTitle] }); }
979
1003
  }
980
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqModalModule, decorators: [{
1004
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqModalModule, decorators: [{
981
1005
  type: NgModule,
982
1006
  args: [{
983
1007
  imports: [