@koobiq/components 20.4.2 → 21.0.1

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 (798) hide show
  1. package/accordion/accordion-trigger.scss +3 -10
  2. package/accordion/accordion.scss +4 -6
  3. package/actions-panel/actions-panel-container.scss +45 -1
  4. package/alert/alert.component.scss +3 -2
  5. package/app-switcher/_app-switcher-theme.scss +0 -4
  6. package/app-switcher/app-switcher-dropdown-app.scss +3 -2
  7. package/app-switcher/app-switcher-dropdown-site.scss +2 -1
  8. package/app-switcher/{kbq-app-switcher-list-item.scss → app-switcher-list-item.scss} +18 -4
  9. package/app-switcher/app-switcher-tokens.scss +15 -0
  10. package/app-switcher/app-switcher.scss +14 -4
  11. package/autocomplete/autocomplete.scss +7 -6
  12. package/badge/badge.component.scss +5 -8
  13. package/breadcrumbs/breadcrumbs.scss +25 -10
  14. package/button/_button-base.scss +30 -7
  15. package/button/_button-theme.scss +16 -0
  16. package/button/button-group.scss +7 -0
  17. package/button/button-tokens.scss +0 -2
  18. package/button/button.scss +34 -2
  19. package/button-toggle/_button-toggle-theme.scss +7 -2
  20. package/button-toggle/button-toggle.scss +65 -15
  21. package/checkbox/_checkbox-theme.scss +4 -3
  22. package/checkbox/checkbox.scss +3 -6
  23. package/clamped-text/clamped-text.scss +6 -2
  24. package/code-block/code-block-tokens.scss +0 -224
  25. package/code-block/code-block.scss +20 -9
  26. package/content-panel/content-panel-aside.scss +3 -2
  27. package/content-panel/content-panel-container.scss +37 -0
  28. package/content-panel/content-panel.scss +4 -3
  29. package/core/highlight/_highlight-theme.scss +3 -1
  30. package/core/option/action-container.scss +2 -2
  31. package/core/option/action.scss +2 -1
  32. package/core/option/option.scss +2 -1
  33. package/core/pop-up/_pop-up.scss +0 -37
  34. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +5 -10
  35. package/core/styles/_core.scss +3 -0
  36. package/core/styles/_koobiq-theme.scss +5 -6
  37. package/core/styles/common/_animation.scss +44 -16
  38. package/core/styles/common/_groups-mixins.scss +21 -19
  39. package/core/styles/common/_groups.scss +4 -32
  40. package/core/styles/common/_index.scss +0 -2
  41. package/core/styles/common/_link.scss +117 -0
  42. package/core/styles/common/_list.scss +0 -26
  43. package/core/styles/common/_overlay.scss +8 -10
  44. package/core/styles/common/_rtl.scss +0 -14
  45. package/core/styles/common/_select.scss +33 -15
  46. package/core/styles/common/_squircle.scss +63 -0
  47. package/core/styles/common/_tokens.scss +0 -11
  48. package/core/styles/common/_vendor-prefixes.scss +0 -20
  49. package/core/styles/functions/_timing.scss +0 -22
  50. package/core/styles/theming/_scrollbar-theme.scss +6 -1
  51. package/core/styles/theming/_theming.scss +13 -65
  52. package/core/styles/typography/_index.scss +0 -1
  53. package/core/styles/typography/_typography.scss +0 -143
  54. package/core/styles/visual/_body.scss +1 -6
  55. package/core/styles/visual/_layout.scss +0 -12
  56. package/datepicker/calendar-body.scss +3 -1
  57. package/datepicker/calendar-header.scss +0 -1
  58. package/datepicker/datepicker-content.scss +33 -1
  59. package/datepicker/datepicker-toggle.scss +0 -38
  60. package/dl/dl-tokens.scss +10 -0
  61. package/dl/dl.scss +113 -13
  62. package/dropdown/_dropdown-theme.scss +4 -16
  63. package/dropdown/dropdown-item.scss +4 -10
  64. package/dropdown/dropdown.scss +2 -1
  65. package/empty-state/_empty-state-theme.scss +10 -4
  66. package/empty-state/empty-state-tokens.scss +4 -4
  67. package/empty-state/empty-state.scss +4 -0
  68. package/fesm2022/koobiq-components-accordion.mjs +347 -229
  69. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  70. package/fesm2022/koobiq-components-actions-panel.mjs +302 -187
  71. package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
  72. package/fesm2022/koobiq-components-alert.mjs +39 -39
  73. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-app-switcher.mjs +677 -367
  75. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-autocomplete.mjs +620 -253
  77. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  78. package/fesm2022/koobiq-components-badge.mjs +46 -48
  79. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  80. package/fesm2022/koobiq-components-breadcrumbs.mjs +221 -169
  81. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  82. package/fesm2022/koobiq-components-button-toggle.mjs +565 -196
  83. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  84. package/fesm2022/koobiq-components-button.mjs +332 -116
  85. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-checkbox.mjs +172 -132
  87. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-clamped-text.mjs +165 -158
  89. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  90. package/fesm2022/koobiq-components-code-block.mjs +791 -609
  91. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  92. package/fesm2022/koobiq-components-content-panel.mjs +260 -143
  93. package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
  94. package/fesm2022/koobiq-components-core.mjs +4342 -1595
  95. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  96. package/fesm2022/koobiq-components-datepicker.mjs +1713 -1606
  97. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  98. package/fesm2022/koobiq-components-divider.mjs +73 -36
  99. package/fesm2022/koobiq-components-divider.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-dl.mjs +447 -89
  101. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  102. package/fesm2022/koobiq-components-dropdown.mjs +703 -599
  103. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  104. package/fesm2022/koobiq-components-dynamic-translation.mjs +20 -20
  105. package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
  106. package/fesm2022/koobiq-components-ellipsis-center.mjs +46 -31
  107. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  108. package/fesm2022/koobiq-components-empty-state.mjs +116 -60
  109. package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
  110. package/fesm2022/koobiq-components-file-upload.mjs +550 -290
  111. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  112. package/fesm2022/koobiq-components-filter-bar.mjs +2871 -2595
  113. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  114. package/fesm2022/koobiq-components-flag.mjs +79 -24
  115. package/fesm2022/koobiq-components-flag.mjs.map +1 -1
  116. package/fesm2022/koobiq-components-form-field.mjs +389 -525
  117. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  118. package/fesm2022/koobiq-components-icon.mjs +400 -149
  119. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  120. package/fesm2022/koobiq-components-inline-edit.mjs +429 -212
  121. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  122. package/fesm2022/koobiq-components-input.mjs +601 -459
  123. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  124. package/fesm2022/koobiq-components-link-deprecated.mjs +196 -0
  125. package/fesm2022/koobiq-components-link-deprecated.mjs.map +1 -0
  126. package/fesm2022/koobiq-components-link.mjs +328 -125
  127. package/fesm2022/koobiq-components-link.mjs.map +1 -1
  128. package/fesm2022/koobiq-components-list.mjs +583 -433
  129. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  130. package/fesm2022/koobiq-components-loader-overlay.mjs +167 -68
  131. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  132. package/fesm2022/koobiq-components-markdown.mjs +55 -78
  133. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  134. package/fesm2022/koobiq-components-modal.mjs +853 -475
  135. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  136. package/fesm2022/koobiq-components-navbar.mjs +895 -556
  137. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  138. package/fesm2022/koobiq-components-notification-center.mjs +680 -310
  139. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  140. package/fesm2022/koobiq-components-overflow-items.mjs +46 -64
  141. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  142. package/fesm2022/koobiq-components-popover.mjs +684 -285
  143. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  144. package/fesm2022/koobiq-components-progress-bar.mjs +87 -33
  145. package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
  146. package/fesm2022/koobiq-components-progress-spinner.mjs +52 -43
  147. package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
  148. package/fesm2022/koobiq-components-radio.mjs +450 -231
  149. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  150. package/fesm2022/koobiq-components-resizer.mjs +127 -21
  151. package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
  152. package/fesm2022/koobiq-components-scrollbar-deprecated.mjs +299 -0
  153. package/fesm2022/koobiq-components-scrollbar-deprecated.mjs.map +1 -0
  154. package/fesm2022/koobiq-components-scrollbar.mjs +745 -222
  155. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  156. package/fesm2022/koobiq-components-search-expandable.mjs +288 -126
  157. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  158. package/fesm2022/koobiq-components-select.mjs +883 -693
  159. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  160. package/fesm2022/koobiq-components-sidebar.mjs +207 -88
  161. package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
  162. package/fesm2022/koobiq-components-sidepanel.mjs +689 -296
  163. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  164. package/fesm2022/koobiq-components-skeleton.mjs +815 -41
  165. package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
  166. package/fesm2022/koobiq-components-split-button.mjs +109 -88
  167. package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
  168. package/fesm2022/koobiq-components-splitter-deprecated.mjs +591 -0
  169. package/fesm2022/koobiq-components-splitter-deprecated.mjs.map +1 -0
  170. package/fesm2022/koobiq-components-splitter.mjs +890 -501
  171. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  172. package/fesm2022/koobiq-components-table.mjs +63 -49
  173. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  174. package/fesm2022/koobiq-components-tabs.mjs +1062 -603
  175. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  176. package/fesm2022/koobiq-components-tags.mjs +886 -733
  177. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  178. package/fesm2022/koobiq-components-textarea.mjs +213 -185
  179. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  180. package/fesm2022/koobiq-components-time-range.mjs +299 -147
  181. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  182. package/fesm2022/koobiq-components-timepicker.mjs +233 -245
  183. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  184. package/fesm2022/koobiq-components-timezone.mjs +344 -142
  185. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  186. package/fesm2022/koobiq-components-title.mjs +229 -145
  187. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  188. package/fesm2022/koobiq-components-toast.mjs +463 -143
  189. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  190. package/fesm2022/koobiq-components-toggle.mjs +177 -130
  191. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  192. package/fesm2022/koobiq-components-tooltip.mjs +657 -214
  193. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  194. package/fesm2022/koobiq-components-top-bar.mjs +61 -32
  195. package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
  196. package/fesm2022/koobiq-components-tree-select.mjs +734 -488
  197. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  198. package/fesm2022/koobiq-components-tree.mjs +1700 -617
  199. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  200. package/fesm2022/koobiq-components-username.mjs +290 -135
  201. package/fesm2022/koobiq-components-username.mjs.map +1 -1
  202. package/file-upload/dropzone.scss +31 -3
  203. package/file-upload/file-upload-tokens.scss +2 -22
  204. package/file-upload/file-upload.scss +6 -0
  205. package/file-upload/multiple-file-upload.component.scss +14 -12
  206. package/file-upload/single-file-upload.component.scss +3 -2
  207. package/filter-bar/filters.scss +7 -0
  208. package/filter-bar/pipes/base-pipe.scss +3 -3
  209. package/filter-bar/pipes/pipe-date.scss +8 -1
  210. package/flag/flag-tokens.scss +22 -0
  211. package/flag/flag.scss +34 -21
  212. package/form-field/{_fiedset-theme.scss → _fieldset-theme.scss} +1 -5
  213. package/form-field/_form-field-theme.scss +4 -9
  214. package/form-field/cleaner.scss +3 -1
  215. package/form-field/fieldset.scss +3 -4
  216. package/form-field/form-field.scss +26 -21
  217. package/form-field/password-toggle.scss +3 -1
  218. package/icon/_icon-button-theme.scss +7 -0
  219. package/icon/_icon-theme.scss +10 -7
  220. package/icon/icon-button.scss +0 -2
  221. package/icon/icon-tokens.scss +12 -9
  222. package/inline-edit/inline-edit.scss +40 -54
  223. package/input/input.scss +4 -0
  224. package/link/{_link-theme.scss → deprecated/_link-theme.scss} +11 -6
  225. package/link/deprecated/link-tokens.scss +27 -0
  226. package/link/link-tokens.scss +6 -25
  227. package/link/link.scss +137 -0
  228. package/list/list.scss +3 -2
  229. package/loader-overlay/_loader-overlay-theme.scss +19 -10
  230. package/loader-overlay/loader-overlay-tokens.scss +0 -2
  231. package/loader-overlay/loader-overlay.scss +7 -1
  232. package/markdown/_markdown-theme.scss +16 -0
  233. package/markdown/markdown-tokens.scss +5 -0
  234. package/markdown/markdown.scss +2 -1
  235. package/modal/_modal-animation.scss +23 -14
  236. package/modal/modal-tokens.scss +2 -1
  237. package/modal/modal.scss +35 -31
  238. package/navbar/_navbar-item_horizontal.scss +8 -6
  239. package/navbar/_navbar-item_vertical.scss +18 -6
  240. package/navbar/_navbar-theme.scss +9 -1
  241. package/navbar/navbar-brand.scss +8 -6
  242. package/navbar/navbar-divider.scss +1 -1
  243. package/navbar/navbar-item.scss +8 -9
  244. package/navbar/navbar-toggle.scss +3 -3
  245. package/navbar/navbar-tokens.scss +14 -0
  246. package/navbar/navbar.scss +1 -2
  247. package/navbar/vertical-navbar.scss +2 -2
  248. package/notification-center/_notification-center-theme.scss +11 -6
  249. package/notification-center/notification-center-tokens.scss +33 -0
  250. package/notification-center/notification-center.scss +58 -20
  251. package/notification-center/notification-item.scss +15 -6
  252. package/package.json +112 -81
  253. package/popover/popover-tokens.scss +0 -2
  254. package/popover/popover.scss +41 -19
  255. package/prebuilt-themes/theme.css +1 -1
  256. package/progress-bar/_progress-bar-theme.scss +20 -3
  257. package/progress-bar/progress-bar-tokens.scss +3 -0
  258. package/progress-bar/progress-bar.scss +36 -8
  259. package/progress-spinner/progress-spinner.scss +4 -3
  260. package/radio/_radio-theme.scss +21 -4
  261. package/radio/radio-tokens.scss +7 -3
  262. package/radio/radio.scss +55 -8
  263. package/schematics/collection.json +415 -18
  264. package/schematics/migrations/accordion-state-saving-default/README.md +60 -0
  265. package/schematics/migrations/accordion-state-saving-default/data.cjs +75 -0
  266. package/schematics/migrations/accordion-state-saving-default/index.cjs +61 -0
  267. package/schematics/migrations/accordion-state-saving-default/schema.json +15 -0
  268. package/schematics/migrations/actions-panel-overlay-container/README.md +35 -0
  269. package/schematics/migrations/actions-panel-overlay-container/data.cjs +47 -0
  270. package/schematics/migrations/actions-panel-overlay-container/index.cjs +55 -0
  271. package/schematics/migrations/actions-panel-overlay-container/schema.json +15 -0
  272. package/schematics/migrations/alert-signals/README.md +13 -7
  273. package/schematics/migrations/alert-signals/{data.js → data.cjs} +3 -0
  274. package/schematics/migrations/alert-signals/index.cjs +221 -0
  275. package/schematics/migrations/angular-animations-removal/README.md +46 -0
  276. package/schematics/migrations/angular-animations-removal/data.cjs +150 -0
  277. package/schematics/migrations/angular-animations-removal/index.cjs +21 -0
  278. package/schematics/migrations/angular-animations-removal/schema.json +15 -0
  279. package/schematics/migrations/app-switcher-signals/README.md +88 -0
  280. package/schematics/migrations/app-switcher-signals/data.cjs +136 -0
  281. package/schematics/migrations/app-switcher-signals/index.cjs +366 -0
  282. package/schematics/migrations/app-switcher-signals/schema.json +20 -0
  283. package/schematics/migrations/autocomplete-panel-width-auto/README.md +2 -2
  284. package/schematics/migrations/autocomplete-panel-width-auto/{index.js → index.cjs} +6 -5
  285. package/schematics/migrations/autocomplete-signals/README.md +92 -0
  286. package/schematics/migrations/autocomplete-signals/data.cjs +149 -0
  287. package/schematics/migrations/autocomplete-signals/index.cjs +707 -0
  288. package/schematics/migrations/autocomplete-signals/schema.json +20 -0
  289. package/schematics/migrations/badge-signals/README.md +77 -0
  290. package/schematics/migrations/badge-signals/data.cjs +109 -0
  291. package/schematics/migrations/badge-signals/index.cjs +694 -0
  292. package/schematics/migrations/badge-signals/schema.json +20 -0
  293. package/schematics/migrations/button-state-and-styles/README.md +129 -0
  294. package/schematics/migrations/button-state-and-styles/data.cjs +136 -0
  295. package/schematics/migrations/button-state-and-styles/index.cjs +221 -0
  296. package/schematics/migrations/button-state-and-styles/schema.json +20 -0
  297. package/schematics/migrations/button-supported-colors/README.md +73 -0
  298. package/schematics/migrations/button-supported-colors/data.cjs +106 -0
  299. package/schematics/migrations/button-supported-colors/index.cjs +261 -0
  300. package/schematics/migrations/button-supported-colors/schema.json +20 -0
  301. package/schematics/migrations/button-toggle-signals-and-aria/README.md +137 -0
  302. package/schematics/migrations/button-toggle-signals-and-aria/data.cjs +200 -0
  303. package/schematics/migrations/button-toggle-signals-and-aria/index.cjs +497 -0
  304. package/schematics/migrations/button-toggle-signals-and-aria/schema.json +20 -0
  305. package/schematics/migrations/button-truncation/README.md +110 -0
  306. package/schematics/migrations/button-truncation/data.cjs +88 -0
  307. package/schematics/migrations/button-truncation/index.cjs +270 -0
  308. package/schematics/migrations/button-truncation/schema.json +20 -0
  309. package/schematics/migrations/checkbox-signals/README.md +76 -0
  310. package/schematics/migrations/checkbox-signals/data.cjs +114 -0
  311. package/schematics/migrations/checkbox-signals/index.cjs +635 -0
  312. package/schematics/migrations/checkbox-signals/schema.json +20 -0
  313. package/schematics/migrations/clamped-text-disclosure/README.md +62 -0
  314. package/schematics/migrations/clamped-text-disclosure/data.cjs +101 -0
  315. package/schematics/migrations/clamped-text-disclosure/index.cjs +60 -0
  316. package/schematics/migrations/clamped-text-disclosure/schema.json +15 -0
  317. package/schematics/migrations/code-block-highlight-js-core/README.md +53 -0
  318. package/schematics/migrations/code-block-highlight-js-core/data.cjs +64 -0
  319. package/schematics/migrations/code-block-highlight-js-core/index.cjs +319 -0
  320. package/schematics/migrations/code-block-highlight-js-core/schema.json +20 -0
  321. package/schematics/migrations/code-block-signals/README.md +84 -0
  322. package/schematics/migrations/code-block-signals/data.cjs +121 -0
  323. package/schematics/migrations/code-block-signals/index.cjs +701 -0
  324. package/schematics/migrations/code-block-signals/schema.json +20 -0
  325. package/schematics/migrations/color-signals/README.md +46 -0
  326. package/schematics/migrations/color-signals/data.cjs +131 -0
  327. package/schematics/migrations/color-signals/index.cjs +20 -0
  328. package/schematics/migrations/color-signals/schema.json +20 -0
  329. package/schematics/migrations/core-mixins-removal/README.md +20 -0
  330. package/schematics/migrations/core-mixins-removal/data.cjs +27 -0
  331. package/schematics/migrations/core-mixins-removal/index.cjs +18 -0
  332. package/schematics/migrations/core-mixins-removal/schema.json +15 -0
  333. package/schematics/migrations/css-selectors/README.md +2 -2
  334. package/schematics/migrations/css-selectors/{index.js → index.cjs} +4 -3
  335. package/schematics/migrations/datepicker-signals/README.md +24 -0
  336. package/schematics/migrations/datepicker-signals/data.cjs +49 -0
  337. package/schematics/migrations/datepicker-signals/index.cjs +18 -0
  338. package/schematics/migrations/datepicker-signals/schema.json +15 -0
  339. package/schematics/migrations/deprecated-icons/README.md +2 -2
  340. package/schematics/migrations/deprecated-icons/{index.js → index.cjs} +8 -7
  341. package/schematics/migrations/design-tokens-v4/README.md +75 -0
  342. package/schematics/migrations/design-tokens-v4/index.cjs +60 -0
  343. package/schematics/migrations/design-tokens-v4/schema.json +15 -0
  344. package/schematics/migrations/divider-signals-and-aria/README.md +47 -0
  345. package/schematics/migrations/divider-signals-and-aria/data.cjs +62 -0
  346. package/schematics/migrations/divider-signals-and-aria/index.cjs +212 -0
  347. package/schematics/migrations/divider-signals-and-aria/schema.json +15 -0
  348. package/schematics/migrations/dl-attribute-coercion/README.md +59 -0
  349. package/schematics/migrations/dl-attribute-coercion/data.cjs +85 -0
  350. package/schematics/migrations/dl-attribute-coercion/index.cjs +162 -0
  351. package/schematics/migrations/dl-attribute-coercion/schema.json +15 -0
  352. package/schematics/migrations/dl-standalone-names/README.md +49 -0
  353. package/schematics/migrations/dl-standalone-names/data.cjs +44 -0
  354. package/schematics/migrations/dl-standalone-names/index.cjs +322 -0
  355. package/schematics/migrations/dl-standalone-names/schema.json +20 -0
  356. package/schematics/migrations/dropdown-demote-overlay/README.md +137 -0
  357. package/schematics/migrations/dropdown-demote-overlay/data.cjs +84 -0
  358. package/schematics/migrations/dropdown-demote-overlay/index.cjs +289 -0
  359. package/schematics/migrations/dropdown-demote-overlay/schema.json +20 -0
  360. package/schematics/migrations/dropdown-signals/README.md +83 -0
  361. package/schematics/migrations/dropdown-signals/data.cjs +152 -0
  362. package/schematics/migrations/dropdown-signals/index.cjs +20 -0
  363. package/schematics/migrations/dropdown-signals/schema.json +20 -0
  364. package/schematics/migrations/empty-state-error-color/README.md +84 -0
  365. package/schematics/migrations/empty-state-error-color/data.cjs +85 -0
  366. package/schematics/migrations/empty-state-error-color/index.cjs +72 -0
  367. package/schematics/migrations/empty-state-error-color/schema.json +15 -0
  368. package/schematics/migrations/empty-state-size-attr/README.md +2 -2
  369. package/schematics/migrations/empty-state-size-attr/{index.js → index.cjs} +6 -5
  370. package/schematics/migrations/file-upload-cva-and-primitives/README.md +70 -0
  371. package/schematics/migrations/file-upload-cva-and-primitives/data.cjs +97 -0
  372. package/schematics/migrations/file-upload-cva-and-primitives/index.cjs +61 -0
  373. package/schematics/migrations/file-upload-cva-and-primitives/schema.json +15 -0
  374. package/schematics/migrations/file-upload-deprecated-outputs/README.md +90 -0
  375. package/schematics/migrations/file-upload-deprecated-outputs/data.cjs +20 -0
  376. package/schematics/migrations/file-upload-deprecated-outputs/index.cjs +71 -0
  377. package/schematics/migrations/file-upload-deprecated-outputs/schema.json +20 -0
  378. package/schematics/migrations/filter-bar-rename-action/README.md +183 -0
  379. package/schematics/migrations/filter-bar-rename-action/data.cjs +151 -0
  380. package/schematics/migrations/filter-bar-rename-action/index.cjs +178 -0
  381. package/schematics/migrations/filter-bar-rename-action/schema.json +20 -0
  382. package/schematics/migrations/filter-bar-signals/README.md +27 -16
  383. package/schematics/migrations/filter-bar-signals/{data.js → data.cjs} +1 -2
  384. package/schematics/migrations/filter-bar-signals/index.cjs +225 -0
  385. package/schematics/migrations/filter-bar-state-saving-default/README.md +53 -0
  386. package/schematics/migrations/filter-bar-state-saving-default/data.cjs +87 -0
  387. package/schematics/migrations/filter-bar-state-saving-default/index.cjs +62 -0
  388. package/schematics/migrations/filter-bar-state-saving-default/schema.json +15 -0
  389. package/schematics/migrations/flag-inner-html/README.md +67 -0
  390. package/schematics/migrations/flag-inner-html/data.cjs +58 -0
  391. package/schematics/migrations/flag-inner-html/index.cjs +62 -0
  392. package/schematics/migrations/flag-inner-html/schema.json +15 -0
  393. package/schematics/migrations/form-field-signals/README.md +125 -0
  394. package/schematics/migrations/form-field-signals/data.cjs +288 -0
  395. package/schematics/migrations/form-field-signals/index.cjs +383 -0
  396. package/schematics/migrations/form-field-signals/schema.json +20 -0
  397. package/schematics/migrations/icon-semantics-and-api/README.md +65 -0
  398. package/schematics/migrations/icon-semantics-and-api/data.cjs +97 -0
  399. package/schematics/migrations/icon-semantics-and-api/index.cjs +65 -0
  400. package/schematics/migrations/icon-semantics-and-api/schema.json +15 -0
  401. package/schematics/migrations/icons-replacement/README.md +5 -5
  402. package/schematics/migrations/icons-replacement/{index.js → index.cjs} +4 -3
  403. package/schematics/migrations/inline-edit-a11y-and-types/README.md +82 -0
  404. package/schematics/migrations/inline-edit-a11y-and-types/data.cjs +117 -0
  405. package/schematics/migrations/inline-edit-a11y-and-types/index.cjs +98 -0
  406. package/schematics/migrations/inline-edit-a11y-and-types/schema.json +20 -0
  407. package/schematics/migrations/input-number-surface/README.md +140 -0
  408. package/schematics/migrations/input-number-surface/data.cjs +135 -0
  409. package/schematics/migrations/input-number-surface/index.cjs +293 -0
  410. package/schematics/migrations/input-number-surface/schema.json +20 -0
  411. package/schematics/migrations/input-signals/README.md +20 -0
  412. package/schematics/migrations/input-signals/data.cjs +30 -0
  413. package/schematics/migrations/input-signals/index.cjs +18 -0
  414. package/schematics/migrations/input-signals/schema.json +15 -0
  415. package/schematics/migrations/link-deprecated-path/README.md +144 -0
  416. package/schematics/migrations/link-deprecated-path/index.cjs +20 -0
  417. package/schematics/migrations/link-deprecated-path/schema.json +20 -0
  418. package/schematics/migrations/link-signals/README.md +71 -0
  419. package/schematics/migrations/link-signals/data.cjs +116 -0
  420. package/schematics/migrations/link-signals/index.cjs +416 -0
  421. package/schematics/migrations/link-signals/schema.json +20 -0
  422. package/schematics/migrations/list-signals/README.md +22 -0
  423. package/schematics/migrations/list-signals/data.cjs +35 -0
  424. package/schematics/migrations/list-signals/index.cjs +18 -0
  425. package/schematics/migrations/list-signals/schema.json +15 -0
  426. package/schematics/migrations/list-tree-multiple-input/README.md +105 -0
  427. package/schematics/migrations/list-tree-multiple-input/data.cjs +74 -0
  428. package/schematics/migrations/list-tree-multiple-input/index.cjs +222 -0
  429. package/schematics/migrations/list-tree-multiple-input/schema.json +20 -0
  430. package/schematics/migrations/loader-overlay-signals/README.md +62 -0
  431. package/schematics/migrations/loader-overlay-signals/data.cjs +101 -0
  432. package/schematics/migrations/loader-overlay-signals/index.cjs +698 -0
  433. package/schematics/migrations/loader-overlay-signals/schema.json +20 -0
  434. package/schematics/migrations/loader-overlay-size-attr/README.md +2 -2
  435. package/schematics/migrations/loader-overlay-size-attr/{index.js → index.cjs} +6 -5
  436. package/schematics/migrations/locale-configuration-providers/README.md +163 -0
  437. package/schematics/migrations/locale-configuration-providers/data.cjs +257 -0
  438. package/schematics/migrations/locale-configuration-providers/index.cjs +295 -0
  439. package/schematics/migrations/locale-configuration-providers/schema.json +20 -0
  440. package/schematics/migrations/mandatory-peer-dependencies/README.md +70 -0
  441. package/schematics/migrations/mandatory-peer-dependencies/index.cjs +43 -0
  442. package/schematics/migrations/mandatory-peer-dependencies/schema.json +15 -0
  443. package/schematics/migrations/markdown-signals/README.md +58 -0
  444. package/schematics/migrations/markdown-signals/data.cjs +79 -0
  445. package/schematics/migrations/markdown-signals/index.cjs +640 -0
  446. package/schematics/migrations/markdown-signals/schema.json +20 -0
  447. package/schematics/migrations/modal-dialog-semantics/README.md +106 -0
  448. package/schematics/migrations/modal-dialog-semantics/data.cjs +110 -0
  449. package/schematics/migrations/modal-dialog-semantics/index.cjs +59 -0
  450. package/schematics/migrations/modal-dialog-semantics/schema.json +15 -0
  451. package/schematics/migrations/modal-signals/README.md +88 -0
  452. package/schematics/migrations/modal-signals/data.cjs +132 -0
  453. package/schematics/migrations/modal-signals/index.cjs +20 -0
  454. package/schematics/migrations/modal-signals/schema.json +20 -0
  455. package/schematics/migrations/navbar-signals-and-aria/README.md +111 -0
  456. package/schematics/migrations/navbar-signals-and-aria/data.cjs +198 -0
  457. package/schematics/migrations/navbar-signals-and-aria/index.cjs +569 -0
  458. package/schematics/migrations/navbar-signals-and-aria/schema.json +20 -0
  459. package/schematics/migrations/new-icons-pack/README.md +10 -10
  460. package/schematics/migrations/new-icons-pack/{index.js → index.cjs} +8 -7
  461. package/schematics/migrations/notification-center-signals/README.md +67 -0
  462. package/schematics/migrations/notification-center-signals/data.cjs +66 -0
  463. package/schematics/migrations/notification-center-signals/index.cjs +62 -0
  464. package/schematics/migrations/notification-center-signals/schema.json +15 -0
  465. package/schematics/migrations/option-signals/README.md +37 -0
  466. package/schematics/migrations/option-signals/data.cjs +86 -0
  467. package/schematics/migrations/option-signals/index.cjs +20 -0
  468. package/schematics/migrations/option-signals/schema.json +20 -0
  469. package/schematics/migrations/popover-leave-delay/README.md +51 -0
  470. package/schematics/migrations/popover-leave-delay/data.cjs +61 -0
  471. package/schematics/migrations/popover-leave-delay/index.cjs +55 -0
  472. package/schematics/migrations/popover-leave-delay/schema.json +15 -0
  473. package/schematics/migrations/progress-bar-percentage-and-aria/README.md +54 -0
  474. package/schematics/migrations/progress-bar-percentage-and-aria/data.cjs +76 -0
  475. package/schematics/migrations/progress-bar-percentage-and-aria/index.cjs +59 -0
  476. package/schematics/migrations/progress-bar-percentage-and-aria/schema.json +15 -0
  477. package/schematics/migrations/progress-spinner-signals/README.md +72 -0
  478. package/schematics/migrations/progress-spinner-signals/data.cjs +83 -0
  479. package/schematics/migrations/progress-spinner-signals/index.cjs +695 -0
  480. package/schematics/migrations/progress-spinner-signals/schema.json +20 -0
  481. package/schematics/migrations/query-list-signals/README.md +32 -0
  482. package/schematics/migrations/query-list-signals/data.cjs +70 -0
  483. package/schematics/migrations/query-list-signals/index.cjs +18 -0
  484. package/schematics/migrations/query-list-signals/schema.json +15 -0
  485. package/schematics/migrations/radio-signals-and-aria/README.md +82 -0
  486. package/schematics/migrations/radio-signals-and-aria/data.cjs +163 -0
  487. package/schematics/migrations/radio-signals-and-aria/index.cjs +40 -0
  488. package/schematics/migrations/radio-signals-and-aria/schema.json +20 -0
  489. package/schematics/migrations/read-state-dwell-handlers/README.md +125 -0
  490. package/schematics/migrations/read-state-dwell-handlers/data.cjs +45 -0
  491. package/schematics/migrations/read-state-dwell-handlers/index.cjs +216 -0
  492. package/schematics/migrations/read-state-dwell-handlers/schema.json +20 -0
  493. package/schematics/migrations/scrollbar-deprecated-path/README.md +128 -0
  494. package/schematics/migrations/scrollbar-deprecated-path/index.cjs +21 -0
  495. package/schematics/migrations/scrollbar-deprecated-path/schema.json +20 -0
  496. package/schematics/migrations/select-signal-inputs/README.md +61 -0
  497. package/schematics/migrations/select-signal-inputs/data.cjs +99 -0
  498. package/schematics/migrations/select-signal-inputs/index.cjs +58 -0
  499. package/schematics/migrations/select-signal-inputs/schema.json +15 -0
  500. package/schematics/migrations/sidepanel-non-modal-behavior/README.md +57 -0
  501. package/schematics/migrations/sidepanel-non-modal-behavior/data.cjs +111 -0
  502. package/schematics/migrations/sidepanel-non-modal-behavior/index.cjs +58 -0
  503. package/schematics/migrations/sidepanel-non-modal-behavior/schema.json +15 -0
  504. package/schematics/migrations/signal-inputs-subclasses/README.md +28 -0
  505. package/schematics/migrations/signal-inputs-subclasses/data.cjs +69 -0
  506. package/schematics/migrations/signal-inputs-subclasses/index.cjs +18 -0
  507. package/schematics/migrations/signal-inputs-subclasses/schema.json +15 -0
  508. package/schematics/migrations/split-button-optional-disabled/README.md +47 -0
  509. package/schematics/migrations/split-button-optional-disabled/data.cjs +53 -0
  510. package/schematics/migrations/split-button-optional-disabled/index.cjs +58 -0
  511. package/schematics/migrations/split-button-optional-disabled/schema.json +15 -0
  512. package/schematics/migrations/splitter-deprecated-path/README.md +136 -0
  513. package/schematics/migrations/splitter-deprecated-path/index.cjs +21 -0
  514. package/schematics/migrations/splitter-deprecated-path/schema.json +20 -0
  515. package/schematics/migrations/state-saving-default/README.md +67 -0
  516. package/schematics/migrations/state-saving-default/data.cjs +88 -0
  517. package/schematics/migrations/state-saving-default/index.cjs +63 -0
  518. package/schematics/migrations/state-saving-default/schema.json +15 -0
  519. package/schematics/migrations/table-cell-content/README.md +55 -0
  520. package/schematics/migrations/table-cell-content/data.cjs +66 -0
  521. package/schematics/migrations/table-cell-content/index.cjs +67 -0
  522. package/schematics/migrations/table-cell-content/schema.json +15 -0
  523. package/schematics/migrations/tabs-signals-and-aria/README.md +93 -0
  524. package/schematics/migrations/tabs-signals-and-aria/data.cjs +139 -0
  525. package/schematics/migrations/tabs-signals-and-aria/index.cjs +66 -0
  526. package/schematics/migrations/tabs-signals-and-aria/schema.json +15 -0
  527. package/schematics/migrations/tag-list-cleaner/README.md +58 -0
  528. package/schematics/migrations/tag-list-cleaner/data.cjs +42 -0
  529. package/schematics/migrations/tag-list-cleaner/index.cjs +197 -0
  530. package/schematics/migrations/tag-list-cleaner/schema.json +20 -0
  531. package/schematics/migrations/tag-slots/README.md +41 -0
  532. package/schematics/migrations/tag-slots/index.cjs +191 -0
  533. package/schematics/migrations/tag-slots/schema.json +20 -0
  534. package/schematics/migrations/tags-signals/README.md +85 -0
  535. package/schematics/migrations/tags-signals/data.cjs +103 -0
  536. package/schematics/migrations/tags-signals/index.cjs +674 -0
  537. package/schematics/migrations/tags-signals/schema.json +20 -0
  538. package/schematics/migrations/textarea-signals/README.md +72 -0
  539. package/schematics/migrations/textarea-signals/data.cjs +121 -0
  540. package/schematics/migrations/textarea-signals/index.cjs +380 -0
  541. package/schematics/migrations/textarea-signals/schema.json +20 -0
  542. package/schematics/migrations/time-range-title-for/README.md +164 -0
  543. package/schematics/migrations/time-range-title-for/data.cjs +139 -0
  544. package/schematics/migrations/time-range-title-for/index.cjs +164 -0
  545. package/schematics/migrations/time-range-title-for/schema.json +20 -0
  546. package/schematics/migrations/timepicker-signals/README.md +78 -0
  547. package/schematics/migrations/timepicker-signals/data.cjs +82 -0
  548. package/schematics/migrations/timepicker-signals/index.cjs +710 -0
  549. package/schematics/migrations/timepicker-signals/schema.json +20 -0
  550. package/schematics/migrations/timezone-grouping-utils/README.md +73 -0
  551. package/schematics/migrations/timezone-grouping-utils/data.cjs +101 -0
  552. package/schematics/migrations/timezone-grouping-utils/index.cjs +65 -0
  553. package/schematics/migrations/timezone-grouping-utils/schema.json +15 -0
  554. package/schematics/migrations/title-encapsulation/README.md +49 -0
  555. package/schematics/migrations/title-encapsulation/data.cjs +69 -0
  556. package/schematics/migrations/title-encapsulation/index.cjs +58 -0
  557. package/schematics/migrations/title-encapsulation/schema.json +15 -0
  558. package/schematics/migrations/toast-stack-and-defaults/README.md +102 -0
  559. package/schematics/migrations/toast-stack-and-defaults/data.cjs +79 -0
  560. package/schematics/migrations/toast-stack-and-defaults/index.cjs +54 -0
  561. package/schematics/migrations/toast-stack-and-defaults/schema.json +15 -0
  562. package/schematics/migrations/tooltip-pointer-events-and-types/README.md +53 -0
  563. package/schematics/migrations/tooltip-pointer-events-and-types/data.cjs +89 -0
  564. package/schematics/migrations/tooltip-pointer-events-and-types/index.cjs +61 -0
  565. package/schematics/migrations/tooltip-pointer-events-and-types/schema.json +15 -0
  566. package/schematics/migrations/top-bar-container-selectors/README.md +111 -0
  567. package/schematics/migrations/top-bar-container-selectors/data.cjs +56 -0
  568. package/schematics/migrations/top-bar-container-selectors/index.cjs +85 -0
  569. package/schematics/migrations/top-bar-container-selectors/schema.json +20 -0
  570. package/schematics/migrations/tree-select-signals/README.md +61 -0
  571. package/schematics/migrations/tree-select-signals/data.cjs +106 -0
  572. package/schematics/migrations/tree-select-signals/index.cjs +59 -0
  573. package/schematics/migrations/tree-select-signals/schema.json +15 -0
  574. package/schematics/migrations/tree-signals/README.md +82 -0
  575. package/schematics/migrations/tree-signals/data.cjs +123 -0
  576. package/schematics/migrations/tree-signals/index.cjs +55 -0
  577. package/schematics/migrations/tree-signals/schema.json +15 -0
  578. package/schematics/migrations/tree-state-saving-default/README.md +66 -0
  579. package/schematics/migrations/tree-state-saving-default/data.cjs +78 -0
  580. package/schematics/migrations/tree-state-saving-default/index.cjs +61 -0
  581. package/schematics/migrations/tree-state-saving-default/schema.json +15 -0
  582. package/schematics/migrations/username-pipe-injection/README.md +59 -0
  583. package/schematics/migrations/username-pipe-injection/data.cjs +78 -0
  584. package/schematics/migrations/username-pipe-injection/index.cjs +59 -0
  585. package/schematics/migrations/username-pipe-injection/schema.json +15 -0
  586. package/schematics/migrations/v20-upgrade/README.md +36 -16
  587. package/schematics/migrations/v20-upgrade/{data.js → data.cjs} +124 -77
  588. package/schematics/migrations/v20-upgrade/index.cjs +19 -0
  589. package/schematics/migrations/v21-upgrade/README.md +271 -0
  590. package/schematics/migrations/v21-upgrade/data.cjs +1371 -0
  591. package/schematics/migrations/v21-upgrade/index.cjs +95 -0
  592. package/schematics/migrations/v21-upgrade/schema.json +20 -0
  593. package/schematics/migrations/zoneless-change-detection/README.md +30 -0
  594. package/schematics/migrations/zoneless-change-detection/data.cjs +29 -0
  595. package/schematics/migrations/zoneless-change-detection/index.cjs +21 -0
  596. package/schematics/migrations/zoneless-change-detection/schema.json +15 -0
  597. package/schematics/migrations.json +401 -6
  598. package/schematics/ng-add/index.cjs +266 -0
  599. package/schematics/ng-add/schema.json +15 -0
  600. package/schematics/utils/{angular-parsing.js → angular-parsing.cjs} +2 -2
  601. package/schematics/utils/deprecated-path-migration.cjs +62 -0
  602. package/schematics/utils/html-config.cjs +148 -0
  603. package/schematics/utils/{icon-migration.js → icon-migration.cjs} +2 -2
  604. package/schematics/utils/list-item-pattern.cjs +16 -0
  605. package/schematics/utils/{package-config.js → package-config.cjs} +3 -32
  606. package/schematics/utils/project-files.cjs +25 -0
  607. package/schematics/utils/replacement-driver.cjs +337 -0
  608. package/schematics/utils/safe-rule.cjs +23 -0
  609. package/schematics/utils/signal-members-migration.cjs +779 -0
  610. package/schematics/utils/tag-patterns.cjs +21 -0
  611. package/schematics/utils/template-ref-access.cjs +155 -0
  612. package/schematics/utils/{typescript.js → typescript.cjs} +1 -1
  613. package/schematics/utils/warn-only-migration.cjs +52 -0
  614. package/schematics/utils/workspace-styles.cjs +123 -0
  615. package/scrollbar/{_scrollbar-component-theme.scss → deprecated/_scrollbar-component-theme.scss} +1 -1
  616. package/scrollbar/{scrollbar.component.scss → deprecated/scrollbar.component.scss} +1 -1
  617. package/scrollbar/native-scrollbar.scss +68 -0
  618. package/scrollbar/scrollbar-tokens.scss +13 -22
  619. package/scrollbar/scrollbar-track.scss +94 -0
  620. package/scrollbar/scrollbar-viewport.scss +33 -0
  621. package/scrollbar/scrollbar.scss +24 -0
  622. package/search-expandable/search-expandable-tokens.scss +4 -0
  623. package/search-expandable/search-expandable.scss +4 -2
  624. package/select/_select-theme.scss +3 -16
  625. package/select/select.scss +0 -6
  626. package/sidebar/sidebar.scss +20 -0
  627. package/sidepanel/_sidepanel-theme.scss +1 -1
  628. package/sidepanel/sidepanel-tokens.scss +7 -1
  629. package/sidepanel/sidepanel.scss +41 -5
  630. package/skeleton/skeleton-presets.scss +350 -0
  631. package/skeleton/skeleton-tokens.scss +127 -0
  632. package/skeleton/skeleton.scss +53 -45
  633. package/split-button/_split-button-theme.scss +4 -4
  634. package/split-button/split-button.scss +2 -6
  635. package/splitter/{_splitter-theme.scss → deprecated/_splitter-theme.scss} +1 -1
  636. package/splitter/deprecated/splitter.scss +51 -0
  637. package/splitter/splitter-tokens.scss +19 -0
  638. package/splitter/splitter.scss +148 -28
  639. package/table/_table-theme.scss +13 -12
  640. package/table/table-tokens.scss +8 -0
  641. package/table/table.scss +47 -22
  642. package/tabs/_tabs-common.scss +14 -14
  643. package/tabs/_tabs-theme.scss +4 -5
  644. package/tabs/tab-body.scss +49 -1
  645. package/tabs/tab-header.scss +2 -1
  646. package/tags/tag-list.scss +4 -0
  647. package/tags/tag.scss +19 -1
  648. package/time-range/time-range.scss +9 -0
  649. package/timezone/timezone-option.component.scss +4 -7
  650. package/timezone/timezone-select.component.scss +3 -0
  651. package/toast/_toast-theme.scss +1 -4
  652. package/toast/toast-container.component.scss +19 -13
  653. package/toast/toast-tokens.scss +12 -6
  654. package/toast/toast.component.scss +42 -19
  655. package/toggle/_toggle-theme.scss +4 -10
  656. package/toggle/toggle.scss +67 -26
  657. package/tooltip/_tooltip-theme.scss +7 -1
  658. package/tooltip/tooltip-tokens.scss +1 -2
  659. package/tooltip/tooltip.scss +55 -9
  660. package/top-bar/top-bar-tokens.scss +13 -2
  661. package/top-bar/top-bar.scss +24 -19
  662. package/tree/_tree-theme.scss +0 -1
  663. package/tree/toggle.scss +5 -9
  664. package/tree/tree-option.scss +2 -4
  665. package/tree/tree-tokens.scss +2 -1
  666. package/tree/tree.scss +3 -5
  667. package/tree-select/_tree-select-theme.scss +4 -15
  668. package/tree-select/tree-select-tokens.scss +16 -0
  669. package/tree-select/tree-select.scss +0 -6
  670. package/{accordion/index.d.ts → types/koobiq-components-accordion.d.ts} +102 -84
  671. package/{actions-panel/index.d.ts → types/koobiq-components-actions-panel.d.ts} +44 -59
  672. package/{alert/index.d.ts → types/koobiq-components-alert.d.ts} +8 -3
  673. package/types/koobiq-components-app-switcher.d.ts +406 -0
  674. package/types/koobiq-components-autocomplete.d.ts +443 -0
  675. package/{badge/index.d.ts → types/koobiq-components-badge.d.ts} +25 -20
  676. package/{breadcrumbs/index.d.ts → types/koobiq-components-breadcrumbs.d.ts} +97 -46
  677. package/types/koobiq-components-button-toggle.d.ts +340 -0
  678. package/types/koobiq-components-button.d.ts +296 -0
  679. package/types/koobiq-components-checkbox.d.ts +172 -0
  680. package/types/koobiq-components-clamped-text.d.ts +184 -0
  681. package/{code-block/index.d.ts → types/koobiq-components-code-block.d.ts} +150 -88
  682. package/{content-panel/index.d.ts → types/koobiq-components-content-panel.d.ts} +81 -25
  683. package/{core/index.d.ts → types/koobiq-components-core.d.ts} +2827 -865
  684. package/{datepicker/index.d.ts → types/koobiq-components-datepicker.d.ts} +161 -116
  685. package/types/koobiq-components-divider.d.ts +43 -0
  686. package/types/koobiq-components-dl.d.ts +235 -0
  687. package/{dropdown/index.d.ts → types/koobiq-components-dropdown.d.ts} +245 -239
  688. package/types/koobiq-components-ellipsis-center.d.ts +85 -0
  689. package/types/koobiq-components-empty-state.d.ts +106 -0
  690. package/{file-upload/index.d.ts → types/koobiq-components-file-upload.d.ts} +214 -107
  691. package/{filter-bar/index.d.ts → types/koobiq-components-filter-bar.d.ts} +410 -495
  692. package/types/koobiq-components-flag.d.ts +68 -0
  693. package/{form-field/index.d.ts → types/koobiq-components-form-field.d.ts} +167 -191
  694. package/types/koobiq-components-icon.d.ts +333 -0
  695. package/{inline-edit/index.d.ts → types/koobiq-components-inline-edit.d.ts} +109 -46
  696. package/types/koobiq-components-input.d.ts +477 -0
  697. package/types/koobiq-components-link-deprecated.d.ts +101 -0
  698. package/types/koobiq-components-link.d.ts +176 -0
  699. package/{list/index.d.ts → types/koobiq-components-list.d.ts} +162 -99
  700. package/types/koobiq-components-loader-overlay.d.ts +101 -0
  701. package/{markdown/index.d.ts → types/koobiq-components-markdown.d.ts} +16 -24
  702. package/types/koobiq-components-modal.d.ts +666 -0
  703. package/types/koobiq-components-navbar.d.ts +569 -0
  704. package/types/koobiq-components-notification-center.d.ts +500 -0
  705. package/{overflow-items/index.d.ts → types/koobiq-components-overflow-items.d.ts} +8 -22
  706. package/types/koobiq-components-popover.d.ts +468 -0
  707. package/types/koobiq-components-progress-bar.d.ts +67 -0
  708. package/{progress-spinner/index.d.ts → types/koobiq-components-progress-spinner.d.ts} +33 -10
  709. package/types/koobiq-components-radio.d.ts +294 -0
  710. package/{resizer/index.d.ts → types/koobiq-components-resizer.d.ts} +37 -2
  711. package/{scrollbar/index.d.ts → types/koobiq-components-scrollbar-deprecated.d.ts} +18 -1
  712. package/types/koobiq-components-scrollbar.d.ts +154 -0
  713. package/types/koobiq-components-search-expandable.d.ts +164 -0
  714. package/{select/index.d.ts → types/koobiq-components-select.d.ts} +360 -167
  715. package/types/koobiq-components-sidebar.d.ts +152 -0
  716. package/types/koobiq-components-sidepanel.d.ts +436 -0
  717. package/types/koobiq-components-skeleton.d.ts +234 -0
  718. package/types/koobiq-components-split-button.d.ts +65 -0
  719. package/{splitter/index.d.ts → types/koobiq-components-splitter-deprecated.d.ts} +44 -1
  720. package/types/koobiq-components-splitter.d.ts +406 -0
  721. package/types/koobiq-components-table.d.ts +44 -0
  722. package/types/koobiq-components-tabs.d.ts +888 -0
  723. package/{tags/index.d.ts → types/koobiq-components-tags.d.ts} +249 -133
  724. package/types/koobiq-components-textarea.d.ts +178 -0
  725. package/{time-range/index.d.ts → types/koobiq-components-time-range.d.ts} +135 -62
  726. package/types/koobiq-components-timepicker.d.ts +223 -0
  727. package/types/koobiq-components-timezone.d.ts +266 -0
  728. package/types/koobiq-components-title.d.ts +184 -0
  729. package/types/koobiq-components-toast.d.ts +289 -0
  730. package/types/koobiq-components-toggle.d.ts +121 -0
  731. package/types/koobiq-components-tooltip.d.ts +610 -0
  732. package/types/koobiq-components-top-bar.d.ts +61 -0
  733. package/types/koobiq-components-tree-select.d.ts +670 -0
  734. package/types/koobiq-components-tree.d.ts +1339 -0
  735. package/types/koobiq-components-username.d.ts +340 -0
  736. package/username/_username-theme.scss +35 -0
  737. package/username/username.scss +10 -34
  738. package/app-switcher/index.d.ts +0 -276
  739. package/autocomplete/index.d.ts +0 -286
  740. package/button/index.d.ts +0 -153
  741. package/button-toggle/index.d.ts +0 -162
  742. package/checkbox/index.d.ts +0 -163
  743. package/clamped-text/index.d.ts +0 -146
  744. package/core/styles/_tokens.scss +0 -7
  745. package/core/styles/common/_clearfix.scss +0 -13
  746. package/core/styles/common/_popup.scss +0 -6
  747. package/core/styles/functions/_index.scss +0 -3
  748. package/core/styles/functions/_number.scss +0 -60
  749. package/core/styles/functions/_string.scss +0 -18
  750. package/core/styles/theming/scrollbar-tokens.scss +0 -25
  751. package/core/styles/typography/_typography-utils.scss +0 -84
  752. package/divider/index.d.ts +0 -20
  753. package/dl/index.d.ts +0 -45
  754. package/ellipsis-center/index.d.ts +0 -71
  755. package/empty-state/index.d.ts +0 -45
  756. package/flag/index.d.ts +0 -44
  757. package/icon/index.d.ts +0 -200
  758. package/input/index.d.ts +0 -354
  759. package/link/index.d.ts +0 -56
  760. package/loader-overlay/index.d.ts +0 -57
  761. package/modal/index.d.ts +0 -339
  762. package/navbar/index.d.ts +0 -372
  763. package/notification-center/index.d.ts +0 -323
  764. package/popover/index.d.ts +0 -182
  765. package/prebuilt-themes/dark-theme.css +0 -1
  766. package/prebuilt-themes/light-theme.css +0 -1
  767. package/progress-bar/index.d.ts +0 -31
  768. package/radio/index.d.ts +0 -203
  769. package/schematics/migrations/alert-signals/index.js +0 -353
  770. package/schematics/migrations/filter-bar-signals/index.js +0 -319
  771. package/schematics/migrations/v20-upgrade/index.js +0 -225
  772. package/schematics/ng-add/index.js +0 -39
  773. package/search-expandable/index.d.ts +0 -101
  774. package/sidebar/index.d.ts +0 -94
  775. package/sidepanel/index.d.ts +0 -272
  776. package/skeleton/index.d.ts +0 -26
  777. package/split-button/index.d.ts +0 -46
  778. package/table/index.d.ts +0 -25
  779. package/tabs/index.d.ts +0 -677
  780. package/textarea/index.d.ts +0 -138
  781. package/timepicker/index.d.ts +0 -197
  782. package/timezone/index.d.ts +0 -125
  783. package/title/index.d.ts +0 -139
  784. package/toast/index.d.ts +0 -178
  785. package/toggle/index.d.ts +0 -104
  786. package/tooltip/index.d.ts +0 -335
  787. package/top-bar/index.d.ts +0 -33
  788. package/tree/index.d.ts +0 -802
  789. package/tree-select/index.d.ts +0 -475
  790. package/username/index.d.ts +0 -194
  791. /package/schematics/migrations/css-selectors/{data.js → data.cjs} +0 -0
  792. /package/schematics/migrations/deprecated-icons/{data.js → data.cjs} +0 -0
  793. /package/schematics/migrations/icons-replacement/{data.js → data.cjs} +0 -0
  794. /package/schematics/migrations/new-icons-pack/{data.js → data.cjs} +0 -0
  795. /package/schematics/utils/{ast.js → ast.cjs} +0 -0
  796. /package/schematics/utils/{messages.js → messages.cjs} +0 -0
  797. /package/{dynamic-translation/index.d.ts → types/koobiq-components-dynamic-translation.d.ts} +0 -0
  798. /package/{index.d.ts → types/koobiq-components.d.ts} +0 -0
@@ -1,18 +1,20 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, ElementRef, ChangeDetectorRef, viewChild, EventEmitter, ViewEncapsulation, ChangeDetectionStrategy, Component, signal, Injector, TemplateRef, Injectable, Renderer2, input, Input, Directive, booleanAttribute, effect, NgModule } from '@angular/core';
3
- import { CdkTrapFocus, A11yModule, ConfigurableFocusTrapFactory, FocusTrapFactory } from '@angular/cdk/a11y';
2
+ import { InjectionToken, inject, ElementRef, ChangeDetectorRef, Injector, signal, viewChild, computed, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component, untracked, Renderer2, input, Directive, booleanAttribute, effect, isDevMode, TemplateRef, Injectable, NgModule } from '@angular/core';
3
+ import { CdkTrapFocus, ConfigurableFocusTrapFactory, FocusTrapFactory, A11yModule } from '@angular/cdk/a11y';
4
4
  import { BasePortalOutlet, CdkPortalOutlet, TemplatePortal, ComponentPortal, PortalModule } from '@angular/cdk/portal';
5
+ import * as i1 from '@koobiq/components/core';
6
+ import { kbqAnimationsDisabled, kbqAfterAnimations, ESCAPE, isHtmlElement, KbqLocaleOverridesDirective, KBQ_A11Y_LOCALE_CONFIGURATION, KbqOverflowShadowContainer, KBQ_STATE_STORE, KbqStateSavingService } from '@koobiq/components/core';
5
7
  import { Subject, merge } from 'rxjs';
6
- import { trigger, state, style, transition, animate } from '@angular/animations';
7
- import * as i3 from '@koobiq/components/core';
8
- import { KbqAnimationDurations, KbqAnimationCurves, ESCAPE, isHtmlElement, KbqOverflowShadowContainer } from '@koobiq/components/core';
9
- import * as i1 from '@koobiq/components/button';
8
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
+ import * as i2 from '@koobiq/components/button';
10
10
  import { KbqButtonModule } from '@koobiq/components/button';
11
- import * as i2 from '@koobiq/components/icon';
11
+ import * as i3 from '@koobiq/components/icon';
12
12
  import { KbqIconModule } from '@koobiq/components/icon';
13
+ import * as i4 from '@koobiq/components/scrollbar';
14
+ import { KbqScrollbarViewport } from '@koobiq/components/scrollbar';
13
15
  import { KbqTitleDirective, KbqTitleModule } from '@koobiq/components/title';
14
16
  import { filter, take, tap } from 'rxjs/operators';
15
- import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
17
+ import { Overlay, OverlayContainer, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
16
18
 
17
19
  /** Injection token that can be used to access the data that was passed in to a sidepanel. */
18
20
  const KBQ_SIDEPANEL_DATA = new InjectionToken('KbqSidepanelData');
@@ -44,6 +46,7 @@ class KbqSidepanelConfig {
44
46
  }
45
47
  }
46
48
 
49
+ /** @internal */
47
50
  var KbqSidepanelAnimationState;
48
51
  (function (KbqSidepanelAnimationState) {
49
52
  KbqSidepanelAnimationState["Void"] = "void";
@@ -53,7 +56,7 @@ var KbqSidepanelAnimationState;
53
56
  KbqSidepanelAnimationState["BottomPanel"] = "bottom-panel";
54
57
  KbqSidepanelAnimationState["BecomingNormal"] = "becoming-normal";
55
58
  })(KbqSidepanelAnimationState || (KbqSidepanelAnimationState = {}));
56
- // TODO Find a way to use dynamic keys and avoid error "Expression form not supported."
59
+ /** @internal */
57
60
  const kbqSidepanelTransformAnimation = {
58
61
  right: {
59
62
  in: 'translateX(100%)',
@@ -84,27 +87,6 @@ const kbqSidepanelTransformAnimation = {
84
87
  becomingNormal: 'translateY(0%) scale(1)'
85
88
  }
86
89
  };
87
- const kbqSidepanelAnimations = {
88
- sidepanelState: trigger('state', [
89
- state(KbqSidepanelAnimationState.Void, style({ opacity: 0 })),
90
- state(KbqSidepanelAnimationState.Hidden, style({ transform: '{{transformIn}}' }), {
91
- params: { transformIn: kbqSidepanelTransformAnimation[KbqSidepanelPosition.Right].in }
92
- }),
93
- state(KbqSidepanelAnimationState.Visible, style({ transform: '{{transformOut}}', opacity: 1 }), {
94
- params: { transformOut: kbqSidepanelTransformAnimation[KbqSidepanelPosition.Right].out }
95
- }),
96
- state(KbqSidepanelAnimationState.Lower, style({ transform: '{{lower}}', opacity: 1 }), {
97
- params: { lower: kbqSidepanelTransformAnimation[KbqSidepanelPosition.Right].lower }
98
- }),
99
- state(KbqSidepanelAnimationState.BottomPanel, style({ transform: '{{bottomPanel}}', opacity: 0 }), {
100
- params: { bottomPanel: kbqSidepanelTransformAnimation[KbqSidepanelPosition.Right].bottomPanel }
101
- }),
102
- state(KbqSidepanelAnimationState.BecomingNormal, style({ transform: '{{becomingNormal}}', opacity: 1 }), {
103
- params: { becomingNormal: kbqSidepanelTransformAnimation[KbqSidepanelPosition.Right].becomingNormal }
104
- }),
105
- transition('* <=> *', animate(`${KbqAnimationDurations.Long} ${KbqAnimationCurves.EaseInOutQuad}`))
106
- ])
107
- };
108
90
 
109
91
  const KBQ_SIDEPANEL_WITH_INDENT = new InjectionToken('kbq-sidepanel-with-indent');
110
92
  class KbqSidepanelContainerComponent extends BasePortalOutlet {
@@ -112,24 +94,101 @@ class KbqSidepanelContainerComponent extends BasePortalOutlet {
112
94
  super(...arguments);
113
95
  this.elementRef = inject(ElementRef);
114
96
  this.changeDetectorRef = inject(ChangeDetectorRef);
97
+ this.injector = inject(Injector);
115
98
  this.sidepanelConfig = inject(KbqSidepanelConfig);
116
- this.withIndent = inject(KBQ_SIDEPANEL_WITH_INDENT);
99
+ /** Whether the sidepanel moves without motion. */
100
+ this.animationsDisabled = kbqAnimationsDisabled();
101
+ this._withIndent = signal(inject(KBQ_SIDEPANEL_WITH_INDENT), ...(ngDevMode ? [{ debugName: "_withIndent" }] : /* istanbul ignore next */ []));
102
+ // A signal: the header reports its title while this view is being checked, which a `markForCheck` would miss.
103
+ this._ariaLabelledBy = signal(this.sidepanelConfig.ariaLabelledBy ?? null, ...(ngDevMode ? [{ debugName: "_ariaLabelledBy" }] : /* istanbul ignore next */ []));
117
104
  /** The portal outlet inside of this container into which the content will be loaded. */
118
105
  this.portalOutlet = viewChild.required(CdkPortalOutlet);
119
- /** The state of the sidepanel animations. */
120
- this.animationState = KbqSidepanelAnimationState.Void;
121
- /** Emits whenever the state of the animation changes. */
122
- this.animationStateChanged = new EventEmitter();
106
+ /**
107
+ * The state of the sidepanel: on screen, closing, or stacked under another one.
108
+ *
109
+ * @internal
110
+ */
111
+ this.animationState = signal(KbqSidepanelAnimationState.Void, ...(ngDevMode ? [{ debugName: "animationState" }] : /* istanbul ignore next */ []));
112
+ /**
113
+ * Reports each state transition starting and ending.
114
+ *
115
+ * @internal
116
+ */
117
+ this.animationStateChanged = new Subject();
118
+ /** Transition events held until the render that applies the state, in the order they happened. */
119
+ this.unreportedEvents = [];
123
120
  /** @docs-private */
124
121
  this.indentClickEmitter = new Subject();
122
+ /**
123
+ * Transform of the panel in its current state.
124
+ *
125
+ * @internal
126
+ */
127
+ this.stateTransform = computed(() => {
128
+ const transforms = kbqSidepanelTransformAnimation[this.position];
129
+ switch (this.animationState()) {
130
+ case KbqSidepanelAnimationState.Hidden:
131
+ return transforms.in;
132
+ case KbqSidepanelAnimationState.Visible:
133
+ return transforms.out;
134
+ case KbqSidepanelAnimationState.Lower:
135
+ return transforms.lower;
136
+ case KbqSidepanelAnimationState.BottomPanel:
137
+ return transforms.bottomPanel;
138
+ case KbqSidepanelAnimationState.BecomingNormal:
139
+ return transforms.becomingNormal;
140
+ default:
141
+ return null;
142
+ }
143
+ }, ...(ngDevMode ? [{ debugName: "stateTransform" }] : /* istanbul ignore next */ []));
144
+ /**
145
+ * Opacity of the panel in its current state.
146
+ *
147
+ * @internal
148
+ */
149
+ this.stateOpacity = computed(() => {
150
+ switch (this.animationState()) {
151
+ case KbqSidepanelAnimationState.Void:
152
+ case KbqSidepanelAnimationState.BottomPanel:
153
+ return 0;
154
+ case KbqSidepanelAnimationState.Hidden:
155
+ return null;
156
+ default:
157
+ return 1;
158
+ }
159
+ }, ...(ngDevMode ? [{ debugName: "stateOpacity" }] : /* istanbul ignore next */ []));
160
+ }
161
+ /** Whether the panel exposes the clickable indent strip of the sidepanel stacked underneath it. */
162
+ get withIndent() {
163
+ return this._withIndent();
164
+ }
165
+ set withIndent(value) {
166
+ this._withIndent.set(value);
167
+ }
168
+ /**
169
+ * Id of the element naming the sidepanel. Comes from the config, or from `kbq-sidepanel-header`.
170
+ *
171
+ * @docs-private
172
+ */
173
+ get ariaLabelledBy() {
174
+ return this._ariaLabelledBy();
125
175
  }
126
176
  /** @docs-private */
127
- get size() {
128
- return `kbq-sidepanel_${this.sidepanelConfig.size}`;
177
+ set ariaLabelledBy(value) {
178
+ this._ariaLabelledBy.set(value);
129
179
  }
130
180
  /** @docs-private */
181
+ get size() {
182
+ return `kbq-sidepanel_${this.sidepanelConfig.size ?? KbqSidepanelSize.Medium}`;
183
+ }
184
+ /**
185
+ * Defaults to `true` in both modalities: it is what moves focus into the panel on open and returns
186
+ * it to the trigger on close, and `CdkTrapFocus` restores focus only when it captured it.
187
+ *
188
+ * @docs-private
189
+ */
131
190
  get trapFocusAutoCapture() {
132
- return this.sidepanelConfig.trapFocusAutoCapture ?? !!this.sidepanelConfig.hasBackdrop;
191
+ return this.sidepanelConfig.trapFocusAutoCapture ?? true;
133
192
  }
134
193
  /** @docs-private */
135
194
  get trapFocus() {
@@ -149,14 +208,17 @@ class KbqSidepanelContainerComponent extends BasePortalOutlet {
149
208
  /** Attach a component portal as content to this sidepanel container. */
150
209
  attachComponentPortal(portal) {
151
210
  this.validatePortalAttached();
152
- this.setAnimation();
153
211
  this.setPanelClass();
154
- return this.portalOutlet().attachComponentPortal(portal);
212
+ const componentRef = this.portalOutlet().attachComponentPortal(portal);
213
+ // The portal outlet inserts the attached component's own host element between
214
+ // `.kbq-sidepanel-content` and the header/body/footer, and a plain block there takes the
215
+ // body out of the flex column that makes it scroll.
216
+ componentRef.location.nativeElement.classList.add('kbq-sidepanel-content-host');
217
+ return componentRef;
155
218
  }
156
219
  /** Attach a template portal as content to this sidepanel container. */
157
220
  attachTemplatePortal(portal) {
158
221
  this.validatePortalAttached();
159
- this.setAnimation();
160
222
  this.setPanelClass();
161
223
  return this.portalOutlet().attachTemplatePortal(portal);
162
224
  }
@@ -164,8 +226,9 @@ class KbqSidepanelContainerComponent extends BasePortalOutlet {
164
226
  enter() {
165
227
  if (this.destroyed)
166
228
  return;
167
- this.animationState = KbqSidepanelAnimationState.Visible;
229
+ this.animationState.set(KbqSidepanelAnimationState.Visible);
168
230
  this.changeDetectorRef.detectChanges();
231
+ this.startTransition(KbqSidepanelAnimationState.Visible);
169
232
  }
170
233
  /** Begin animation of the sidepanel exiting from view. */
171
234
  exit() {
@@ -173,56 +236,97 @@ class KbqSidepanelContainerComponent extends BasePortalOutlet {
173
236
  return;
174
237
  this.setAnimationState(KbqSidepanelAnimationState.Hidden);
175
238
  }
176
- /** @docs-private */
177
- onAnimation(event) {
178
- this.animationStateChanged.emit(event);
179
- }
180
- /** @docs-private */
239
+ /** @internal */
181
240
  setAnimationState(state) {
182
- this.animationState = state;
183
- this.changeDetectorRef.markForCheck();
184
- }
185
- setAnimation() {
186
- const position = this.sidepanelConfig.position;
187
- this.animationTransform = {
188
- transformIn: kbqSidepanelTransformAnimation[position].in,
189
- transformOut: kbqSidepanelTransformAnimation[position].out,
190
- lower: kbqSidepanelTransformAnimation[position].lower,
191
- bottomPanel: kbqSidepanelTransformAnimation[position].bottomPanel,
192
- becomingNormal: kbqSidepanelTransformAnimation[position].becomingNormal
193
- };
241
+ if (this.destroyed)
242
+ return;
243
+ this.animationState.set(state);
244
+ this.startTransition(state);
245
+ }
246
+ /**
247
+ * Recomputes whether this panel exposes an indent strip, after the stack it belongs to changed.
248
+ *
249
+ * @docs-private
250
+ */
251
+ setWithIndent(withIndent) {
252
+ this.withIndent = withIndent;
253
+ }
254
+ /**
255
+ * Names the sidepanel after the title of its header. A name given through the config wins.
256
+ *
257
+ * @docs-private
258
+ */
259
+ setAriaLabelledBy(id) {
260
+ if (this.ariaLabelledBy !== null)
261
+ return;
262
+ this.ariaLabelledBy = id;
263
+ }
264
+ /**
265
+ * Reports the transition to `state` starting, and ending once its CSS transition has.
266
+ *
267
+ * Both are reported after the render that applies the state, as the animation engine did, and never inside
268
+ * `open()` or `close()`: a subscriber that opens another sidepanel would otherwise do so before the stack the
269
+ * call is changing is complete, and one that subscribes right after the call would miss the start.
270
+ */
271
+ startTransition(state) {
272
+ const pending = this.pendingTransition;
273
+ if (pending) {
274
+ pending.wait.destroy();
275
+ this.holdEvent({ phaseName: 'done', toState: pending.state });
276
+ }
277
+ this.holdEvent({ phaseName: 'start', toState: state });
278
+ const wait = kbqAfterAnimations(() => this.elementRef.nativeElement, () => {
279
+ this.pendingTransition = undefined;
280
+ this.unreportedEvents.push({ phaseName: 'done', toState: state });
281
+ this.reportEvents();
282
+ }, this.injector);
283
+ this.pendingTransition = { state, wait };
284
+ }
285
+ holdEvent(event) {
286
+ this.unreportedEvents.push(event);
287
+ this.reportAfterRender ??= afterNextRender(() => this.reportEvents(), { injector: this.injector });
288
+ }
289
+ reportEvents() {
290
+ this.reportAfterRender?.destroy();
291
+ // One at a time: a subscriber that moves the panel again holds more events, which follow in order.
292
+ for (let event = this.unreportedEvents.shift(); event; event = this.unreportedEvents.shift()) {
293
+ this.animationStateChanged.next(event);
294
+ }
295
+ this.reportAfterRender = undefined;
194
296
  }
195
297
  setPanelClass() {
196
- const element = this.elementRef.nativeElement;
197
- const position = this.sidepanelConfig.position;
198
- element.classList.add(`kbq-sidepanel-container_${position}`);
298
+ this.elementRef.nativeElement.classList.add(`kbq-sidepanel-container_${this.position}`);
299
+ }
300
+ get position() {
301
+ return this.sidepanelConfig.position ?? KbqSidepanelPosition.Right;
199
302
  }
200
303
  validatePortalAttached() {
201
304
  if (this.portalOutlet().hasAttached()) {
202
305
  throw Error('Attempting to attach sidepanel content after content is already attached');
203
306
  }
204
307
  }
205
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
206
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqSidepanelContainerComponent, isStandalone: true, selector: "kbq-sidepanel-container", host: { listeners: { "@state.start": "onAnimation($event)", "@state.done": "onAnimation($event)" }, properties: { "class": "size", "class.kbq-sidepanel_nested": "withIndent", "attr.id": "id", "attr.tabindex": "-1", "@state": "{\n value: animationState,\n params: animationTransform\n }" }, classAttribute: "kbq-sidepanel-container kbq-sidepanel-container_shadowed" }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"kbq-sidepanel-wrapper\">\n @if (withIndent) {\n <div class=\"kbq-sidepanel-indent\" (click)=\"indentClickEmitter.next($event)\"></div>\n }\n\n <div class=\"kbq-sidepanel-content\" [cdkTrapFocus]=\"trapFocus\" [cdkTrapFocusAutoCapture]=\"trapFocusAutoCapture\">\n <ng-template cdkPortalOutlet />\n </div>\n</div>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-sidepanel-container{outline:none;display:flex;flex:1;position:fixed;min-height:0}.kbq-sidepanel-container .flex{min-height:0}.kbq-sidepanel-container.kbq-sidepanel-container_left,.kbq-sidepanel-container.kbq-sidepanel-container_right{height:100%;top:0;max-width:100%}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_small,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_small{width:var(--kbq-sidepanel-size-small-width);max-width:var(--kbq-sidepanel-size-small-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_medium,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_medium{width:var(--kbq-sidepanel-size-medium-width);max-width:var(--kbq-sidepanel-size-medium-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_large,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_large{width:var(--kbq-sidepanel-size-large-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left .kbq-sidepanel-indent,.kbq-sidepanel-container.kbq-sidepanel-container_right .kbq-sidepanel-indent{width:var(--kbq-sidepanel-size-panel-lower-offset);height:100%}.kbq-sidepanel-container.kbq-sidepanel-container_top,.kbq-sidepanel-container.kbq-sidepanel-container_bottom{flex-direction:column;height:33%;min-height:400px;width:calc(100% - 2 * var(--kbq-sidepanel-size-panel-viewport-margin));left:0}.kbq-sidepanel-container.kbq-sidepanel-container_top .kbq-sidepanel-indent,.kbq-sidepanel-container.kbq-sidepanel-container_bottom .kbq-sidepanel-indent{height:var(--kbq-sidepanel-size-panel-lower-offset);width:100%}.kbq-sidepanel-container_right{right:0;transform:translate(100%)}.kbq-sidepanel-container_right .kbq-sidepanel-wrapper{flex-direction:row}.kbq-sidepanel-container_right .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_right{transform-origin:center left}.kbq-sidepanel-container_left{left:0;transform:translate(-100%)}.kbq-sidepanel-container_left .kbq-sidepanel-wrapper{flex-direction:row-reverse}.kbq-sidepanel-container_left .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_left{transform-origin:center right}.kbq-sidepanel-container_top{top:0;transform:translateY(-100%)}.kbq-sidepanel-container_top .kbq-sidepanel-wrapper{flex-direction:column-reverse}.kbq-sidepanel-container_top .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_top{transform-origin:center bottom}.kbq-sidepanel-container_bottom{bottom:0;transform:translateY(100%)}.kbq-sidepanel-container_bottom .kbq-sidepanel-wrapper{flex-direction:column}.kbq-sidepanel-container_bottom .kbq-sidepanel-content{margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_bottom{transform-origin:center top}.kbq-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%;position:relative}.kbq-sidepanel-indent{display:flex;flex:0 0 auto;cursor:pointer;position:absolute}.kbq-sidepanel-container_top .kbq-sidepanel-indent{bottom:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_right .kbq-sidepanel-indent{left:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_bottom .kbq-sidepanel-indent{top:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_left .kbq-sidepanel-indent{right:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%;border-radius:var(--kbq-size-border-radius)}.kbq-sidepanel-header{display:flex;align-items:baseline;justify-content:space-between;flex-flow:row nowrap;flex:0 0 auto;transition:box-shadow .1s ease-in-out;padding:var(--kbq-sidepanel-size-header-padding-vertical) var(--kbq-sidepanel-size-header-padding-right) var(--kbq-sidepanel-size-header-padding-vertical) var(--kbq-sidepanel-size-header-padding-left)}.kbq-sidepanel-header .kbq-sidepanel-close{margin-left:var(--kbq-sidepanel-size-close-button-margin-left)}.kbq-sidepanel-header.kbq-sidepanel-header_truncate-text{align-items:center}.kbq-sidepanel-header.kbq-sidepanel-header_truncate-text .kbq-sidepanel-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-sidepanel-title{flex:1}.kbq-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0;padding:var(--kbq-sidepanel-size-content-padding-top) var(--kbq-sidepanel-size-content-padding-horizontal) var(--kbq-sidepanel-size-content-padding-bottom)}.kbq-sidepanel-footer{display:flex;align-items:center;justify-content:space-between;flex-flow:row nowrap;flex:0 0 auto;transition:box-shadow .1s ease-in-out;padding:var(--kbq-sidepanel-size-footer-padding-top) var(--kbq-sidepanel-size-footer-padding-horizontal) var(--kbq-sidepanel-size-footer-padding-bottom)}.kbq-sidepanel-footer .kbq-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.kbq-sidepanel-footer .kbq-sidepanel-actions[align=left]{justify-content:start}.kbq-sidepanel-footer .kbq-sidepanel-actions[align=right]{justify-content:flex-end}.kbq-sidepanel-footer .kbq-sidepanel-actions{gap:var(--kbq-sidepanel-size-footer-content-gap-horizontal)}.kbq-sidepanel-title{color:var(--kbq-sidepanel-header-text-color)}.kbq-sidepanel-content{background-color:var(--kbq-sidepanel-container-background);color:var(--kbq-sidepanel-content-text-color)}.kbq-sidepanel-container_shadowed .kbq-sidepanel-content{box-shadow:var(--kbq-sidepanel-container-shadow)}.kbq-overlay-dark-backdrop{background:var(--kbq-background-overlay)!important}.kbq-sidepanel-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-sidepanel-container,.kbq-sidepanel-footer{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-sidepanel-container{--kbq-sidepanel-size-small-width: 400px;--kbq-sidepanel-size-medium-width: 640px;--kbq-sidepanel-size-large-width: 960px;--kbq-sidepanel-size-header-padding-vertical: var(--kbq-size-l);--kbq-sidepanel-size-header-padding-left: var(--kbq-size-xxl);--kbq-sidepanel-size-header-padding-right: var(--kbq-size-l);--kbq-sidepanel-size-close-button-margin-left: var(--kbq-size-s);--kbq-sidepanel-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-sidepanel-size-content-padding-bottom: var(--kbq-size-xxl);--kbq-sidepanel-size-panel-viewport-margin: var(--kbq-size-s);--kbq-sidepanel-size-panel-lower-offset: var(--kbq-size-l);--kbq-sidepanel-size-content-padding-top: 1px;--kbq-sidepanel-size-footer-padding-top: var(--kbq-size-xl);--kbq-sidepanel-size-footer-padding-bottom: var(--kbq-size-xl);--kbq-sidepanel-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-sidepanel-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-sidepanel-overlay-background: var(--kbq-background-overlay);--kbq-sidepanel-container-background: var(--kbq-background-card);--kbq-sidepanel-container-shadow: var(--kbq-shadow-popup);--kbq-sidepanel-header-text-color: var(--kbq-foreground-contrast);--kbq-sidepanel-content-text-color: var(--kbq-foreground-contrast)}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [kbqSidepanelAnimations.sidepanelState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
308
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
309
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqSidepanelContainerComponent, isStandalone: true, selector: "kbq-sidepanel-container", host: { properties: { "class": "size", "class.kbq-sidepanel_nested": "withIndent", "attr.id": "id", "attr.tabindex": "-1", "attr.role": "\"dialog\"", "attr.aria-modal": "trapFocus ? \"true\" : null", "attr.aria-label": "sidepanelConfig.ariaLabel ?? null", "attr.aria-labelledby": "ariaLabelledBy", "class.kbq-animations-disabled": "animationsDisabled", "style.transform": "stateTransform()", "style.opacity": "stateOpacity()" }, classAttribute: "kbq-sidepanel-container kbq-sidepanel-container_shadowed" }, providers: [{ provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }], viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"kbq-sidepanel-wrapper\">\n @if (withIndent) {\n <div class=\"kbq-sidepanel-indent\" (click)=\"indentClickEmitter.next($event)\"></div>\n }\n\n <div class=\"kbq-sidepanel-content\" [cdkTrapFocus]=\"trapFocus\" [cdkTrapFocusAutoCapture]=\"trapFocusAutoCapture\">\n <ng-template cdkPortalOutlet />\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-inline-start:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-end-start-radius:0;border-end-end-radius:0;border-start-end-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){corner-shape:squircle;border-start-end-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){corner-shape:squircle;border-end-start-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-end-start-radius:0;border-end-end-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-start-end-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-sidepanel-container{outline:none;display:flex;flex:1;position:fixed;min-height:0;transition:transform .3s cubic-bezier(.455,.03,.515,.955),opacity .3s cubic-bezier(.455,.03,.515,.955);animation:kbq-sidepanel-enter .3s cubic-bezier(.455,.03,.515,.955)}.kbq-sidepanel-container.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-sidepanel-container{animation:none;transition:none}}.kbq-sidepanel-container .flex{min-height:0}.kbq-sidepanel-container.kbq-sidepanel-container_left,.kbq-sidepanel-container.kbq-sidepanel-container_right{height:100%;top:0;max-width:100%}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_small,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_small{width:var(--kbq-sidepanel-size-small-width);max-width:var(--kbq-sidepanel-size-small-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_medium,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_medium{width:var(--kbq-sidepanel-size-medium-width);max-width:var(--kbq-sidepanel-size-medium-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_large,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_large{width:var(--kbq-sidepanel-size-large-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left .kbq-sidepanel-indent,.kbq-sidepanel-container.kbq-sidepanel-container_right .kbq-sidepanel-indent{width:var(--kbq-sidepanel-size-panel-lower-offset);height:100%}.kbq-sidepanel-container.kbq-sidepanel-container_top,.kbq-sidepanel-container.kbq-sidepanel-container_bottom{flex-direction:column;height:33%;min-height:400px;width:calc(100% - 2 * var(--kbq-sidepanel-size-panel-viewport-margin));left:0}.kbq-sidepanel-container.kbq-sidepanel-container_top .kbq-sidepanel-indent,.kbq-sidepanel-container.kbq-sidepanel-container_bottom .kbq-sidepanel-indent{height:var(--kbq-sidepanel-size-panel-lower-offset);width:100%}.kbq-sidepanel-container_right{--kbq-sidepanel-transform-in: translateX(100%);right:0;transform:var(--kbq-sidepanel-transform-in)}.kbq-sidepanel-container_right .kbq-sidepanel-wrapper{flex-direction:row}.kbq-sidepanel-container_right .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_right{transform-origin:center left}.kbq-sidepanel-container_left{--kbq-sidepanel-transform-in: translateX(-100%);left:0;transform:var(--kbq-sidepanel-transform-in)}.kbq-sidepanel-container_left .kbq-sidepanel-wrapper{flex-direction:row-reverse}.kbq-sidepanel-container_left .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_left{transform-origin:center right}.kbq-sidepanel-container_top{--kbq-sidepanel-transform-in: translateY(-100%);top:0;transform:var(--kbq-sidepanel-transform-in)}.kbq-sidepanel-container_top .kbq-sidepanel-wrapper{flex-direction:column-reverse}.kbq-sidepanel-container_top .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_top{transform-origin:center bottom}.kbq-sidepanel-container_bottom{--kbq-sidepanel-transform-in: translateY(100%);bottom:0;transform:var(--kbq-sidepanel-transform-in)}.kbq-sidepanel-container_bottom .kbq-sidepanel-wrapper{flex-direction:column}.kbq-sidepanel-container_bottom .kbq-sidepanel-content{margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_bottom{transform-origin:center top}.kbq-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%;position:relative}.kbq-sidepanel-indent{display:flex;flex:0 0 auto;cursor:pointer;position:absolute}.kbq-sidepanel-container_top .kbq-sidepanel-indent{bottom:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_right .kbq-sidepanel-indent{left:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_bottom .kbq-sidepanel-indent{top:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_left .kbq-sidepanel-indent{right:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%;border-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-sidepanel-content{corner-shape:squircle;border-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-sidepanel-content-host{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0}.kbq-sidepanel-header{display:flex;align-items:baseline;justify-content:space-between;flex-flow:row nowrap;flex:0 0 auto;transition:box-shadow .1s ease-in-out;padding:var(--kbq-sidepanel-size-header-padding-vertical) var(--kbq-sidepanel-size-header-padding-right) var(--kbq-sidepanel-size-header-padding-vertical) var(--kbq-sidepanel-size-header-padding-left)}.kbq-sidepanel-header .kbq-sidepanel-close{margin-left:var(--kbq-sidepanel-size-close-button-margin-left)}.kbq-sidepanel-header.kbq-sidepanel-header_truncate-text{align-items:center}.kbq-sidepanel-header.kbq-sidepanel-header_truncate-text .kbq-sidepanel-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-sidepanel-title{flex:1}.kbq-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0;padding:var(--kbq-sidepanel-size-content-padding-top) var(--kbq-sidepanel-size-content-padding-horizontal) var(--kbq-sidepanel-size-content-padding-bottom)}.kbq-sidepanel-footer{display:flex;align-items:center;justify-content:space-between;flex-flow:row nowrap;flex:0 0 auto;transition:box-shadow .1s ease-in-out;padding:var(--kbq-sidepanel-size-footer-padding-top) var(--kbq-sidepanel-size-footer-padding-horizontal) var(--kbq-sidepanel-size-footer-padding-bottom)}.kbq-sidepanel-footer .kbq-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.kbq-sidepanel-footer .kbq-sidepanel-actions[align=left]{justify-content:start}.kbq-sidepanel-footer .kbq-sidepanel-actions[align=right]{justify-content:flex-end}.kbq-sidepanel-footer .kbq-sidepanel-actions{gap:var(--kbq-sidepanel-size-footer-content-gap-horizontal)}@keyframes kbq-sidepanel-enter{0%{opacity:0;transform:var(--kbq-sidepanel-transform-in)}}.kbq-sidepanel-title{color:var(--kbq-sidepanel-header-text-color)}.kbq-sidepanel-content{background-color:var(--kbq-sidepanel-container-background);color:var(--kbq-sidepanel-content-text-color)}.kbq-sidepanel-container_shadowed .kbq-sidepanel-content{box-shadow:var(--kbq-sidepanel-container-shadow)}.kbq-overlay-dark-backdrop{background:var(--kbq-sidepanel-overlay-background)}.kbq-sidepanel-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-sidepanel-container,.kbq-sidepanel-footer{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-sidepanel-container{--kbq-sidepanel-size-small-width: 400px;--kbq-sidepanel-size-medium-width: 640px;--kbq-sidepanel-size-large-width: 960px;--kbq-sidepanel-size-header-padding-vertical: var(--kbq-size-l);--kbq-sidepanel-size-header-padding-left: var(--kbq-size-xxl);--kbq-sidepanel-size-header-padding-right: var(--kbq-size-l);--kbq-sidepanel-size-close-button-margin-left: var(--kbq-size-s);--kbq-sidepanel-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-sidepanel-size-content-padding-bottom: var(--kbq-size-xxl);--kbq-sidepanel-size-panel-viewport-margin: var(--kbq-size-s);--kbq-sidepanel-size-panel-lower-offset: var(--kbq-size-l);--kbq-sidepanel-size-content-padding-top: 1px;--kbq-sidepanel-size-footer-padding-top: var(--kbq-size-xl);--kbq-sidepanel-size-footer-padding-bottom: var(--kbq-size-xl);--kbq-sidepanel-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-sidepanel-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-sidepanel-container-background: var(--kbq-background-card);--kbq-sidepanel-container-shadow: var(--kbq-shadow-popup);--kbq-sidepanel-header-text-color: var(--kbq-foreground-contrast);--kbq-sidepanel-content-text-color: var(--kbq-foreground-contrast)}.kbq-overlay-dark-backdrop{--kbq-sidepanel-overlay-background: var(--kbq-background-overlay)}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
207
310
  }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelContainerComponent, decorators: [{
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelContainerComponent, decorators: [{
209
312
  type: Component,
210
313
  args: [{ selector: 'kbq-sidepanel-container', imports: [
211
314
  CdkPortalOutlet,
212
315
  CdkTrapFocus
213
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
316
+ ], providers: [{ provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
214
317
  class: 'kbq-sidepanel-container kbq-sidepanel-container_shadowed',
215
318
  '[class]': 'size',
216
319
  '[class.kbq-sidepanel_nested]': 'withIndent',
217
320
  '[attr.id]': 'id',
218
321
  '[attr.tabindex]': '-1',
219
- '[@state]': `{
220
- value: animationState,
221
- params: animationTransform
222
- }`,
223
- '(@state.start)': 'onAnimation($event)',
224
- '(@state.done)': 'onAnimation($event)'
225
- }, animations: [kbqSidepanelAnimations.sidepanelState], template: "<div class=\"kbq-sidepanel-wrapper\">\n @if (withIndent) {\n <div class=\"kbq-sidepanel-indent\" (click)=\"indentClickEmitter.next($event)\"></div>\n }\n\n <div class=\"kbq-sidepanel-content\" [cdkTrapFocus]=\"trapFocus\" [cdkTrapFocusAutoCapture]=\"trapFocusAutoCapture\">\n <ng-template cdkPortalOutlet />\n </div>\n</div>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}@media(prefers-reduced-motion:reduce){.kbq-progress:after{animation:none}}.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-sidepanel-container{outline:none;display:flex;flex:1;position:fixed;min-height:0}.kbq-sidepanel-container .flex{min-height:0}.kbq-sidepanel-container.kbq-sidepanel-container_left,.kbq-sidepanel-container.kbq-sidepanel-container_right{height:100%;top:0;max-width:100%}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_small,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_small{width:var(--kbq-sidepanel-size-small-width);max-width:var(--kbq-sidepanel-size-small-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_medium,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_medium{width:var(--kbq-sidepanel-size-medium-width);max-width:var(--kbq-sidepanel-size-medium-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_large,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_large{width:var(--kbq-sidepanel-size-large-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left .kbq-sidepanel-indent,.kbq-sidepanel-container.kbq-sidepanel-container_right .kbq-sidepanel-indent{width:var(--kbq-sidepanel-size-panel-lower-offset);height:100%}.kbq-sidepanel-container.kbq-sidepanel-container_top,.kbq-sidepanel-container.kbq-sidepanel-container_bottom{flex-direction:column;height:33%;min-height:400px;width:calc(100% - 2 * var(--kbq-sidepanel-size-panel-viewport-margin));left:0}.kbq-sidepanel-container.kbq-sidepanel-container_top .kbq-sidepanel-indent,.kbq-sidepanel-container.kbq-sidepanel-container_bottom .kbq-sidepanel-indent{height:var(--kbq-sidepanel-size-panel-lower-offset);width:100%}.kbq-sidepanel-container_right{right:0;transform:translate(100%)}.kbq-sidepanel-container_right .kbq-sidepanel-wrapper{flex-direction:row}.kbq-sidepanel-container_right .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_right{transform-origin:center left}.kbq-sidepanel-container_left{left:0;transform:translate(-100%)}.kbq-sidepanel-container_left .kbq-sidepanel-wrapper{flex-direction:row-reverse}.kbq-sidepanel-container_left .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_left{transform-origin:center right}.kbq-sidepanel-container_top{top:0;transform:translateY(-100%)}.kbq-sidepanel-container_top .kbq-sidepanel-wrapper{flex-direction:column-reverse}.kbq-sidepanel-container_top .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_top{transform-origin:center bottom}.kbq-sidepanel-container_bottom{bottom:0;transform:translateY(100%)}.kbq-sidepanel-container_bottom .kbq-sidepanel-wrapper{flex-direction:column}.kbq-sidepanel-container_bottom .kbq-sidepanel-content{margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_bottom{transform-origin:center top}.kbq-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%;position:relative}.kbq-sidepanel-indent{display:flex;flex:0 0 auto;cursor:pointer;position:absolute}.kbq-sidepanel-container_top .kbq-sidepanel-indent{bottom:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_right .kbq-sidepanel-indent{left:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_bottom .kbq-sidepanel-indent{top:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_left .kbq-sidepanel-indent{right:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%;border-radius:var(--kbq-size-border-radius)}.kbq-sidepanel-header{display:flex;align-items:baseline;justify-content:space-between;flex-flow:row nowrap;flex:0 0 auto;transition:box-shadow .1s ease-in-out;padding:var(--kbq-sidepanel-size-header-padding-vertical) var(--kbq-sidepanel-size-header-padding-right) var(--kbq-sidepanel-size-header-padding-vertical) var(--kbq-sidepanel-size-header-padding-left)}.kbq-sidepanel-header .kbq-sidepanel-close{margin-left:var(--kbq-sidepanel-size-close-button-margin-left)}.kbq-sidepanel-header.kbq-sidepanel-header_truncate-text{align-items:center}.kbq-sidepanel-header.kbq-sidepanel-header_truncate-text .kbq-sidepanel-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-sidepanel-title{flex:1}.kbq-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0;padding:var(--kbq-sidepanel-size-content-padding-top) var(--kbq-sidepanel-size-content-padding-horizontal) var(--kbq-sidepanel-size-content-padding-bottom)}.kbq-sidepanel-footer{display:flex;align-items:center;justify-content:space-between;flex-flow:row nowrap;flex:0 0 auto;transition:box-shadow .1s ease-in-out;padding:var(--kbq-sidepanel-size-footer-padding-top) var(--kbq-sidepanel-size-footer-padding-horizontal) var(--kbq-sidepanel-size-footer-padding-bottom)}.kbq-sidepanel-footer .kbq-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.kbq-sidepanel-footer .kbq-sidepanel-actions[align=left]{justify-content:start}.kbq-sidepanel-footer .kbq-sidepanel-actions[align=right]{justify-content:flex-end}.kbq-sidepanel-footer .kbq-sidepanel-actions{gap:var(--kbq-sidepanel-size-footer-content-gap-horizontal)}.kbq-sidepanel-title{color:var(--kbq-sidepanel-header-text-color)}.kbq-sidepanel-content{background-color:var(--kbq-sidepanel-container-background);color:var(--kbq-sidepanel-content-text-color)}.kbq-sidepanel-container_shadowed .kbq-sidepanel-content{box-shadow:var(--kbq-sidepanel-container-shadow)}.kbq-overlay-dark-backdrop{background:var(--kbq-background-overlay)!important}.kbq-sidepanel-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-sidepanel-container,.kbq-sidepanel-footer{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-sidepanel-container{--kbq-sidepanel-size-small-width: 400px;--kbq-sidepanel-size-medium-width: 640px;--kbq-sidepanel-size-large-width: 960px;--kbq-sidepanel-size-header-padding-vertical: var(--kbq-size-l);--kbq-sidepanel-size-header-padding-left: var(--kbq-size-xxl);--kbq-sidepanel-size-header-padding-right: var(--kbq-size-l);--kbq-sidepanel-size-close-button-margin-left: var(--kbq-size-s);--kbq-sidepanel-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-sidepanel-size-content-padding-bottom: var(--kbq-size-xxl);--kbq-sidepanel-size-panel-viewport-margin: var(--kbq-size-s);--kbq-sidepanel-size-panel-lower-offset: var(--kbq-size-l);--kbq-sidepanel-size-content-padding-top: 1px;--kbq-sidepanel-size-footer-padding-top: var(--kbq-size-xl);--kbq-sidepanel-size-footer-padding-bottom: var(--kbq-size-xl);--kbq-sidepanel-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-sidepanel-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-sidepanel-overlay-background: var(--kbq-background-overlay);--kbq-sidepanel-container-background: var(--kbq-background-card);--kbq-sidepanel-container-shadow: var(--kbq-shadow-popup);--kbq-sidepanel-header-text-color: var(--kbq-foreground-contrast);--kbq-sidepanel-content-text-color: var(--kbq-foreground-contrast)}\n"] }]
322
+ '[attr.role]': '"dialog"',
323
+ '[attr.aria-modal]': 'trapFocus ? "true" : null',
324
+ '[attr.aria-label]': 'sidepanelConfig.ariaLabel ?? null',
325
+ '[attr.aria-labelledby]': 'ariaLabelledBy',
326
+ '[class.kbq-animations-disabled]': 'animationsDisabled',
327
+ '[style.transform]': 'stateTransform()',
328
+ '[style.opacity]': 'stateOpacity()'
329
+ }, template: "<div class=\"kbq-sidepanel-wrapper\">\n @if (withIndent) {\n <div class=\"kbq-sidepanel-indent\" (click)=\"indentClickEmitter.next($event)\"></div>\n }\n\n <div class=\"kbq-sidepanel-content\" [cdkTrapFocus]=\"trapFocus\" [cdkTrapFocusAutoCapture]=\"trapFocusAutoCapture\">\n <ng-template cdkPortalOutlet />\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.kbq-group{display:flex;flex-direction:row}.kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-inline-start:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-start-end-radius:0;border-end-end-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-end-start-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-end-start-radius:0;border-end-end-radius:0;border-start-end-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){corner-shape:squircle;border-start-end-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){corner-shape:squircle;border-end-start-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child) .kbq-form-field__container{border-end-start-radius:0;border-end-end-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child) .kbq-form-field__container{border-start-start-radius:0;border-start-end-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child) .kbq-form-field__container{border-radius:0}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-sidepanel-container{outline:none;display:flex;flex:1;position:fixed;min-height:0;transition:transform .3s cubic-bezier(.455,.03,.515,.955),opacity .3s cubic-bezier(.455,.03,.515,.955);animation:kbq-sidepanel-enter .3s cubic-bezier(.455,.03,.515,.955)}.kbq-sidepanel-container.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-sidepanel-container{animation:none;transition:none}}.kbq-sidepanel-container .flex{min-height:0}.kbq-sidepanel-container.kbq-sidepanel-container_left,.kbq-sidepanel-container.kbq-sidepanel-container_right{height:100%;top:0;max-width:100%}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_small,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_small{width:var(--kbq-sidepanel-size-small-width);max-width:var(--kbq-sidepanel-size-small-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_medium,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_medium{width:var(--kbq-sidepanel-size-medium-width);max-width:var(--kbq-sidepanel-size-medium-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left.kbq-sidepanel_large,.kbq-sidepanel-container.kbq-sidepanel-container_right.kbq-sidepanel_large{width:var(--kbq-sidepanel-size-large-width)}.kbq-sidepanel-container.kbq-sidepanel-container_left .kbq-sidepanel-indent,.kbq-sidepanel-container.kbq-sidepanel-container_right .kbq-sidepanel-indent{width:var(--kbq-sidepanel-size-panel-lower-offset);height:100%}.kbq-sidepanel-container.kbq-sidepanel-container_top,.kbq-sidepanel-container.kbq-sidepanel-container_bottom{flex-direction:column;height:33%;min-height:400px;width:calc(100% - 2 * var(--kbq-sidepanel-size-panel-viewport-margin));left:0}.kbq-sidepanel-container.kbq-sidepanel-container_top .kbq-sidepanel-indent,.kbq-sidepanel-container.kbq-sidepanel-container_bottom .kbq-sidepanel-indent{height:var(--kbq-sidepanel-size-panel-lower-offset);width:100%}.kbq-sidepanel-container_right{--kbq-sidepanel-transform-in: translateX(100%);right:0;transform:var(--kbq-sidepanel-transform-in)}.kbq-sidepanel-container_right .kbq-sidepanel-wrapper{flex-direction:row}.kbq-sidepanel-container_right .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_right{transform-origin:center left}.kbq-sidepanel-container_left{--kbq-sidepanel-transform-in: translateX(-100%);left:0;transform:var(--kbq-sidepanel-transform-in)}.kbq-sidepanel-container_left .kbq-sidepanel-wrapper{flex-direction:row-reverse}.kbq-sidepanel-container_left .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_left{transform-origin:center right}.kbq-sidepanel-container_top{--kbq-sidepanel-transform-in: translateY(-100%);top:0;transform:var(--kbq-sidepanel-transform-in)}.kbq-sidepanel-container_top .kbq-sidepanel-wrapper{flex-direction:column-reverse}.kbq-sidepanel-container_top .kbq-sidepanel-content{margin-top:var(--kbq-sidepanel-size-panel-viewport-margin);margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_top{transform-origin:center bottom}.kbq-sidepanel-container_bottom{--kbq-sidepanel-transform-in: translateY(100%);bottom:0;transform:var(--kbq-sidepanel-transform-in)}.kbq-sidepanel-container_bottom .kbq-sidepanel-wrapper{flex-direction:column}.kbq-sidepanel-container_bottom .kbq-sidepanel-content{margin-right:var(--kbq-sidepanel-size-panel-viewport-margin);margin-bottom:var(--kbq-sidepanel-size-panel-viewport-margin);margin-left:var(--kbq-sidepanel-size-panel-viewport-margin)}.kbq-sidepanel-container_bottom{transform-origin:center top}.kbq-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%;position:relative}.kbq-sidepanel-indent{display:flex;flex:0 0 auto;cursor:pointer;position:absolute}.kbq-sidepanel-container_top .kbq-sidepanel-indent{bottom:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_right .kbq-sidepanel-indent{left:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_bottom .kbq-sidepanel-indent{top:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-container_left .kbq-sidepanel-indent{right:calc(-1 * var(--kbq-sidepanel-size-panel-lower-offset))}.kbq-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%;border-radius:var(--kbq-size-border-radius)}@supports (corner-shape: squircle){.kbq-sidepanel-content{corner-shape:squircle;border-radius:clamp(var(--kbq-size-border-radius) * 1.85,var(--kbq-size-border-radius) * 2.3 - 3.6px,var(--kbq-size-border-radius) * 2)}}.kbq-sidepanel-content-host{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0}.kbq-sidepanel-header{display:flex;align-items:baseline;justify-content:space-between;flex-flow:row nowrap;flex:0 0 auto;transition:box-shadow .1s ease-in-out;padding:var(--kbq-sidepanel-size-header-padding-vertical) var(--kbq-sidepanel-size-header-padding-right) var(--kbq-sidepanel-size-header-padding-vertical) var(--kbq-sidepanel-size-header-padding-left)}.kbq-sidepanel-header .kbq-sidepanel-close{margin-left:var(--kbq-sidepanel-size-close-button-margin-left)}.kbq-sidepanel-header.kbq-sidepanel-header_truncate-text{align-items:center}.kbq-sidepanel-header.kbq-sidepanel-header_truncate-text .kbq-sidepanel-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-sidepanel-title{flex:1}.kbq-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0;padding:var(--kbq-sidepanel-size-content-padding-top) var(--kbq-sidepanel-size-content-padding-horizontal) var(--kbq-sidepanel-size-content-padding-bottom)}.kbq-sidepanel-footer{display:flex;align-items:center;justify-content:space-between;flex-flow:row nowrap;flex:0 0 auto;transition:box-shadow .1s ease-in-out;padding:var(--kbq-sidepanel-size-footer-padding-top) var(--kbq-sidepanel-size-footer-padding-horizontal) var(--kbq-sidepanel-size-footer-padding-bottom)}.kbq-sidepanel-footer .kbq-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.kbq-sidepanel-footer .kbq-sidepanel-actions[align=left]{justify-content:start}.kbq-sidepanel-footer .kbq-sidepanel-actions[align=right]{justify-content:flex-end}.kbq-sidepanel-footer .kbq-sidepanel-actions{gap:var(--kbq-sidepanel-size-footer-content-gap-horizontal)}@keyframes kbq-sidepanel-enter{0%{opacity:0;transform:var(--kbq-sidepanel-transform-in)}}.kbq-sidepanel-title{color:var(--kbq-sidepanel-header-text-color)}.kbq-sidepanel-content{background-color:var(--kbq-sidepanel-container-background);color:var(--kbq-sidepanel-content-text-color)}.kbq-sidepanel-container_shadowed .kbq-sidepanel-content{box-shadow:var(--kbq-sidepanel-container-shadow)}.kbq-overlay-dark-backdrop{background:var(--kbq-sidepanel-overlay-background)}.kbq-sidepanel-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-sidepanel-container,.kbq-sidepanel-footer{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-sidepanel-container{--kbq-sidepanel-size-small-width: 400px;--kbq-sidepanel-size-medium-width: 640px;--kbq-sidepanel-size-large-width: 960px;--kbq-sidepanel-size-header-padding-vertical: var(--kbq-size-l);--kbq-sidepanel-size-header-padding-left: var(--kbq-size-xxl);--kbq-sidepanel-size-header-padding-right: var(--kbq-size-l);--kbq-sidepanel-size-close-button-margin-left: var(--kbq-size-s);--kbq-sidepanel-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-sidepanel-size-content-padding-bottom: var(--kbq-size-xxl);--kbq-sidepanel-size-panel-viewport-margin: var(--kbq-size-s);--kbq-sidepanel-size-panel-lower-offset: var(--kbq-size-l);--kbq-sidepanel-size-content-padding-top: 1px;--kbq-sidepanel-size-footer-padding-top: var(--kbq-size-xl);--kbq-sidepanel-size-footer-padding-bottom: var(--kbq-size-xl);--kbq-sidepanel-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-sidepanel-size-footer-content-gap-horizontal: var(--kbq-size-l);--kbq-sidepanel-container-background: var(--kbq-background-card);--kbq-sidepanel-container-shadow: var(--kbq-shadow-popup);--kbq-sidepanel-header-text-color: var(--kbq-foreground-contrast);--kbq-sidepanel-content-text-color: var(--kbq-foreground-contrast)}.kbq-overlay-dark-backdrop{--kbq-sidepanel-overlay-background: var(--kbq-background-overlay)}\n"] }]
226
330
  }], propDecorators: { portalOutlet: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }] } });
227
331
 
228
332
  // Counter for unique sidepanel ids.
@@ -236,16 +340,18 @@ class KbqSidepanelRef {
236
340
  * Vertical scroll overflow state of the sidepanel body.
237
341
  * Updated on scroll and used for visual adjustments.
238
342
  */
239
- this.bodyOverflow = signal({ top: false, bottom: false }, ...(ngDevMode ? [{ debugName: "bodyOverflow" }] : []));
343
+ this.bodyOverflow = signal({ top: false, bottom: false }, ...(ngDevMode ? [{ debugName: "bodyOverflow" }] : /* istanbul ignore next */ []));
240
344
  /** Subject for notifying the user that the sidepanel has been closed and dismissed. */
241
345
  this.afterClosed$ = new Subject();
242
346
  /** Subject for notifying the user that the sidepanel starting closing. */
243
347
  this.beforeClosed$ = new Subject();
244
348
  /** Subject for notifying the user that the sidepanel has opened and appeared. */
245
349
  this.afterOpened$ = new Subject();
350
+ /** Whether `close()` has already started the closing animation. */
351
+ this.closing = false;
246
352
  this.id = this.config.id || `kbq-sidepanel-${uniqueId++}`;
247
353
  this.containerInstance.id = this.id;
248
- overlayRef.backdropElement?.classList?.add(config.backdropClass ?? 'kbq-overlay-dark-backdrop');
354
+ overlayRef.backdropElement?.classList.add(config.backdropClass ?? 'kbq-overlay-dark-backdrop');
249
355
  const slideBelowStart = containerInstance.animationStateChanged.pipe(filter((event) => event.phaseName === 'start' &&
250
356
  [KbqSidepanelAnimationState.Lower, KbqSidepanelAnimationState.BottomPanel].includes(event.toState)));
251
357
  // Act on close
@@ -280,25 +386,41 @@ class KbqSidepanelRef {
280
386
  this.afterClosed$.next(this.result);
281
387
  this.afterClosed$.complete();
282
388
  });
283
- merge(overlayRef.backdropClick(), overlayRef.keydownEvents().pipe(
389
+ overlayRef
390
+ .keydownEvents()
391
+ .pipe(
284
392
  // keyCode is deprecated, but IE11 and Edge don't support code property, which we need use instead
285
- filter((event) => event.keyCode === ESCAPE)), this.containerInstance.indentClick(), overlayRef
286
- .outsidePointerEvents()
287
- .pipe(filter((event) => isHtmlElement(event.target) && !!event.target.closest('.kbq-sidepanel-container')))).subscribe(() => {
393
+ filter((event) => event.keyCode === ESCAPE))
394
+ .subscribe((event) => {
395
+ // CDK hands the key to this overlay after the layers above it, such as a tooltip, a popover or a
396
+ // confirm dialog, have handled it: one that closed spent it, and the sidepanel stays open.
397
+ if (event.defaultPrevented || this.config.disableClose)
398
+ return;
399
+ event.preventDefault();
400
+ this.close();
401
+ });
402
+ merge(overlayRef.backdropClick(), this.containerInstance.indentClick(), overlayRef.outsidePointerEvents().pipe(filter((event) => this.isClickInsideSamePositionStack(event)))).subscribe(() => {
288
403
  if (this.config.disableClose)
289
404
  return;
290
405
  this.close();
291
406
  });
292
407
  }
293
408
  close(result) {
294
- if (!this.afterClosed$.closed) {
295
- // Transition the backdrop in parallel to the sidepanel.
296
- this.containerInstance.animationStateChanged
297
- .pipe(filter((event) => event.phaseName === 'done'), take(1))
298
- .subscribe(() => this.overlayRef.detachBackdrop());
299
- this.result = result;
300
- this.containerInstance.exit();
301
- }
409
+ // Untracked, as `KbqSidepanelService.open()`: called from a consumer's `effect()`, the state of the sidepanels
410
+ // stacked under this one, read and written on the way, would make the effect run again as they move.
411
+ untracked(() => this.startClosing(result));
412
+ }
413
+ /** Body of `close()`. */
414
+ startClosing(result) {
415
+ if (this.closing)
416
+ return;
417
+ this.closing = true;
418
+ // Transition the backdrop in parallel to the sidepanel.
419
+ this.containerInstance.animationStateChanged
420
+ .pipe(filter((event) => event.phaseName === 'done'), take(1))
421
+ .subscribe(() => this.overlayRef.detachBackdrop());
422
+ this.result = result;
423
+ this.containerInstance.exit();
302
424
  }
303
425
  /** Gets an observable that is notified when the sidepanel is started closing. */
304
426
  beforeClosed() {
@@ -312,46 +434,321 @@ class KbqSidepanelRef {
312
434
  afterOpened() {
313
435
  return this.afterOpened$.asObservable();
314
436
  }
437
+ /**
438
+ * A pointer event outside this overlay closes the sidepanel only when it lands in a sidepanel of the
439
+ * same stack — that is the exposed strip of a panel opened over this one. Panels at other edges do
440
+ * not overlap this one and must not close it.
441
+ */
442
+ isClickInsideSamePositionStack(event) {
443
+ if (!isHtmlElement(event.target))
444
+ return false;
445
+ const container = event.target.closest('.kbq-sidepanel-container');
446
+ return !!container && container.classList.contains(`kbq-sidepanel-container_${this.config.position}`);
447
+ }
315
448
  }
316
449
 
450
+ /**
451
+ * Button that will close the current sidepanel.
452
+ */
453
+ class KbqSidepanelClose {
454
+ constructor() {
455
+ // `CdkPortalOutlet.attachTemplatePortal()` forwards the portal injector to the embedded view, so the
456
+ // ref is reachable from a `<ng-template>` sidepanel as well as from a component one.
457
+ this.sidepanelRef = inject(KbqSidepanelRef);
458
+ this.elementRef = inject(ElementRef);
459
+ this.renderer = inject(Renderer2);
460
+ /** Value handed to `KbqSidepanelRef.close()`, under the hyphenated spelling of the selector. */
461
+ this.sidepanelResult = input(undefined, { ...(ngDevMode ? { debugName: "sidepanelResult" } : /* istanbul ignore next */ {}), alias: 'kbq-sidepanel-close' });
462
+ /** The same value, under the camel-case spelling. */
463
+ this.kbqSidepanelClose = input(...(ngDevMode ? [undefined, { debugName: "kbqSidepanelClose" }] : /* istanbul ignore next */ []));
464
+ afterNextRender(() => {
465
+ // A button with no type submits the form it sits in, so closing a sidepanel from inside a form would
466
+ // submit it too. A type the author set is left alone. The element carries its static attributes by
467
+ // the time a directive is constructed, so this needs no lifecycle hook.
468
+ if (!this.elementRef.nativeElement.hasAttribute('type')) {
469
+ this.renderer.setAttribute(this.elementRef.nativeElement, 'type', 'button');
470
+ }
471
+ });
472
+ }
473
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
474
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqSidepanelClose, isStandalone: true, selector: "button[kbq-sidepanel-close], button[kbqSidepanelClose]", inputs: { sidepanelResult: { classPropertyName: "sidepanelResult", publicName: "kbq-sidepanel-close", isSignal: true, isRequired: false, transformFunction: null }, kbqSidepanelClose: { classPropertyName: "kbqSidepanelClose", publicName: "kbqSidepanelClose", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "sidepanelRef.close(kbqSidepanelClose() ?? sidepanelResult())" }, classAttribute: "kbq-sidepanel-close" }, ngImport: i0 }); }
475
+ }
476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelClose, decorators: [{
477
+ type: Directive,
478
+ args: [{
479
+ selector: 'button[kbq-sidepanel-close], button[kbqSidepanelClose]',
480
+ host: {
481
+ class: 'kbq-sidepanel-close',
482
+ // The camel-case spelling wins when a template binds both, as it did before.
483
+ '(click)': 'sidepanelRef.close(kbqSidepanelClose() ?? sidepanelResult())'
484
+ }
485
+ }]
486
+ }], ctorParameters: () => [], propDecorators: { sidepanelResult: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbq-sidepanel-close", required: false }] }], kbqSidepanelClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqSidepanelClose", required: false }] }] } });
487
+ /**
488
+ * Header of a sidepanel.
489
+ */
490
+ class KbqSidepanelHeader {
491
+ constructor() {
492
+ /** Accessible name for the icon-only close button. */
493
+ this.a11yLocaleConfiguration = inject(KbqLocaleOverridesDirective, { self: true }).read('a11y', KBQ_A11Y_LOCALE_CONFIGURATION);
494
+ /** Add button for close sidepanel. Default false */
495
+ this.closeable = input(false, { ...(ngDevMode ? { debugName: "closeable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
496
+ /** Enables text truncation. Default true */
497
+ this.truncateText = input(true, { ...(ngDevMode ? { debugName: "truncateText" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
498
+ /** @docs-private */
499
+ this.sidepanelRef = inject(KbqSidepanelRef);
500
+ /** Id of the title element, which is what names the sidepanel to assistive technology. */
501
+ this.titleId = `${this.sidepanelRef.id}-title`;
502
+ this.sidepanelRef.containerInstance.setAriaLabelledBy(this.titleId);
503
+ }
504
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
505
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqSidepanelHeader, isStandalone: true, selector: "kbq-sidepanel-header", inputs: { closeable: { classPropertyName: "closeable", publicName: "closeable", isSignal: true, isRequired: false, transformFunction: null }, truncateText: { classPropertyName: "truncateText", publicName: "truncateText", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.kbq-sidepanel-header_truncate-text": "truncateText()", "style.box-shadow": "sidepanelRef.bodyOverflow().top ? \"var(--kbq-shadow-overflow-normal-bottom)\" : null" }, classAttribute: "kbq-sidepanel-header" }, hostDirectives: [{ directive: i1.KbqLocaleOverridesDirective, inputs: ["kbqLocaleOverrides", "localeOverrides"] }], ngImport: i0, template: `
506
+ <div class="kbq-sidepanel-title" kbq-title [attr.id]="titleId">
507
+ <ng-content />
508
+ </div>
509
+
510
+ @if (closeable()) {
511
+ <button
512
+ kbq-button
513
+ kbq-sidepanel-close
514
+ type="button"
515
+ [attr.aria-label]="a11yLocaleConfiguration().close"
516
+ [color]="'contrast'"
517
+ [kbqStyle]="'transparent'"
518
+ >
519
+ <i kbq-icon="kbq-xmark_16" [color]="'contrast'"></i>
520
+ </button>
521
+ }
522
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i2.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i2.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: KbqSidepanelClose, selector: "button[kbq-sidepanel-close], button[kbqSidepanelClose]", inputs: ["kbq-sidepanel-close", "kbqSidepanelClose"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["aria-hidden", "iconSize", "autoColor", "kbq-icon"] }, { kind: "directive", type: KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title", "ignoreTooltipPointerEvents"], exportAs: ["kbqTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
523
+ }
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelHeader, decorators: [{
525
+ type: Component,
526
+ args: [{
527
+ selector: 'kbq-sidepanel-header',
528
+ imports: [
529
+ KbqButtonModule,
530
+ KbqSidepanelClose,
531
+ KbqIconModule,
532
+ KbqTitleDirective
533
+ ],
534
+ template: `
535
+ <div class="kbq-sidepanel-title" kbq-title [attr.id]="titleId">
536
+ <ng-content />
537
+ </div>
538
+
539
+ @if (closeable()) {
540
+ <button
541
+ kbq-button
542
+ kbq-sidepanel-close
543
+ type="button"
544
+ [attr.aria-label]="a11yLocaleConfiguration().close"
545
+ [color]="'contrast'"
546
+ [kbqStyle]="'transparent'"
547
+ >
548
+ <i kbq-icon="kbq-xmark_16" [color]="'contrast'"></i>
549
+ </button>
550
+ }
551
+ `,
552
+ changeDetection: ChangeDetectionStrategy.OnPush,
553
+ host: {
554
+ class: 'kbq-sidepanel-header',
555
+ '[class.kbq-sidepanel-header_truncate-text]': 'truncateText()',
556
+ '[style.box-shadow]': 'sidepanelRef.bodyOverflow().top ? "var(--kbq-shadow-overflow-normal-bottom)" : null'
557
+ },
558
+ hostDirectives: [
559
+ { directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }
560
+ ]
561
+ }]
562
+ }], ctorParameters: () => [], propDecorators: { closeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeable", required: false }] }], truncateText: [{ type: i0.Input, args: [{ isSignal: true, alias: "truncateText", required: false }] }] } });
563
+ /**
564
+ * Scrollable content container of a sidepanel.
565
+ */
566
+ class KbqSidepanelBody {
567
+ constructor() {
568
+ this.sidepanelRef = inject(KbqSidepanelRef);
569
+ this.overflowContainer = inject(KbqOverflowShadowContainer);
570
+ this.scrollbarViewport = inject(KbqScrollbarViewport);
571
+ effect(() => this.sidepanelRef.bodyOverflow.set(this.overflowContainer.overflow()));
572
+ this.sidepanelRef
573
+ .afterOpened()
574
+ .pipe(takeUntilDestroyed())
575
+ .subscribe(() => this.scrollbarViewport.flashScrollIndicators());
576
+ }
577
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelBody, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
578
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqSidepanelBody, isStandalone: true, selector: "kbq-sidepanel-body, [kbq-sidepanel-body], kbqSidepanelBody", host: { classAttribute: "kbq-sidepanel-body" }, hostDirectives: [{ directive: i1.KbqOverflowShadowContainer }, { directive: i4.KbqScrollbarViewport }], ngImport: i0 }); }
579
+ }
580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelBody, decorators: [{
581
+ type: Directive,
582
+ args: [{
583
+ selector: 'kbq-sidepanel-body, [kbq-sidepanel-body], kbqSidepanelBody',
584
+ host: {
585
+ class: 'kbq-sidepanel-body'
586
+ },
587
+ hostDirectives: [KbqOverflowShadowContainer, KbqScrollbarViewport]
588
+ }]
589
+ }], ctorParameters: () => [] });
590
+ /**
591
+ * Footer of a sidepanel.
592
+ */
593
+ class KbqSidepanelFooter {
594
+ constructor() {
595
+ /** @docs-private */
596
+ this.sidepanelRef = inject(KbqSidepanelRef);
597
+ }
598
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
599
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqSidepanelFooter, isStandalone: true, selector: "kbq-sidepanel-footer, [kbq-sidepanel-footer], kbqSidepanelFooter", host: { properties: { "style.box-shadow": "sidepanelRef.bodyOverflow().bottom ? \"var(--kbq-shadow-overflow-normal-top)\" : null" }, classAttribute: "kbq-sidepanel-footer" }, ngImport: i0 }); }
600
+ }
601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelFooter, decorators: [{
602
+ type: Directive,
603
+ args: [{
604
+ selector: 'kbq-sidepanel-footer, [kbq-sidepanel-footer], kbqSidepanelFooter',
605
+ host: {
606
+ class: 'kbq-sidepanel-footer',
607
+ '[style.box-shadow]': 'sidepanelRef.bodyOverflow().bottom ? "var(--kbq-shadow-overflow-normal-top)" : null'
608
+ }
609
+ }]
610
+ }] });
611
+ /**
612
+ * Actions block of a sidepanel footer.
613
+ */
614
+ class KbqSidepanelActions {
615
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelActions, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
616
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqSidepanelActions, isStandalone: true, selector: "kbq-sidepanel-actions, [kbq-sidepanel-actions], kbqSidepanelActions", host: { classAttribute: "kbq-sidepanel-actions" }, ngImport: i0 }); }
617
+ }
618
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelActions, decorators: [{
619
+ type: Directive,
620
+ args: [{
621
+ selector: 'kbq-sidepanel-actions, [kbq-sidepanel-actions], kbqSidepanelActions',
622
+ host: {
623
+ class: 'kbq-sidepanel-actions'
624
+ }
625
+ }]
626
+ }] });
627
+
317
628
  /** Injection token that can be used to specify default sidepanel options. */
318
629
  const KBQ_SIDEPANEL_DEFAULT_OPTIONS = new InjectionToken('kbq-sidepanel-default-options');
630
+ /**
631
+ * Coerces a raw persisted payload into a `KbqSidepanelState`, returning `null` for anything
632
+ * unrecognizable.
633
+ *
634
+ * Web storage is origin-wide and user-writable, so a payload is never trusted — without this, a
635
+ * hand-edited entry would decide whether a sidepanel opens.
636
+ */
637
+ const normalizeSidepanelState = (parsed) => {
638
+ const opened = parsed?.opened;
639
+ return typeof opened === 'boolean' ? { opened } : null;
640
+ };
641
+ /**
642
+ * What `KbqStateSavingService` reports for one persisted sidepanel key.
643
+ *
644
+ * The five components that persist register themselves, and a sidepanel has nothing to register: it is
645
+ * closed exactly when its entry matters, and while open it lives in an overlay with no stable position
646
+ * to be identified by. So the service stands in for it, and `host` stays `null`.
647
+ */
648
+ class KbqSidepanelStateSavingRef {
649
+ constructor(key, store) {
650
+ this.key = key;
651
+ this.store = store;
652
+ this.name = 'kbq-sidepanel';
653
+ this.host = null;
654
+ /** Persistence is opted into by supplying a `stateSavingKey`, so a tracked key is always enabled. */
655
+ this.enabled = true;
656
+ this.state = null;
657
+ }
658
+ clear() {
659
+ this.store.removeState(this.key);
660
+ this.state = null;
661
+ }
662
+ }
663
+ /** Copies the entries that carry a value, so an unset optional does not overwrite a default with `undefined`. */
664
+ const assignDefined = (target, source) => {
665
+ if (!source)
666
+ return;
667
+ for (const key of Object.keys(source)) {
668
+ if (source[key] !== undefined) {
669
+ target[key] = source[key];
670
+ }
671
+ }
672
+ };
319
673
  class KbqSidepanelService {
320
674
  constructor() {
321
675
  this.overlay = inject(Overlay);
676
+ this.overlayContainer = inject(OverlayContainer);
322
677
  this.injector = inject(Injector);
323
678
  this.defaultOptions = inject(KBQ_SIDEPANEL_DEFAULT_OPTIONS, { optional: true });
324
679
  this.parentSidepanelService = inject(KbqSidepanelService, { optional: true, skipSelf: true });
680
+ /** Sidepanels opened through this very instance, closed when this injector level is destroyed. */
325
681
  this.openedSidepanelsAtThisLevel = [];
682
+ /** The shared stack. Only the root-most instance ever holds it; the rest reach it through the getter. */
683
+ this.rootOpenedSidepanels = [];
684
+ /** Sidepanels that hid the rest of the page from assistive technology when they opened. */
685
+ this.modalSidepanels = new Set();
686
+ /** Elements outside the overlay container that were hidden from assistive technology, and their previous state. */
687
+ this.ariaHiddenElements = new Map();
688
+ this.stateStore = inject(KBQ_STATE_STORE);
689
+ this.stateSavingService = inject(KbqStateSavingService);
690
+ /**
691
+ * One entry per `stateSavingKey` this service has seen, so `KbqStateSavingService` reports what is
692
+ * stored as claimed. Without it a closed sidepanel's entry has nothing live behind it, and
693
+ * `clearOrphans()` would sweep away exactly what the next visit is meant to restore.
694
+ */
695
+ this.stateSavingRefs = new Map();
696
+ this.bulkClosedAtThisLevel = new WeakSet();
326
697
  }
327
698
  /** Keeps track of the currently-open sidepanels. */
328
699
  get openedSidepanels() {
329
- return this.parentSidepanelService
330
- ? this.parentSidepanelService.openedSidepanels
331
- : this.openedSidepanelsAtThisLevel;
700
+ return this.parentSidepanelService ? this.parentSidepanelService.openedSidepanels : this.rootOpenedSidepanels;
701
+ }
702
+ /** The instance holding the shared stack and the assistive-technology bookkeeping. */
703
+ get rootService() {
704
+ return this.parentSidepanelService?.rootService ?? this;
705
+ }
706
+ /**
707
+ * The sidepanels being closed as a group rather than one at a time, whose close is not recorded.
708
+ *
709
+ * Shared up the chain like `openedSidepanels`: `closeAll()` reaches panels another instance opened,
710
+ * and it is that instance's subscription that would record the close.
711
+ */
712
+ get bulkClosed() {
713
+ return this.parentSidepanelService ? this.parentSidepanelService.bulkClosed : this.bulkClosedAtThisLevel;
332
714
  }
333
715
  ngOnDestroy() {
334
- // Only close the sidepanels at this level on destroy
716
+ // Only close the sidepanels opened at this level on destroy,
335
717
  // since the parent service may still be active.
336
718
  this.closeSidepanels(this.openedSidepanelsAtThisLevel);
719
+ // The bookkeeping is shared, so only the instance that owns it may drop it: a child level going
720
+ // away must not reveal the page under a modal sidepanel opened somewhere else.
721
+ if (this.rootService === this) {
722
+ this.restoreContentForAssistiveTechnology();
723
+ }
724
+ this.stateSavingRefs.forEach((ref) => this.stateSavingService.unregister(ref));
725
+ this.stateSavingRefs.clear();
337
726
  }
338
727
  open(componentOrTemplateRef, config) {
339
- const fullConfig = {
340
- ...(this.defaultOptions || new KbqSidepanelConfig()),
341
- ...config
342
- };
728
+ // Untracked, as `KbqSidepanelRef.close()`: called from a consumer's `effect()`, the state of the sidepanels
729
+ // already open, read and written on the way, would make the effect run again — and open another sidepanel —
730
+ // as soon as it changes.
731
+ return untracked(() => this.openSidepanel(componentOrTemplateRef, config));
732
+ }
733
+ /** Body of `open()`. */
734
+ openSidepanel(componentOrTemplateRef, config) {
735
+ const fullConfig = new KbqSidepanelConfig();
736
+ assignDefined(fullConfig, this.defaultOptions);
737
+ assignDefined(fullConfig, config);
343
738
  if (fullConfig.id && this.getSidepanelById(fullConfig.id)) {
344
739
  throw Error(`Sidepanel with id "${fullConfig.id}" exists already. The sidepanel id must be unique.`);
345
740
  }
741
+ if (isDevMode() && fullConfig.stateSavingKey && this.isStateSavingKeyInUse(fullConfig.stateSavingKey)) {
742
+ // eslint-disable-next-line no-console
743
+ console.warn(`kbq-sidepanel: another open sidepanel already persists under the state saving key ` +
744
+ `"${fullConfig.stateSavingKey}". They share one entry, so closing either records the ` +
745
+ 'panel as closed. Give each one its own key.');
746
+ }
346
747
  const overlayRef = this.createOverlay(fullConfig);
347
- overlayRef.hostElement.classList.add('kbq-sidepanel-overlay');
348
748
  const container = this.attachContainer(overlayRef, fullConfig);
349
749
  const ref = new KbqSidepanelRef(container, overlayRef, fullConfig);
350
750
  if (componentOrTemplateRef instanceof TemplateRef) {
351
- container.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, {
352
- $implicit: fullConfig.data,
353
- sidepanelRef: ref
354
- }, this.createInjector(fullConfig, ref, container)));
751
+ container.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, { $implicit: fullConfig.data, sidepanelRef: ref }, this.createInjector(fullConfig, ref, container)));
355
752
  }
356
753
  else {
357
754
  const portal = new ComponentPortal(componentOrTemplateRef, undefined, this.createInjector(fullConfig, ref, container));
@@ -359,19 +756,76 @@ class KbqSidepanelService {
359
756
  ref.instance = contentRef.instance;
360
757
  }
361
758
  this.openedSidepanels.push(ref);
759
+ this.openedSidepanelsAtThisLevel.push(ref);
760
+ // The panel that was on top until now has to give the strip up, or the stack shows one per level.
761
+ this.updateIndents(fullConfig);
762
+ if (container.trapFocus) {
763
+ this.rootService.hideContentFromAssistiveTechnology(ref);
764
+ }
362
765
  ref.beforeClosed().subscribe(() => this.updateAnimationState(ref));
363
- ref.afterClosed().subscribe(() => this.removeOpenSidepanel(ref));
766
+ ref.afterClosed().subscribe(() => {
767
+ this.removeOpenSidepanel(ref);
768
+ // A group close is the owner going away rather than a decision to close this panel, and
769
+ // keeping the flag is what lets the next visit bring the panel back.
770
+ if (!this.bulkClosed.has(ref)) {
771
+ this.writeState(fullConfig.stateSavingKey, false);
772
+ }
773
+ });
774
+ this.writeState(fullConfig.stateSavingKey, true);
364
775
  container.enter();
365
776
  return ref;
366
777
  }
367
778
  /**
368
779
  * Closes all of the currently-open sidepanels.
780
+ *
781
+ * Closing as a group is not recorded — see `wasOpen()`.
369
782
  */
370
783
  closeAll() {
371
784
  this.closeSidepanels(this.openedSidepanels);
372
785
  }
786
+ /**
787
+ * Whether the sidepanel persisted under `key` was open when it was last recorded, so the
788
+ * application can open it again:
789
+ *
790
+ * ```ts
791
+ * if (sidepanel.wasOpen('filters')) this.openFilters();
792
+ * ```
793
+ *
794
+ * A sidepanel cannot restore itself the way the components that persist do. It exists only while it
795
+ * is open, so at the point the state would be read there is nothing left to read it — and what to
796
+ * reopen is a component class or a `TemplateRef` and its `data`, none of which survives being
797
+ * written to storage. This service keeps the flag; the application keeps the rest.
798
+ *
799
+ * What is recorded is a sidepanel opened and closed on its own. Closing a group — `closeAll()`, or
800
+ * this service being destroyed — leaves the flag alone, so a panel that was open when the page went
801
+ * away comes back whether the page was reloaded or navigated away from.
802
+ *
803
+ * Reading claims the key: from here on `KbqStateSavingService` reports the entry as this service's
804
+ * rather than orphaned. It has to happen on read, because for a sidepanel that is not open this is
805
+ * the only call there is.
806
+ */
807
+ wasOpen(key) {
808
+ if (!key || !this.stateSavingService.isEnabled())
809
+ return false;
810
+ const state = normalizeSidepanelState(this.stateStore.getState(key));
811
+ this.trackState(key, state);
812
+ return state?.opened ?? false;
813
+ }
814
+ /**
815
+ * Removes what is persisted under `key`.
816
+ *
817
+ * Persistence itself stays on: a sidepanel opened under that key again is recorded again.
818
+ */
819
+ clearSavedState(key) {
820
+ if (!key)
821
+ return;
822
+ this.stateStore.removeState(key);
823
+ this.stateSavingRefs.get(key)?.clear();
824
+ this.stateSavingService.notify();
825
+ }
373
826
  /**
374
827
  * Finds an open sidepanel by its id.
828
+ *
375
829
  * @param id ID to use when looking up the sidepanel.
376
830
  */
377
831
  getSidepanelById(id) {
@@ -400,6 +854,7 @@ class KbqSidepanelService {
400
854
  /**
401
855
  * Creates a custom injector to be used inside the sidepanel. This allows a component loaded inside
402
856
  * of a sidepanel to close itself and, optionally, to return a value.
857
+ *
403
858
  * @param config Config object that is used to construct the sidepanel.
404
859
  * @param sidepanelRef Reference to the sidepanel.
405
860
  * @param sidepanelContainer Sidepanel container element that wraps all of the contents.
@@ -421,6 +876,7 @@ class KbqSidepanelService {
421
876
  }
422
877
  /**
423
878
  * Creates a new overlay and places it in the correct location.
879
+ *
424
880
  * @param config The user-specified sidepanel config.
425
881
  */
426
882
  createOverlay(config) {
@@ -429,14 +885,69 @@ class KbqSidepanelService {
429
885
  backdropClass: '',
430
886
  maxWidth: '100%',
431
887
  panelClass: config.overlayPanelClass,
432
- scrollStrategy: this.overlay.scrollStrategies.block(),
888
+ scrollStrategy: this.resolveScrollStrategy(config),
433
889
  positionStrategy: this.overlay.position().global()
434
890
  });
435
891
  return this.overlay.create(overlayConfig);
436
892
  }
893
+ /**
894
+ * `block()` pins the document with `position: fixed`, which is exactly what the non-modal mode
895
+ * promises not to do, so only a backdropped sidepanel gets it.
896
+ */
897
+ resolveScrollStrategy(config) {
898
+ if (config.scrollStrategy)
899
+ return config.scrollStrategy();
900
+ return config.hasBackdrop ? this.overlay.scrollStrategies.block() : this.overlay.scrollStrategies.reposition();
901
+ }
902
+ /**
903
+ * `BlockScrollStrategy` refuses to engage while the page is already blocked, so in a stack the block
904
+ * belongs to the bottom-most backdropped sidepanel and has to be handed over when that one closes.
905
+ *
906
+ * @param closedIndex Index the closed sidepanel held in the stack, before it was removed.
907
+ */
908
+ restoreScrollBlock(closedConfig, closedIndex) {
909
+ if (!closedConfig.hasBackdrop)
910
+ return;
911
+ const ownerIndex = this.openedSidepanels.findIndex(({ config }) => config.hasBackdrop);
912
+ // A backdropped sidepanel that was already below the closed one still holds the block. Re-applying
913
+ // the strategy there would release and re-take the page, scrolling it twice for nothing.
914
+ if (ownerIndex === -1 || ownerIndex < closedIndex)
915
+ return;
916
+ const owner = this.openedSidepanels[ownerIndex];
917
+ owner.overlayRef.updateScrollStrategy(this.resolveScrollStrategy(owner.config));
918
+ }
437
919
  closeSidepanels(sidepanels) {
438
- const reversedOpenedSidepanels = [...sidepanels.reverse()];
439
- reversedOpenedSidepanels.forEach((sidepanelRef) => sidepanelRef.close());
920
+ // `reverse()` mutates, and this is called with the live stack.
921
+ [...sidepanels].reverse().forEach((sidepanelRef) => {
922
+ // Marked before closing rather than around the loop: `afterClosed()` only fires once the exit
923
+ // animation is done, by which time a flag held for the duration of this call would be gone.
924
+ this.bulkClosed.add(sidepanelRef);
925
+ sidepanelRef.close();
926
+ });
927
+ }
928
+ /** Whether an already-open sidepanel persists under this key. */
929
+ isStateSavingKeyInUse(key) {
930
+ return this.openedSidepanels.some((ref) => ref.config.stateSavingKey === key);
931
+ }
932
+ /** Records whether the sidepanel persisting under `key` is open. A sidepanel without a key is not. */
933
+ writeState(key, opened) {
934
+ if (!key || !this.stateSavingService.isEnabled())
935
+ return;
936
+ const state = { opened };
937
+ this.stateStore.setState(key, state);
938
+ this.trackState(key, state);
939
+ // The write does not go through `KbqStateSavingService`, so it would otherwise go unreported.
940
+ this.stateSavingService.notify();
941
+ }
942
+ /** Reports the key to `KbqStateSavingService`, registering it the first time it is seen. */
943
+ trackState(key, state) {
944
+ let ref = this.stateSavingRefs.get(key);
945
+ if (!ref) {
946
+ ref = new KbqSidepanelStateSavingRef(key, this.stateStore);
947
+ this.stateSavingRefs.set(key, ref);
948
+ this.stateSavingService.register(ref);
949
+ }
950
+ ref.state = state;
440
951
  }
441
952
  getOpenedSidepanelsWithSamePosition(config) {
442
953
  return this.openedSidepanels.filter((sidepanelRef) => sidepanelRef.config.position === config.position);
@@ -459,215 +970,103 @@ class KbqSidepanelService {
459
970
  */
460
971
  setAnimationState(sidepanelRef, state) {
461
972
  const containerInstance = sidepanelRef?.containerInstance;
462
- if (!containerInstance || containerInstance.animationState === KbqSidepanelAnimationState.Hidden)
973
+ if (!containerInstance || containerInstance.animationState() === KbqSidepanelAnimationState.Hidden)
463
974
  return;
464
975
  containerInstance.setAnimationState(state);
465
976
  }
466
977
  /**
467
978
  * Removes a sidepanel from the array of open sidepanels.
979
+ *
468
980
  * @param sidepanelRef Sidepanel to be removed.
469
981
  */
470
982
  removeOpenSidepanel(sidepanelRef) {
983
+ const levelIndex = this.openedSidepanelsAtThisLevel.indexOf(sidepanelRef);
984
+ if (levelIndex > -1) {
985
+ this.openedSidepanelsAtThisLevel.splice(levelIndex, 1);
986
+ }
471
987
  const index = this.openedSidepanels.indexOf(sidepanelRef);
472
988
  if (index > -1) {
473
989
  const [lower] = this.getLowerSidepanelsWithSamePosition(index);
474
990
  this.setAnimationState(lower, KbqSidepanelAnimationState.Visible);
475
991
  this.openedSidepanels.splice(index, 1);
992
+ this.updateIndents(sidepanelRef.config);
993
+ this.restoreScrollBlock(sidepanelRef.config, index);
476
994
  }
995
+ this.rootService.revealContentForAssistiveTechnology(sidepanelRef);
477
996
  }
478
- getLowerSidepanelsWithSamePosition(index) {
479
- const openedSidepanelsWithSamePosition = this.getOpenedSidepanelsWithSamePosition(this.openedSidepanels[index].config);
480
- return [
481
- openedSidepanelsWithSamePosition[openedSidepanelsWithSamePosition.length - 2],
482
- openedSidepanelsWithSamePosition[openedSidepanelsWithSamePosition.length - 3]
483
- ];
484
- }
485
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
486
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelService }); }
487
- }
488
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelService, decorators: [{
489
- type: Injectable
490
- }] });
491
-
492
- /**
493
- * Button that will close the current sidepanel.
494
- */
495
- class KbqSidepanelClose {
496
- constructor() {
497
- this.sidepanelRef = inject(KbqSidepanelRef, { optional: true });
498
- this.elementRef = inject(ElementRef);
499
- this.sidepanelService = inject(KbqSidepanelService);
500
- this.renderer = inject(Renderer2);
501
- this.kbqSidepanelClose = input(...(ngDevMode ? [undefined, { debugName: "kbqSidepanelClose" }] : []));
997
+ /**
998
+ * Only the top sidepanel of a position stack carries the indent, however deep the stack is — the strip
999
+ * is what reveals the panel underneath, and one per level is the visual noise the docs rule out.
1000
+ *
1001
+ * The flag belongs to the stack rather than to the panel that had one when it opened, so it is
1002
+ * recomputed on both ends: opening demotes the panel that was on top, and closing a *lower* sidepanel
1003
+ * would otherwise leave the top one exposing a strip of a panel that is no longer there.
1004
+ */
1005
+ updateIndents(config) {
1006
+ const stack = this.getOpenedSidepanelsWithSamePosition(config);
1007
+ stack.forEach((sidepanelRef, index) => sidepanelRef.containerInstance.setWithIndent(stack.length > 1 && index === stack.length - 1));
502
1008
  }
503
- ngOnInit() {
504
- // A button with no type submits the form it sits in, so closing a sidepanel from inside a form would
505
- // submit it too. A type the author set is left alone.
506
- if (!this.elementRef.nativeElement.hasAttribute('type')) {
507
- this.renderer.setAttribute(this.elementRef.nativeElement, 'type', 'button');
508
- }
509
- if (!this.sidepanelRef) {
510
- // When this directive is included in a sidepanel via TemplateRef (rather than being
511
- // in a Component), the SidepanelRef isn't available via injection because embedded
512
- // views cannot be given a custom injector. Instead, we look up the SidepanelRef by
513
- // ID.
514
- // This must occur in `onInit`, as the ID binding for the sidepanel container won't
515
- // be resolved at constructor time. We use setTimeout by same reason.
516
- setTimeout(() => {
517
- this.sidepanelRef = getClosestSidepanel(this.elementRef, this.sidepanelService.openedSidepanels);
518
- });
1009
+ /**
1010
+ * A focus trap constrains Tab, not the virtual cursor, so everything outside the overlay stays
1011
+ * reachable to a screen reader while a modal sidepanel is open unless it is hidden explicitly.
1012
+ */
1013
+ hideContentFromAssistiveTechnology(sidepanelRef) {
1014
+ const firstModal = this.modalSidepanels.size === 0;
1015
+ this.modalSidepanels.add(sidepanelRef);
1016
+ if (!firstModal)
1017
+ return;
1018
+ const overlayContainerElement = this.overlayContainer.getContainerElement();
1019
+ const siblings = overlayContainerElement.parentElement?.children;
1020
+ if (!siblings)
1021
+ return;
1022
+ for (let i = siblings.length - 1; i > -1; i--) {
1023
+ const sibling = siblings[i];
1024
+ if (sibling === overlayContainerElement ||
1025
+ sibling.nodeName === 'SCRIPT' ||
1026
+ sibling.nodeName === 'STYLE' ||
1027
+ sibling.hasAttribute('aria-live')) {
1028
+ continue;
1029
+ }
1030
+ this.ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));
1031
+ sibling.setAttribute('aria-hidden', 'true');
519
1032
  }
520
1033
  }
521
- ngOnChanges(changes) {
522
- const proxiedChange = changes.kbqSidepanelClose || changes.sidepanelResult;
523
- if (proxiedChange) {
524
- this.sidepanelResult = proxiedChange.currentValue;
1034
+ revealContentForAssistiveTechnology(sidepanelRef) {
1035
+ this.modalSidepanels.delete(sidepanelRef);
1036
+ if (this.modalSidepanels.size === 0) {
1037
+ this.restoreContentForAssistiveTechnology();
525
1038
  }
526
1039
  }
527
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
528
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqSidepanelClose, isStandalone: true, selector: "button[kbq-sidepanel-close], button[kbqSidepanelClose]", inputs: { sidepanelResult: { classPropertyName: "sidepanelResult", publicName: "kbq-sidepanel-close", isSignal: false, isRequired: false, transformFunction: null }, kbqSidepanelClose: { classPropertyName: "kbqSidepanelClose", publicName: "kbqSidepanelClose", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "sidepanelRef.close(sidepanelResult)" }, classAttribute: "kbq-sidepanel-close" }, usesOnChanges: true, ngImport: i0 }); }
529
- }
530
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelClose, decorators: [{
531
- type: Directive,
532
- args: [{
533
- selector: 'button[kbq-sidepanel-close], button[kbqSidepanelClose]',
534
- host: {
535
- class: 'kbq-sidepanel-close',
536
- '(click)': 'sidepanelRef.close(sidepanelResult)'
537
- }
538
- }]
539
- }], propDecorators: { sidepanelResult: [{
540
- type: Input,
541
- args: ['kbq-sidepanel-close']
542
- }], kbqSidepanelClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqSidepanelClose", required: false }] }] } });
543
- /**
544
- * Header of a sidepanel.
545
- */
546
- class KbqSidepanelHeader {
547
- constructor() {
548
- /** Add button for close sidepanel. Default false */
549
- this.closeable = input(false, ...(ngDevMode ? [{ debugName: "closeable", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
550
- /** Enables text truncation. Default true */
551
- this.truncateText = input(true, ...(ngDevMode ? [{ debugName: "truncateText", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
552
- /** @docs-private */
553
- this.sidepanelRef = inject(KbqSidepanelRef);
554
- }
555
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
556
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqSidepanelHeader, isStandalone: true, selector: "kbq-sidepanel-header", inputs: { closeable: { classPropertyName: "closeable", publicName: "closeable", isSignal: true, isRequired: false, transformFunction: null }, truncateText: { classPropertyName: "truncateText", publicName: "truncateText", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.kbq-sidepanel-header_truncate-text": "truncateText()", "style.box-shadow": "sidepanelRef.bodyOverflow().top ? \"var(--kbq-shadow-overflow-normal-bottom)\" : null" }, classAttribute: "kbq-sidepanel-header" }, ngImport: i0, template: `
557
- <div class="kbq-sidepanel-title" kbq-title>
558
- <ng-content />
559
- </div>
560
-
561
- @if (closeable()) {
562
- <button kbq-button kbq-sidepanel-close type="button" [color]="'contrast'" [kbqStyle]="'transparent'">
563
- <i kbq-icon="kbq-xmark_16" [color]="'contrast'"></i>
564
- </button>
565
- }
566
- `, isInline: true, dependencies: [{ 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: KbqSidepanelClose, selector: "button[kbq-sidepanel-close], button[kbqSidepanelClose]", inputs: ["kbq-sidepanel-close", "kbqSidepanelClose"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "directive", type: KbqTitleDirective, selector: "[kbq-title]", inputs: ["kbq-title"], exportAs: ["kbqTitle"] }] }); }
567
- }
568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelHeader, decorators: [{
569
- type: Component,
570
- args: [{
571
- selector: 'kbq-sidepanel-header',
572
- imports: [
573
- KbqButtonModule,
574
- KbqSidepanelClose,
575
- KbqIconModule,
576
- KbqTitleDirective
577
- ],
578
- template: `
579
- <div class="kbq-sidepanel-title" kbq-title>
580
- <ng-content />
581
- </div>
582
-
583
- @if (closeable()) {
584
- <button kbq-button kbq-sidepanel-close type="button" [color]="'contrast'" [kbqStyle]="'transparent'">
585
- <i kbq-icon="kbq-xmark_16" [color]="'contrast'"></i>
586
- </button>
587
- }
588
- `,
589
- host: {
590
- class: 'kbq-sidepanel-header',
591
- '[class.kbq-sidepanel-header_truncate-text]': 'truncateText()',
592
- '[style.box-shadow]': 'sidepanelRef.bodyOverflow().top ? "var(--kbq-shadow-overflow-normal-bottom)" : null'
593
- }
594
- }]
595
- }], propDecorators: { closeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeable", required: false }] }], truncateText: [{ type: i0.Input, args: [{ isSignal: true, alias: "truncateText", required: false }] }] } });
596
- /**
597
- * Scrollable content container of a sidepanel.
598
- */
599
- class KbqSidepanelBody {
600
- constructor() {
601
- this.sidepanelRef = inject(KbqSidepanelRef);
602
- this.overflowContainer = inject(KbqOverflowShadowContainer);
603
- effect(() => this.sidepanelRef.bodyOverflow.set(this.overflowContainer.overflow()));
1040
+ restoreContentForAssistiveTechnology() {
1041
+ this.ariaHiddenElements.forEach((previousValue, element) => {
1042
+ if (previousValue === null) {
1043
+ element.removeAttribute('aria-hidden');
1044
+ }
1045
+ else {
1046
+ element.setAttribute('aria-hidden', previousValue);
1047
+ }
1048
+ });
1049
+ this.ariaHiddenElements.clear();
1050
+ this.modalSidepanels.clear();
604
1051
  }
605
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelBody, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
606
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqSidepanelBody, isStandalone: true, selector: "kbq-sidepanel-body, [kbq-sidepanel-body], kbqSidepanelBody", host: { classAttribute: "kbq-sidepanel-body kbq-scrollbar" }, hostDirectives: [{ directive: i3.KbqOverflowShadowContainer }], ngImport: i0 }); }
607
- }
608
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelBody, decorators: [{
609
- type: Directive,
610
- args: [{
611
- selector: 'kbq-sidepanel-body, [kbq-sidepanel-body], kbqSidepanelBody',
612
- host: {
613
- class: 'kbq-sidepanel-body kbq-scrollbar'
614
- },
615
- hostDirectives: [KbqOverflowShadowContainer]
616
- }]
617
- }], ctorParameters: () => [] });
618
- /**
619
- * Footer of a sidepanel.
620
- */
621
- class KbqSidepanelFooter {
622
- constructor() {
623
- /** @docs-private */
624
- this.sidepanelRef = inject(KbqSidepanelRef);
1052
+ getLowerSidepanelsWithSamePosition(index) {
1053
+ const openedSidepanelsWithSamePosition = this.getOpenedSidepanelsWithSamePosition(this.openedSidepanels[index].config);
1054
+ return [
1055
+ openedSidepanelsWithSamePosition[openedSidepanelsWithSamePosition.length - 2],
1056
+ openedSidepanelsWithSamePosition[openedSidepanelsWithSamePosition.length - 3]
1057
+ ];
625
1058
  }
626
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
627
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqSidepanelFooter, isStandalone: true, selector: "kbq-sidepanel-footer, [kbq-sidepanel-footer], kbqSidepanelFooter", host: { properties: { "style.box-shadow": "sidepanelRef.bodyOverflow().bottom ? \"var(--kbq-shadow-overflow-normal-top)\" : null" }, classAttribute: "kbq-sidepanel-footer" }, ngImport: i0 }); }
1059
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1060
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelService, providedIn: 'root' }); }
628
1061
  }
629
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelFooter, decorators: [{
630
- type: Directive,
631
- args: [{
632
- selector: 'kbq-sidepanel-footer, [kbq-sidepanel-footer], kbqSidepanelFooter',
633
- host: {
634
- class: 'kbq-sidepanel-footer',
635
- '[style.box-shadow]': 'sidepanelRef.bodyOverflow().bottom ? "var(--kbq-shadow-overflow-normal-top)" : null'
636
- }
637
- }]
638
- }] });
639
- /**
640
- * Actions block of a sidepanel footer.
641
- */
642
- class KbqSidepanelActions {
643
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelActions, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
644
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqSidepanelActions, isStandalone: true, selector: "kbq-sidepanel-actions, [kbq-sidepanel-actions], kbqSidepanelActions", host: { classAttribute: "kbq-sidepanel-actions" }, ngImport: i0 }); }
645
- }
646
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelActions, decorators: [{
647
- type: Directive,
648
- args: [{
649
- selector: 'kbq-sidepanel-actions, [kbq-sidepanel-actions], kbqSidepanelActions',
650
- host: {
651
- class: 'kbq-sidepanel-actions'
652
- }
653
- }]
1062
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelService, decorators: [{
1063
+ type: Injectable,
1064
+ args: [{ providedIn: 'root' }]
654
1065
  }] });
655
- /**
656
- * Finds the closest KbqSidepanelRef to an element by looking at the DOM.
657
- * @param element Element relative to which to look for a sidepanel.
658
- * @param openSidepanels References to the currently-open sidepanels.
659
- */
660
- function getClosestSidepanel(element, openSidepanels) {
661
- let parent = element.nativeElement.parentElement;
662
- while (parent && !parent.classList.contains('kbq-sidepanel-container')) {
663
- parent = parent.parentElement;
664
- }
665
- return parent ? openSidepanels.find((sidepanel) => sidepanel.id === parent.id) : null;
666
- }
667
1066
 
668
1067
  class KbqSidepanelModule {
669
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
670
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelModule, imports: [OverlayModule,
1068
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1069
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelModule, imports: [OverlayModule,
671
1070
  PortalModule,
672
1071
  KbqButtonModule,
673
1072
  KbqIconModule,
@@ -684,10 +1083,7 @@ class KbqSidepanelModule {
684
1083
  KbqSidepanelBody,
685
1084
  KbqSidepanelFooter,
686
1085
  KbqSidepanelActions] }); }
687
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelModule, providers: [
688
- KbqSidepanelService,
689
- { provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }
690
- ], imports: [OverlayModule,
1086
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelModule, providers: [KbqSidepanelService], imports: [OverlayModule,
691
1087
  PortalModule,
692
1088
  KbqButtonModule,
693
1089
  KbqIconModule,
@@ -695,7 +1091,7 @@ class KbqSidepanelModule {
695
1091
  A11yModule,
696
1092
  KbqSidepanelHeader] }); }
697
1093
  }
698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSidepanelModule, decorators: [{
1094
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSidepanelModule, decorators: [{
699
1095
  type: NgModule,
700
1096
  args: [{
701
1097
  imports: [
@@ -712,10 +1108,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
712
1108
  KbqSidepanelFooter,
713
1109
  KbqSidepanelActions
714
1110
  ],
715
- providers: [
716
- KbqSidepanelService,
717
- { provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory }
718
- ],
1111
+ providers: [KbqSidepanelService],
719
1112
  exports: [
720
1113
  KbqSidepanelContainerComponent,
721
1114
  KbqSidepanelClose,