@koobiq/components 20.4.1 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (771) 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 +755 -601
  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 +2810 -2538
  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 +366 -136
  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 +486 -165
  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 +719 -488
  197. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  198. package/fesm2022/koobiq-components-tree.mjs +1506 -558
  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 +399 -7
  264. package/schematics/migrations/accordion-state-saving-default/README.md +60 -0
  265. package/schematics/migrations/accordion-state-saving-default/data.js +75 -0
  266. package/schematics/migrations/accordion-state-saving-default/index.js +60 -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.js +47 -0
  270. package/schematics/migrations/actions-panel-overlay-container/index.js +54 -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 +3 -0
  274. package/schematics/migrations/alert-signals/index.js +70 -203
  275. package/schematics/migrations/angular-animations-removal/README.md +46 -0
  276. package/schematics/migrations/angular-animations-removal/data.js +150 -0
  277. package/schematics/migrations/angular-animations-removal/index.js +20 -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.js +136 -0
  281. package/schematics/migrations/app-switcher-signals/index.js +365 -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 +1 -1
  285. package/schematics/migrations/autocomplete-signals/README.md +92 -0
  286. package/schematics/migrations/autocomplete-signals/data.js +149 -0
  287. package/schematics/migrations/autocomplete-signals/index.js +706 -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.js +109 -0
  291. package/schematics/migrations/badge-signals/index.js +693 -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.js +136 -0
  295. package/schematics/migrations/button-state-and-styles/index.js +220 -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.js +106 -0
  299. package/schematics/migrations/button-supported-colors/index.js +260 -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.js +200 -0
  303. package/schematics/migrations/button-toggle-signals-and-aria/index.js +496 -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.js +88 -0
  307. package/schematics/migrations/button-truncation/index.js +269 -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.js +114 -0
  311. package/schematics/migrations/checkbox-signals/index.js +634 -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.js +101 -0
  315. package/schematics/migrations/clamped-text-disclosure/index.js +59 -0
  316. package/schematics/migrations/clamped-text-disclosure/schema.json +15 -0
  317. package/schematics/migrations/code-block-signals/README.md +84 -0
  318. package/schematics/migrations/code-block-signals/data.js +121 -0
  319. package/schematics/migrations/code-block-signals/index.js +700 -0
  320. package/schematics/migrations/code-block-signals/schema.json +20 -0
  321. package/schematics/migrations/color-signals/README.md +46 -0
  322. package/schematics/migrations/color-signals/data.js +131 -0
  323. package/schematics/migrations/color-signals/index.js +19 -0
  324. package/schematics/migrations/color-signals/schema.json +20 -0
  325. package/schematics/migrations/core-mixins-removal/README.md +20 -0
  326. package/schematics/migrations/core-mixins-removal/data.js +27 -0
  327. package/schematics/migrations/core-mixins-removal/index.js +17 -0
  328. package/schematics/migrations/core-mixins-removal/schema.json +15 -0
  329. package/schematics/migrations/css-selectors/README.md +2 -2
  330. package/schematics/migrations/css-selectors/index.js +1 -1
  331. package/schematics/migrations/datepicker-signals/README.md +24 -0
  332. package/schematics/migrations/datepicker-signals/data.js +49 -0
  333. package/schematics/migrations/datepicker-signals/index.js +17 -0
  334. package/schematics/migrations/datepicker-signals/schema.json +15 -0
  335. package/schematics/migrations/deprecated-icons/README.md +2 -2
  336. package/schematics/migrations/deprecated-icons/index.js +1 -1
  337. package/schematics/migrations/design-tokens-v4/README.md +75 -0
  338. package/schematics/migrations/design-tokens-v4/index.js +59 -0
  339. package/schematics/migrations/design-tokens-v4/schema.json +15 -0
  340. package/schematics/migrations/divider-signals-and-aria/README.md +47 -0
  341. package/schematics/migrations/divider-signals-and-aria/data.js +62 -0
  342. package/schematics/migrations/divider-signals-and-aria/index.js +211 -0
  343. package/schematics/migrations/divider-signals-and-aria/schema.json +15 -0
  344. package/schematics/migrations/dl-attribute-coercion/README.md +59 -0
  345. package/schematics/migrations/dl-attribute-coercion/data.js +85 -0
  346. package/schematics/migrations/dl-attribute-coercion/index.js +161 -0
  347. package/schematics/migrations/dl-attribute-coercion/schema.json +15 -0
  348. package/schematics/migrations/dl-standalone-names/README.md +49 -0
  349. package/schematics/migrations/dl-standalone-names/data.js +44 -0
  350. package/schematics/migrations/dl-standalone-names/index.js +321 -0
  351. package/schematics/migrations/dl-standalone-names/schema.json +20 -0
  352. package/schematics/migrations/dropdown-demote-overlay/README.md +137 -0
  353. package/schematics/migrations/dropdown-demote-overlay/data.js +84 -0
  354. package/schematics/migrations/dropdown-demote-overlay/index.js +288 -0
  355. package/schematics/migrations/dropdown-demote-overlay/schema.json +20 -0
  356. package/schematics/migrations/dropdown-signals/README.md +83 -0
  357. package/schematics/migrations/dropdown-signals/data.js +152 -0
  358. package/schematics/migrations/dropdown-signals/index.js +19 -0
  359. package/schematics/migrations/dropdown-signals/schema.json +20 -0
  360. package/schematics/migrations/empty-state-error-color/README.md +84 -0
  361. package/schematics/migrations/empty-state-error-color/data.js +85 -0
  362. package/schematics/migrations/empty-state-error-color/index.js +71 -0
  363. package/schematics/migrations/empty-state-error-color/schema.json +15 -0
  364. package/schematics/migrations/empty-state-size-attr/README.md +2 -2
  365. package/schematics/migrations/empty-state-size-attr/index.js +1 -1
  366. package/schematics/migrations/file-upload-cva-and-primitives/README.md +70 -0
  367. package/schematics/migrations/file-upload-cva-and-primitives/data.js +97 -0
  368. package/schematics/migrations/file-upload-cva-and-primitives/index.js +60 -0
  369. package/schematics/migrations/file-upload-cva-and-primitives/schema.json +15 -0
  370. package/schematics/migrations/file-upload-deprecated-outputs/README.md +90 -0
  371. package/schematics/migrations/file-upload-deprecated-outputs/data.js +20 -0
  372. package/schematics/migrations/file-upload-deprecated-outputs/index.js +70 -0
  373. package/schematics/migrations/file-upload-deprecated-outputs/schema.json +20 -0
  374. package/schematics/migrations/filter-bar-rename-action/README.md +183 -0
  375. package/schematics/migrations/filter-bar-rename-action/data.js +151 -0
  376. package/schematics/migrations/filter-bar-rename-action/index.js +177 -0
  377. package/schematics/migrations/filter-bar-rename-action/schema.json +20 -0
  378. package/schematics/migrations/filter-bar-signals/README.md +27 -16
  379. package/schematics/migrations/filter-bar-signals/data.js +1 -2
  380. package/schematics/migrations/filter-bar-signals/index.js +100 -195
  381. package/schematics/migrations/filter-bar-state-saving-default/README.md +53 -0
  382. package/schematics/migrations/filter-bar-state-saving-default/data.js +87 -0
  383. package/schematics/migrations/filter-bar-state-saving-default/index.js +61 -0
  384. package/schematics/migrations/filter-bar-state-saving-default/schema.json +15 -0
  385. package/schematics/migrations/flag-inner-html/README.md +67 -0
  386. package/schematics/migrations/flag-inner-html/data.js +58 -0
  387. package/schematics/migrations/flag-inner-html/index.js +61 -0
  388. package/schematics/migrations/flag-inner-html/schema.json +15 -0
  389. package/schematics/migrations/form-field-signals/README.md +125 -0
  390. package/schematics/migrations/form-field-signals/data.js +288 -0
  391. package/schematics/migrations/form-field-signals/index.js +382 -0
  392. package/schematics/migrations/form-field-signals/schema.json +20 -0
  393. package/schematics/migrations/icon-semantics-and-api/README.md +65 -0
  394. package/schematics/migrations/icon-semantics-and-api/data.js +97 -0
  395. package/schematics/migrations/icon-semantics-and-api/index.js +64 -0
  396. package/schematics/migrations/icon-semantics-and-api/schema.json +15 -0
  397. package/schematics/migrations/icons-replacement/README.md +5 -5
  398. package/schematics/migrations/icons-replacement/index.js +1 -1
  399. package/schematics/migrations/inline-edit-a11y-and-types/README.md +82 -0
  400. package/schematics/migrations/inline-edit-a11y-and-types/data.js +117 -0
  401. package/schematics/migrations/inline-edit-a11y-and-types/index.js +97 -0
  402. package/schematics/migrations/inline-edit-a11y-and-types/schema.json +20 -0
  403. package/schematics/migrations/input-number-surface/README.md +140 -0
  404. package/schematics/migrations/input-number-surface/data.js +135 -0
  405. package/schematics/migrations/input-number-surface/index.js +292 -0
  406. package/schematics/migrations/input-number-surface/schema.json +20 -0
  407. package/schematics/migrations/input-signals/README.md +20 -0
  408. package/schematics/migrations/input-signals/data.js +30 -0
  409. package/schematics/migrations/input-signals/index.js +17 -0
  410. package/schematics/migrations/input-signals/schema.json +15 -0
  411. package/schematics/migrations/link-deprecated-path/README.md +144 -0
  412. package/schematics/migrations/link-deprecated-path/index.js +19 -0
  413. package/schematics/migrations/link-deprecated-path/schema.json +20 -0
  414. package/schematics/migrations/link-signals/README.md +71 -0
  415. package/schematics/migrations/link-signals/data.js +116 -0
  416. package/schematics/migrations/link-signals/index.js +415 -0
  417. package/schematics/migrations/link-signals/schema.json +20 -0
  418. package/schematics/migrations/list-signals/README.md +22 -0
  419. package/schematics/migrations/list-signals/data.js +35 -0
  420. package/schematics/migrations/list-signals/index.js +17 -0
  421. package/schematics/migrations/list-signals/schema.json +15 -0
  422. package/schematics/migrations/list-tree-multiple-input/README.md +105 -0
  423. package/schematics/migrations/list-tree-multiple-input/data.js +74 -0
  424. package/schematics/migrations/list-tree-multiple-input/index.js +221 -0
  425. package/schematics/migrations/list-tree-multiple-input/schema.json +20 -0
  426. package/schematics/migrations/loader-overlay-signals/README.md +62 -0
  427. package/schematics/migrations/loader-overlay-signals/data.js +101 -0
  428. package/schematics/migrations/loader-overlay-signals/index.js +697 -0
  429. package/schematics/migrations/loader-overlay-signals/schema.json +20 -0
  430. package/schematics/migrations/loader-overlay-size-attr/README.md +2 -2
  431. package/schematics/migrations/loader-overlay-size-attr/index.js +1 -1
  432. package/schematics/migrations/locale-configuration-providers/README.md +163 -0
  433. package/schematics/migrations/locale-configuration-providers/data.js +257 -0
  434. package/schematics/migrations/locale-configuration-providers/index.js +294 -0
  435. package/schematics/migrations/locale-configuration-providers/schema.json +20 -0
  436. package/schematics/migrations/mandatory-peer-dependencies/README.md +70 -0
  437. package/schematics/migrations/mandatory-peer-dependencies/index.js +42 -0
  438. package/schematics/migrations/mandatory-peer-dependencies/schema.json +15 -0
  439. package/schematics/migrations/markdown-signals/README.md +58 -0
  440. package/schematics/migrations/markdown-signals/data.js +79 -0
  441. package/schematics/migrations/markdown-signals/index.js +639 -0
  442. package/schematics/migrations/markdown-signals/schema.json +20 -0
  443. package/schematics/migrations/modal-dialog-semantics/README.md +106 -0
  444. package/schematics/migrations/modal-dialog-semantics/data.js +110 -0
  445. package/schematics/migrations/modal-dialog-semantics/index.js +58 -0
  446. package/schematics/migrations/modal-dialog-semantics/schema.json +15 -0
  447. package/schematics/migrations/modal-signals/README.md +88 -0
  448. package/schematics/migrations/modal-signals/data.js +132 -0
  449. package/schematics/migrations/modal-signals/index.js +19 -0
  450. package/schematics/migrations/modal-signals/schema.json +20 -0
  451. package/schematics/migrations/navbar-signals-and-aria/README.md +111 -0
  452. package/schematics/migrations/navbar-signals-and-aria/data.js +198 -0
  453. package/schematics/migrations/navbar-signals-and-aria/index.js +568 -0
  454. package/schematics/migrations/navbar-signals-and-aria/schema.json +20 -0
  455. package/schematics/migrations/new-icons-pack/README.md +10 -10
  456. package/schematics/migrations/new-icons-pack/index.js +1 -1
  457. package/schematics/migrations/notification-center-signals/README.md +67 -0
  458. package/schematics/migrations/notification-center-signals/data.js +66 -0
  459. package/schematics/migrations/notification-center-signals/index.js +61 -0
  460. package/schematics/migrations/notification-center-signals/schema.json +15 -0
  461. package/schematics/migrations/option-signals/README.md +37 -0
  462. package/schematics/migrations/option-signals/data.js +86 -0
  463. package/schematics/migrations/option-signals/index.js +19 -0
  464. package/schematics/migrations/option-signals/schema.json +20 -0
  465. package/schematics/migrations/popover-leave-delay/README.md +51 -0
  466. package/schematics/migrations/popover-leave-delay/data.js +61 -0
  467. package/schematics/migrations/popover-leave-delay/index.js +54 -0
  468. package/schematics/migrations/popover-leave-delay/schema.json +15 -0
  469. package/schematics/migrations/progress-bar-percentage-and-aria/README.md +54 -0
  470. package/schematics/migrations/progress-bar-percentage-and-aria/data.js +76 -0
  471. package/schematics/migrations/progress-bar-percentage-and-aria/index.js +58 -0
  472. package/schematics/migrations/progress-bar-percentage-and-aria/schema.json +15 -0
  473. package/schematics/migrations/progress-spinner-signals/README.md +72 -0
  474. package/schematics/migrations/progress-spinner-signals/data.js +83 -0
  475. package/schematics/migrations/progress-spinner-signals/index.js +694 -0
  476. package/schematics/migrations/progress-spinner-signals/schema.json +20 -0
  477. package/schematics/migrations/query-list-signals/README.md +32 -0
  478. package/schematics/migrations/query-list-signals/data.js +70 -0
  479. package/schematics/migrations/query-list-signals/index.js +17 -0
  480. package/schematics/migrations/query-list-signals/schema.json +15 -0
  481. package/schematics/migrations/radio-signals-and-aria/README.md +82 -0
  482. package/schematics/migrations/radio-signals-and-aria/data.js +163 -0
  483. package/schematics/migrations/radio-signals-and-aria/index.js +39 -0
  484. package/schematics/migrations/radio-signals-and-aria/schema.json +20 -0
  485. package/schematics/migrations/read-state-dwell-handlers/README.md +125 -0
  486. package/schematics/migrations/read-state-dwell-handlers/data.js +45 -0
  487. package/schematics/migrations/read-state-dwell-handlers/index.js +215 -0
  488. package/schematics/migrations/read-state-dwell-handlers/schema.json +20 -0
  489. package/schematics/migrations/scrollbar-deprecated-path/README.md +128 -0
  490. package/schematics/migrations/scrollbar-deprecated-path/index.js +20 -0
  491. package/schematics/migrations/scrollbar-deprecated-path/schema.json +20 -0
  492. package/schematics/migrations/select-signal-inputs/README.md +61 -0
  493. package/schematics/migrations/select-signal-inputs/data.js +99 -0
  494. package/schematics/migrations/select-signal-inputs/index.js +57 -0
  495. package/schematics/migrations/select-signal-inputs/schema.json +15 -0
  496. package/schematics/migrations/sidepanel-non-modal-behavior/README.md +57 -0
  497. package/schematics/migrations/sidepanel-non-modal-behavior/data.js +111 -0
  498. package/schematics/migrations/sidepanel-non-modal-behavior/index.js +57 -0
  499. package/schematics/migrations/sidepanel-non-modal-behavior/schema.json +15 -0
  500. package/schematics/migrations/signal-inputs-subclasses/README.md +28 -0
  501. package/schematics/migrations/signal-inputs-subclasses/data.js +69 -0
  502. package/schematics/migrations/signal-inputs-subclasses/index.js +17 -0
  503. package/schematics/migrations/signal-inputs-subclasses/schema.json +15 -0
  504. package/schematics/migrations/split-button-optional-disabled/README.md +47 -0
  505. package/schematics/migrations/split-button-optional-disabled/data.js +53 -0
  506. package/schematics/migrations/split-button-optional-disabled/index.js +57 -0
  507. package/schematics/migrations/split-button-optional-disabled/schema.json +15 -0
  508. package/schematics/migrations/splitter-deprecated-path/README.md +136 -0
  509. package/schematics/migrations/splitter-deprecated-path/index.js +20 -0
  510. package/schematics/migrations/splitter-deprecated-path/schema.json +20 -0
  511. package/schematics/migrations/state-saving-default/README.md +67 -0
  512. package/schematics/migrations/state-saving-default/data.js +88 -0
  513. package/schematics/migrations/state-saving-default/index.js +62 -0
  514. package/schematics/migrations/state-saving-default/schema.json +15 -0
  515. package/schematics/migrations/table-cell-content/README.md +55 -0
  516. package/schematics/migrations/table-cell-content/data.js +66 -0
  517. package/schematics/migrations/table-cell-content/index.js +66 -0
  518. package/schematics/migrations/table-cell-content/schema.json +15 -0
  519. package/schematics/migrations/tabs-signals-and-aria/README.md +93 -0
  520. package/schematics/migrations/tabs-signals-and-aria/data.js +139 -0
  521. package/schematics/migrations/tabs-signals-and-aria/index.js +65 -0
  522. package/schematics/migrations/tabs-signals-and-aria/schema.json +15 -0
  523. package/schematics/migrations/tag-list-cleaner/README.md +58 -0
  524. package/schematics/migrations/tag-list-cleaner/data.js +42 -0
  525. package/schematics/migrations/tag-list-cleaner/index.js +196 -0
  526. package/schematics/migrations/tag-list-cleaner/schema.json +20 -0
  527. package/schematics/migrations/tag-slots/README.md +41 -0
  528. package/schematics/migrations/tag-slots/index.js +190 -0
  529. package/schematics/migrations/tag-slots/schema.json +20 -0
  530. package/schematics/migrations/tags-signals/README.md +85 -0
  531. package/schematics/migrations/tags-signals/data.js +103 -0
  532. package/schematics/migrations/tags-signals/index.js +673 -0
  533. package/schematics/migrations/tags-signals/schema.json +20 -0
  534. package/schematics/migrations/textarea-signals/README.md +72 -0
  535. package/schematics/migrations/textarea-signals/data.js +121 -0
  536. package/schematics/migrations/textarea-signals/index.js +379 -0
  537. package/schematics/migrations/textarea-signals/schema.json +20 -0
  538. package/schematics/migrations/time-range-title-for/README.md +164 -0
  539. package/schematics/migrations/time-range-title-for/data.js +139 -0
  540. package/schematics/migrations/time-range-title-for/index.js +163 -0
  541. package/schematics/migrations/time-range-title-for/schema.json +20 -0
  542. package/schematics/migrations/timepicker-signals/README.md +78 -0
  543. package/schematics/migrations/timepicker-signals/data.js +82 -0
  544. package/schematics/migrations/timepicker-signals/index.js +709 -0
  545. package/schematics/migrations/timepicker-signals/schema.json +20 -0
  546. package/schematics/migrations/timezone-grouping-utils/README.md +73 -0
  547. package/schematics/migrations/timezone-grouping-utils/data.js +101 -0
  548. package/schematics/migrations/timezone-grouping-utils/index.js +64 -0
  549. package/schematics/migrations/timezone-grouping-utils/schema.json +15 -0
  550. package/schematics/migrations/title-encapsulation/README.md +49 -0
  551. package/schematics/migrations/title-encapsulation/data.js +69 -0
  552. package/schematics/migrations/title-encapsulation/index.js +57 -0
  553. package/schematics/migrations/title-encapsulation/schema.json +15 -0
  554. package/schematics/migrations/toast-stack-and-defaults/README.md +102 -0
  555. package/schematics/migrations/toast-stack-and-defaults/data.js +79 -0
  556. package/schematics/migrations/toast-stack-and-defaults/index.js +53 -0
  557. package/schematics/migrations/toast-stack-and-defaults/schema.json +15 -0
  558. package/schematics/migrations/tooltip-pointer-events-and-types/README.md +53 -0
  559. package/schematics/migrations/tooltip-pointer-events-and-types/data.js +89 -0
  560. package/schematics/migrations/tooltip-pointer-events-and-types/index.js +60 -0
  561. package/schematics/migrations/tooltip-pointer-events-and-types/schema.json +15 -0
  562. package/schematics/migrations/top-bar-container-selectors/README.md +111 -0
  563. package/schematics/migrations/top-bar-container-selectors/data.js +56 -0
  564. package/schematics/migrations/top-bar-container-selectors/index.js +84 -0
  565. package/schematics/migrations/top-bar-container-selectors/schema.json +20 -0
  566. package/schematics/migrations/tree-select-signals/README.md +61 -0
  567. package/schematics/migrations/tree-select-signals/data.js +106 -0
  568. package/schematics/migrations/tree-select-signals/index.js +58 -0
  569. package/schematics/migrations/tree-select-signals/schema.json +15 -0
  570. package/schematics/migrations/tree-signals/README.md +82 -0
  571. package/schematics/migrations/tree-signals/data.js +123 -0
  572. package/schematics/migrations/tree-signals/index.js +54 -0
  573. package/schematics/migrations/tree-signals/schema.json +15 -0
  574. package/schematics/migrations/tree-state-saving-default/README.md +66 -0
  575. package/schematics/migrations/tree-state-saving-default/data.js +78 -0
  576. package/schematics/migrations/tree-state-saving-default/index.js +60 -0
  577. package/schematics/migrations/tree-state-saving-default/schema.json +15 -0
  578. package/schematics/migrations/username-pipe-injection/README.md +59 -0
  579. package/schematics/migrations/username-pipe-injection/data.js +78 -0
  580. package/schematics/migrations/username-pipe-injection/index.js +58 -0
  581. package/schematics/migrations/username-pipe-injection/schema.json +15 -0
  582. package/schematics/migrations/v20-upgrade/README.md +36 -16
  583. package/schematics/migrations/v20-upgrade/data.js +124 -77
  584. package/schematics/migrations/v20-upgrade/index.js +6 -213
  585. package/schematics/migrations/v21-upgrade/README.md +271 -0
  586. package/schematics/migrations/v21-upgrade/data.js +1371 -0
  587. package/schematics/migrations/v21-upgrade/index.js +94 -0
  588. package/schematics/migrations/v21-upgrade/schema.json +20 -0
  589. package/schematics/migrations/zoneless-change-detection/README.md +30 -0
  590. package/schematics/migrations/zoneless-change-detection/data.js +29 -0
  591. package/schematics/migrations/zoneless-change-detection/index.js +20 -0
  592. package/schematics/migrations/zoneless-change-detection/schema.json +15 -0
  593. package/schematics/migrations.json +392 -2
  594. package/schematics/ng-add/index.js +515 -14
  595. package/schematics/ng-add/schema.json +15 -0
  596. package/schematics/utils/deprecated-path-migration.js +61 -0
  597. package/schematics/utils/package-config.js +9 -105
  598. package/scrollbar/{_scrollbar-component-theme.scss → deprecated/_scrollbar-component-theme.scss} +1 -1
  599. package/scrollbar/{scrollbar.component.scss → deprecated/scrollbar.component.scss} +1 -1
  600. package/scrollbar/native-scrollbar.scss +68 -0
  601. package/scrollbar/scrollbar-tokens.scss +13 -22
  602. package/scrollbar/scrollbar-track.scss +94 -0
  603. package/scrollbar/scrollbar-viewport.scss +33 -0
  604. package/scrollbar/scrollbar.scss +24 -0
  605. package/search-expandable/search-expandable-tokens.scss +4 -0
  606. package/search-expandable/search-expandable.scss +4 -2
  607. package/select/_select-theme.scss +3 -16
  608. package/select/select.scss +0 -6
  609. package/sidebar/sidebar.scss +20 -0
  610. package/sidepanel/_sidepanel-theme.scss +1 -1
  611. package/sidepanel/sidepanel-tokens.scss +7 -1
  612. package/sidepanel/sidepanel.scss +41 -5
  613. package/skeleton/skeleton-presets.scss +350 -0
  614. package/skeleton/skeleton-tokens.scss +127 -0
  615. package/skeleton/skeleton.scss +53 -45
  616. package/split-button/_split-button-theme.scss +4 -4
  617. package/split-button/split-button.scss +2 -6
  618. package/splitter/{_splitter-theme.scss → deprecated/_splitter-theme.scss} +1 -1
  619. package/splitter/deprecated/splitter.scss +51 -0
  620. package/splitter/splitter-tokens.scss +19 -0
  621. package/splitter/splitter.scss +148 -28
  622. package/table/_table-theme.scss +13 -12
  623. package/table/table-tokens.scss +8 -0
  624. package/table/table.scss +47 -22
  625. package/tabs/_tabs-common.scss +14 -14
  626. package/tabs/_tabs-theme.scss +4 -5
  627. package/tabs/tab-body.scss +49 -1
  628. package/tabs/tab-header.scss +2 -1
  629. package/tags/tag-list.scss +4 -0
  630. package/tags/tag.scss +19 -1
  631. package/time-range/time-range.scss +9 -0
  632. package/timezone/timezone-option.component.scss +4 -7
  633. package/timezone/timezone-select.component.scss +3 -0
  634. package/toast/_toast-theme.scss +1 -4
  635. package/toast/toast-container.component.scss +19 -13
  636. package/toast/toast-tokens.scss +12 -6
  637. package/toast/toast.component.scss +42 -19
  638. package/toggle/_toggle-theme.scss +4 -10
  639. package/toggle/toggle.scss +67 -26
  640. package/tooltip/_tooltip-theme.scss +7 -1
  641. package/tooltip/tooltip-tokens.scss +1 -2
  642. package/tooltip/tooltip.scss +55 -9
  643. package/top-bar/top-bar-tokens.scss +13 -2
  644. package/top-bar/top-bar.scss +24 -19
  645. package/tree/_tree-theme.scss +0 -1
  646. package/tree/toggle.scss +5 -9
  647. package/tree/tree-option.scss +2 -4
  648. package/tree/tree-tokens.scss +2 -1
  649. package/tree/tree.scss +3 -5
  650. package/tree-select/_tree-select-theme.scss +4 -15
  651. package/tree-select/tree-select-tokens.scss +16 -0
  652. package/tree-select/tree-select.scss +0 -6
  653. package/{accordion/index.d.ts → types/koobiq-components-accordion.d.ts} +102 -84
  654. package/{actions-panel/index.d.ts → types/koobiq-components-actions-panel.d.ts} +44 -59
  655. package/{alert/index.d.ts → types/koobiq-components-alert.d.ts} +8 -3
  656. package/types/koobiq-components-app-switcher.d.ts +406 -0
  657. package/types/koobiq-components-autocomplete.d.ts +443 -0
  658. package/{badge/index.d.ts → types/koobiq-components-badge.d.ts} +25 -20
  659. package/{breadcrumbs/index.d.ts → types/koobiq-components-breadcrumbs.d.ts} +97 -46
  660. package/types/koobiq-components-button-toggle.d.ts +340 -0
  661. package/types/koobiq-components-button.d.ts +296 -0
  662. package/types/koobiq-components-checkbox.d.ts +172 -0
  663. package/types/koobiq-components-clamped-text.d.ts +184 -0
  664. package/{code-block/index.d.ts → types/koobiq-components-code-block.d.ts} +114 -79
  665. package/{content-panel/index.d.ts → types/koobiq-components-content-panel.d.ts} +81 -25
  666. package/{core/index.d.ts → types/koobiq-components-core.d.ts} +2827 -865
  667. package/{datepicker/index.d.ts → types/koobiq-components-datepicker.d.ts} +161 -116
  668. package/types/koobiq-components-divider.d.ts +43 -0
  669. package/types/koobiq-components-dl.d.ts +235 -0
  670. package/{dropdown/index.d.ts → types/koobiq-components-dropdown.d.ts} +245 -239
  671. package/types/koobiq-components-ellipsis-center.d.ts +85 -0
  672. package/types/koobiq-components-empty-state.d.ts +106 -0
  673. package/{file-upload/index.d.ts → types/koobiq-components-file-upload.d.ts} +214 -107
  674. package/{filter-bar/index.d.ts → types/koobiq-components-filter-bar.d.ts} +410 -495
  675. package/types/koobiq-components-flag.d.ts +68 -0
  676. package/{form-field/index.d.ts → types/koobiq-components-form-field.d.ts} +167 -191
  677. package/types/koobiq-components-icon.d.ts +333 -0
  678. package/{inline-edit/index.d.ts → types/koobiq-components-inline-edit.d.ts} +109 -46
  679. package/types/koobiq-components-input.d.ts +477 -0
  680. package/types/koobiq-components-link-deprecated.d.ts +101 -0
  681. package/types/koobiq-components-link.d.ts +176 -0
  682. package/{list/index.d.ts → types/koobiq-components-list.d.ts} +162 -99
  683. package/types/koobiq-components-loader-overlay.d.ts +101 -0
  684. package/{markdown/index.d.ts → types/koobiq-components-markdown.d.ts} +16 -24
  685. package/types/koobiq-components-modal.d.ts +666 -0
  686. package/types/koobiq-components-navbar.d.ts +569 -0
  687. package/types/koobiq-components-notification-center.d.ts +500 -0
  688. package/{overflow-items/index.d.ts → types/koobiq-components-overflow-items.d.ts} +8 -22
  689. package/types/koobiq-components-popover.d.ts +468 -0
  690. package/types/koobiq-components-progress-bar.d.ts +67 -0
  691. package/{progress-spinner/index.d.ts → types/koobiq-components-progress-spinner.d.ts} +33 -10
  692. package/types/koobiq-components-radio.d.ts +294 -0
  693. package/{resizer/index.d.ts → types/koobiq-components-resizer.d.ts} +37 -2
  694. package/{scrollbar/index.d.ts → types/koobiq-components-scrollbar-deprecated.d.ts} +18 -1
  695. package/types/koobiq-components-scrollbar.d.ts +154 -0
  696. package/types/koobiq-components-search-expandable.d.ts +164 -0
  697. package/{select/index.d.ts → types/koobiq-components-select.d.ts} +360 -167
  698. package/types/koobiq-components-sidebar.d.ts +152 -0
  699. package/types/koobiq-components-sidepanel.d.ts +436 -0
  700. package/types/koobiq-components-skeleton.d.ts +234 -0
  701. package/types/koobiq-components-split-button.d.ts +65 -0
  702. package/{splitter/index.d.ts → types/koobiq-components-splitter-deprecated.d.ts} +44 -1
  703. package/types/koobiq-components-splitter.d.ts +406 -0
  704. package/types/koobiq-components-table.d.ts +44 -0
  705. package/types/koobiq-components-tabs.d.ts +888 -0
  706. package/{tags/index.d.ts → types/koobiq-components-tags.d.ts} +249 -133
  707. package/types/koobiq-components-textarea.d.ts +178 -0
  708. package/{time-range/index.d.ts → types/koobiq-components-time-range.d.ts} +135 -62
  709. package/types/koobiq-components-timepicker.d.ts +223 -0
  710. package/types/koobiq-components-timezone.d.ts +266 -0
  711. package/types/koobiq-components-title.d.ts +184 -0
  712. package/types/koobiq-components-toast.d.ts +289 -0
  713. package/types/koobiq-components-toggle.d.ts +121 -0
  714. package/types/koobiq-components-tooltip.d.ts +610 -0
  715. package/types/koobiq-components-top-bar.d.ts +61 -0
  716. package/types/koobiq-components-tree-select.d.ts +667 -0
  717. package/types/koobiq-components-tree.d.ts +1290 -0
  718. package/types/koobiq-components-username.d.ts +340 -0
  719. package/username/_username-theme.scss +35 -0
  720. package/username/username.scss +10 -34
  721. package/app-switcher/index.d.ts +0 -276
  722. package/autocomplete/index.d.ts +0 -286
  723. package/button/index.d.ts +0 -153
  724. package/button-toggle/index.d.ts +0 -162
  725. package/checkbox/index.d.ts +0 -163
  726. package/clamped-text/index.d.ts +0 -146
  727. package/core/styles/_tokens.scss +0 -7
  728. package/core/styles/common/_clearfix.scss +0 -13
  729. package/core/styles/common/_popup.scss +0 -6
  730. package/core/styles/functions/_index.scss +0 -3
  731. package/core/styles/functions/_number.scss +0 -60
  732. package/core/styles/functions/_string.scss +0 -18
  733. package/core/styles/theming/scrollbar-tokens.scss +0 -25
  734. package/core/styles/typography/_typography-utils.scss +0 -84
  735. package/divider/index.d.ts +0 -20
  736. package/dl/index.d.ts +0 -45
  737. package/ellipsis-center/index.d.ts +0 -71
  738. package/empty-state/index.d.ts +0 -45
  739. package/flag/index.d.ts +0 -44
  740. package/icon/index.d.ts +0 -200
  741. package/input/index.d.ts +0 -354
  742. package/link/index.d.ts +0 -56
  743. package/loader-overlay/index.d.ts +0 -57
  744. package/modal/index.d.ts +0 -339
  745. package/navbar/index.d.ts +0 -372
  746. package/notification-center/index.d.ts +0 -323
  747. package/popover/index.d.ts +0 -182
  748. package/prebuilt-themes/dark-theme.css +0 -1
  749. package/prebuilt-themes/light-theme.css +0 -1
  750. package/progress-bar/index.d.ts +0 -31
  751. package/radio/index.d.ts +0 -203
  752. package/search-expandable/index.d.ts +0 -101
  753. package/sidebar/index.d.ts +0 -94
  754. package/sidepanel/index.d.ts +0 -272
  755. package/skeleton/index.d.ts +0 -26
  756. package/split-button/index.d.ts +0 -46
  757. package/table/index.d.ts +0 -25
  758. package/tabs/index.d.ts +0 -677
  759. package/textarea/index.d.ts +0 -138
  760. package/timepicker/index.d.ts +0 -197
  761. package/timezone/index.d.ts +0 -125
  762. package/title/index.d.ts +0 -139
  763. package/toast/index.d.ts +0 -187
  764. package/toggle/index.d.ts +0 -104
  765. package/tooltip/index.d.ts +0 -335
  766. package/top-bar/index.d.ts +0 -33
  767. package/tree/index.d.ts +0 -802
  768. package/tree-select/index.d.ts +0 -475
  769. package/username/index.d.ts +0 -194
  770. /package/{dynamic-translation/index.d.ts → types/koobiq-components-dynamic-translation.d.ts} +0 -0
  771. /package/{index.d.ts → types/koobiq-components.d.ts} +0 -0
@@ -1,541 +1,930 @@
1
- import { coerceNumberProperty, coerceCssPixelValue, coerceBooleanProperty } from '@angular/cdk/coercion';
1
+ import { FocusMonitor, _IdGenerator, CdkMonitorFocus } from '@angular/cdk/a11y';
2
+ import { Directionality } from '@angular/cdk/bidi';
3
+ import { SharedResizeObserver } from '@angular/cdk/observers/private';
2
4
  import { Platform } from '@angular/cdk/platform';
3
5
  import * as i0 from '@angular/core';
4
- import { inject, ElementRef, Renderer2, Input, Directive, ChangeDetectorRef, NgZone, output, viewChildren, viewChild, ContentChildren, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
5
- import { KBQ_WINDOW } from '@koobiq/components/core';
6
- import { Subscription } from 'rxjs';
7
- import { KbqIconModule } from '@koobiq/components/icon';
6
+ import { InjectionToken, inject, input, numberAttribute, booleanAttribute, model, viewChild, computed, isDevMode, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, DestroyRef, contentChildren, signal, afterNextRender, NgModule } from '@angular/core';
7
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
8
+ import { kbqInjectA11yLocaleConfiguration, kbqInjectNativeElement, KBQ_WINDOW, hasModifierKey } from '@koobiq/components/core';
9
+ import * as i1 from '@koobiq/components/resizer';
10
+ import { KbqResizer, KbqResizable } from '@koobiq/components/resizer';
11
+ import { startWith } from 'rxjs/operators';
8
12
 
9
- var Direction;
10
- (function (Direction) {
11
- Direction["Horizontal"] = "horizontal";
12
- Direction["Vertical"] = "vertical";
13
- })(Direction || (Direction = {}));
14
- class KbqGutterDirective {
15
- constructor() {
16
- this.elementRef = inject(ElementRef);
17
- this.renderer = inject(Renderer2);
18
- this._direction = Direction.Vertical;
19
- this._order = 0;
20
- this._size = 6;
21
- this.dragged = false;
22
- }
23
- // TODO: Skipped for migration because:
24
- // Accessor inputs cannot be migrated as they are too complex.
25
- get direction() {
26
- return this._direction;
27
- }
28
- set direction(direction) {
29
- this._direction = direction;
30
- }
31
- // TODO: Skipped for migration because:
32
- // Accessor inputs cannot be migrated as they are too complex.
33
- get order() {
34
- return this._order;
35
- }
36
- set order(order) {
37
- this._order = coerceNumberProperty(order);
38
- }
39
- // TODO: Skipped for migration because:
40
- // Accessor inputs cannot be migrated as they are too complex.
41
- get size() {
42
- return this._size;
43
- }
44
- set size(size) {
45
- this._size = coerceNumberProperty(size);
46
- }
47
- get isVertical() {
48
- return this._direction === Direction.Vertical;
49
- }
50
- ngOnInit() {
51
- this.setStyle("flex-basis" /* StyleProperty.FlexBasis */, coerceCssPixelValue(this.size));
52
- this.setStyle(this.isVertical ? "height" /* StyleProperty.Height */ : "width" /* StyleProperty.Width */, coerceCssPixelValue(this.size));
53
- this.setStyle("order" /* StyleProperty.Order */, this.order);
54
- if (!this.isVertical) {
55
- this.setStyle("height" /* StyleProperty.Height */, '100%');
13
+ const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
14
+ /** A number, bare or followed by `px` or `%` — the only size strings a panel understands. */
15
+ const SPLITTER_SIZE_PATTERN = /^([+-]?(?:\d+(?:\.\d+)?|\.\d+))(px|%)?$/i;
16
+ /**
17
+ * Resolves a declared size against the splitter's own size along the resize axis.
18
+ *
19
+ * Numbers and `<number>px` strings are pixels, `<number>%` is a share of `total`. Returns `null` for a size that
20
+ * is not set or is anything else, another unit included: reading `10rem` as ten pixels would quietly hand the
21
+ * panel a limit nobody asked for. `null` is how a panel says "take whatever is left".
22
+ *
23
+ * @internal
24
+ */
25
+ function resolveSplitterSize(size, total) {
26
+ if (size === null || size === undefined)
27
+ return null;
28
+ if (typeof size === 'number')
29
+ return Number.isFinite(size) ? size : null;
30
+ const [, value, unit] = SPLITTER_SIZE_PATTERN.exec(size.trim()) ?? [];
31
+ if (value === undefined)
32
+ return null;
33
+ return unit === '%' ? (parseFloat(value) / 100) * total : parseFloat(value);
34
+ }
35
+ /**
36
+ * Clamps every panel to its own limits and then spends whatever that left over, so the sizes add up to
37
+ * `total` again.
38
+ *
39
+ * The residual is handed out in passes rather than in one proportional step: a panel that reaches a limit
40
+ * mid-pass stops taking, and the next pass shares what it refused among the panels that still have room.
41
+ * At most one pass per panel can end that way, so the loop is bounded by the panel count.
42
+ *
43
+ * @internal
44
+ */
45
+ function fitSplitterSizes(sizes, min, max, total) {
46
+ const next = sizes.map((size, index) => clamp(size, min[index], max[index]));
47
+ for (let pass = 0; pass <= next.length; pass++) {
48
+ const diff = total - sumOf(next);
49
+ if (Math.abs(diff) < EPSILON)
50
+ break;
51
+ const open = next
52
+ .map((_, index) => index)
53
+ .filter((index) => (diff > 0 ? next[index] < max[index] : next[index] > min[index]));
54
+ if (!open.length)
55
+ break;
56
+ const step = diff / open.length;
57
+ open.forEach((index) => (next[index] = clamp(next[index] + step, min[index], max[index])));
58
+ }
59
+ return next;
60
+ }
61
+ /**
62
+ * Pins every collapsed panel to its strip and shares what that frees among the open panels, in equal parts.
63
+ *
64
+ * A collapsed panel's layout entry holds the size it returns to rather than the strip it shows, which is what
65
+ * lets expanding restore that size. The difference is handed out here, before any limit applies, so that
66
+ * {@link keepSplitterRestoreSizes} can take exactly the same amounts back whenever sizes are written again.
67
+ */
68
+ function collapseSplitterSizes(sizes, collapsed, strips) {
69
+ const open = collapsed.filter((isCollapsed) => !isCollapsed).length;
70
+ const freed = sizes.reduce((sum, size, index) => (collapsed[index] ? sum + size - strips[index] : sum), 0);
71
+ return sizes.map((size, index) => (collapsed[index] ? strips[index] : size + (open ? freed / open : 0)));
72
+ }
73
+ /**
74
+ * The inverse of {@link collapseSplitterSizes}: puts each size in `restore` back into its collapsed panel's entry
75
+ * and takes what that adds from the open panels in the same equal parts. The entries keep adding up to what
76
+ * `sizes` did and render exactly as `sizes` do, while expanding a panel later returns it to its `restore` size.
77
+ */
78
+ function keepSplitterRestoreSizes(sizes, collapsed, restore) {
79
+ const open = collapsed.filter((isCollapsed) => !isCollapsed).length;
80
+ const added = restore.reduce((sum, size, index) => (size === undefined ? sum : sum + size - sizes[index]), 0);
81
+ return sizes.map((size, index) => restore[index] ?? (collapsed[index] ? size : size - (open ? added / open : 0)));
82
+ }
83
+ /**
84
+ * Moves the boundary that follows `index` by `delta` pixels and returns the new sizes.
85
+ *
86
+ * The panels on one side of the boundary take the delta and the ones on the other side give it up, each walking
87
+ * outwards from the boundary: a panel sitting at its limit hands the remainder to the next one instead of
88
+ * stopping the drag. Walking outwards on the taking side too is what keeps a boundary reachable when the panel
89
+ * right beside it is pinned — otherwise a neighbour at its maximum would freeze a boundary that the panels
90
+ * further out could still move, and the drag would do nothing at all.
91
+ */
92
+ function resizeSplitterSizesAt(sizes, index, delta, min, max) {
93
+ const next = [...sizes];
94
+ if (index < 0 || index >= sizes.length - 1)
95
+ return next;
96
+ // Nearest to the boundary first, so the panel beside it always absorbs as much as it can before the next.
97
+ const leading = Array.from({ length: index + 1 }, (_, offset) => index - offset);
98
+ const trailing = Array.from({ length: sizes.length - index - 1 }, (_, offset) => index + 1 + offset);
99
+ const growing = delta > 0;
100
+ const roomOf = (indices, grow) => indices.reduce((room, panel) => room + (grow ? max[panel] - sizes[panel] : sizes[panel] - min[panel]), 0);
101
+ // The boundary travels as far as the tighter of its two sides allows.
102
+ const travel = Math.min(Math.abs(delta), roomOf(leading, growing), roomOf(trailing, !growing));
103
+ const spend = (indices, grow) => {
104
+ let remaining = travel;
105
+ for (const panel of indices) {
106
+ if (remaining <= EPSILON)
107
+ break;
108
+ const taken = Math.min(remaining, grow ? max[panel] - sizes[panel] : sizes[panel] - min[panel]);
109
+ next[panel] = sizes[panel] + (grow ? taken : -taken);
110
+ remaining -= taken;
56
111
  }
57
- // fix IE issue with gutter icon. flex-direction is required for flex alignment options
58
- this.setStyle("flex-direction" /* StyleProperty.FlexDirection */, this.isVertical ? 'row' : 'column');
59
- }
60
- getPosition() {
61
- return {
62
- x: this.elementRef.nativeElement.offsetLeft,
63
- y: this.elementRef.nativeElement.offsetTop
64
- };
65
- }
66
- setStyle(property, value) {
67
- this.renderer.setStyle(this.elementRef.nativeElement, property, value);
68
- }
69
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqGutterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
70
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqGutterDirective, isStandalone: true, selector: "kbq-gutter", inputs: { direction: "direction", order: "order", size: "size" }, host: { listeners: { "mousedown": "dragged = true" }, properties: { "class.kbq-gutter_vertical": "isVertical", "class.kbq-gutter_dragged": "dragged" }, classAttribute: "kbq-gutter" }, ngImport: i0 }); }
112
+ };
113
+ spend(leading, growing);
114
+ spend(trailing, !growing);
115
+ return next;
71
116
  }
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqGutterDirective, decorators: [{
73
- type: Directive,
74
- args: [{
75
- selector: 'kbq-gutter',
76
- host: {
77
- class: 'kbq-gutter',
78
- '[class.kbq-gutter_vertical]': 'isVertical',
79
- '[class.kbq-gutter_dragged]': 'dragged',
80
- '(mousedown)': 'dragged = true'
81
- }
82
- }]
83
- }], propDecorators: { direction: [{
84
- type: Input
85
- }], order: [{
86
- type: Input
87
- }], size: [{
88
- type: Input
89
- }] } });
90
- class KbqGutterGhostDirective {
117
+ /**
118
+ * Snaps a target size onto the nearest snap point it is close enough to, or returns it unchanged.
119
+ *
120
+ * Each point carries its own tolerance, because the panels around a separator both contribute points and each
121
+ * of them says how far its own pull reaches. Two points exactly as close as one another are settled by
122
+ * declaration order, so a target sitting midway between them picks the same one however it got there.
123
+ *
124
+ * @internal
125
+ */
126
+ function snapSplitterSize(target, snapPoints) {
127
+ let snapped = target;
128
+ let closest = Number.POSITIVE_INFINITY;
129
+ for (const { size, tolerance } of snapPoints) {
130
+ if (!Number.isFinite(size))
131
+ continue;
132
+ const distance = Math.abs(size - target);
133
+ if (distance > tolerance || distance >= closest)
134
+ continue;
135
+ closest = distance;
136
+ snapped = size;
137
+ }
138
+ return snapped;
139
+ }
140
+ /** How far one arrow key press moves a separator, in pixels. */
141
+ const KEYBOARD_STEP = 8;
142
+ /** Sizes closer than this are the same size. */
143
+ const EPSILON = 0.01;
144
+ const sumOf = (sizes) => sizes.reduce((sum, size) => sum + size, 0);
145
+ const KBQ_SPLITTER_DEFAULT_OPTIONS = {
146
+ appearance: 'divider',
147
+ snapTolerance: 32
148
+ };
149
+ /** Injection token holding the current {@link KbqSplitterOptions}. */
150
+ const KBQ_SPLITTER_OPTIONS = new InjectionToken('KBQ_SPLITTER_OPTIONS', {
151
+ factory: () => KBQ_SPLITTER_DEFAULT_OPTIONS
152
+ });
153
+ /**
154
+ * Overrides the default splitter options within the given injector scope — the whole application from
155
+ * `bootstrapApplication`, or one subtree from the `providers` of a component or a route.
156
+ */
157
+ function kbqSplitterOptionsProvider(options) {
158
+ return {
159
+ provide: KBQ_SPLITTER_OPTIONS,
160
+ useValue: { ...KBQ_SPLITTER_DEFAULT_OPTIONS, ...options }
161
+ };
162
+ }
163
+ /**
164
+ * Contract a {@link KbqSplitterPanel} resolves to reach the splitter that projects it.
165
+ *
166
+ * @docs-private
167
+ */
168
+ const KBQ_SPLITTER = new InjectionToken('KBQ_SPLITTER');
169
+ /**
170
+ * A resizable region of a {@link KbqSplitter}.
171
+ *
172
+ * Every panel but the last renders the separator that follows it, so the separator sits between the two
173
+ * panels it resizes in the tab order as well as on screen.
174
+ */
175
+ class KbqSplitterPanel {
91
176
  constructor() {
92
- this.elementRef = inject(ElementRef);
93
- this.renderer = inject(Renderer2);
94
- this._x = 0;
95
- this._y = 0;
96
- this._direction = Direction.Vertical;
97
- this._size = 6;
98
- }
99
- // TODO: Skipped for migration because:
100
- // Accessor inputs cannot be migrated as they are too complex.
101
- get x() {
102
- return this._x;
103
- }
104
- set x(x) {
105
- this._x = x;
106
- this.setStyle("left" /* StyleProperty.Left */, coerceCssPixelValue(x));
107
- }
108
- // TODO: Skipped for migration because:
109
- // Accessor inputs cannot be migrated as they are too complex.
110
- get y() {
111
- return this._y;
112
- }
113
- set y(y) {
114
- this._y = y;
115
- this.setStyle("top" /* StyleProperty.Top */, coerceCssPixelValue(y));
116
- }
117
- // TODO: Skipped for migration because:
118
- // Accessor inputs cannot be migrated as they are too complex.
119
- get direction() {
120
- return this._direction;
121
- }
122
- set direction(direction) {
123
- this._direction = direction;
124
- this.updateDimensions();
125
- }
126
- // TODO: Skipped for migration because:
127
- // Accessor inputs cannot be migrated as they are too complex.
128
- get size() {
129
- return this._size;
130
- }
131
- set size(size) {
132
- this._size = coerceNumberProperty(size);
133
- this.updateDimensions();
134
- }
135
- get isVertical() {
136
- return this.direction === Direction.Vertical;
137
- }
138
- updateDimensions() {
139
- this.setStyle(this.isVertical ? "width" /* StyleProperty.Width */ : "height" /* StyleProperty.Height */, '100%');
140
- this.setStyle(this.isVertical ? "height" /* StyleProperty.Height */ : "width" /* StyleProperty.Width */, coerceCssPixelValue(this.size));
141
- }
142
- setStyle(property, value) {
143
- this.renderer.setStyle(this.elementRef.nativeElement, property, value);
177
+ /** @docs-private */
178
+ this.splitter = inject(KBQ_SPLITTER);
179
+ this.options = inject(KBQ_SPLITTER_OPTIONS);
180
+ this.focusMonitor = inject(FocusMonitor);
181
+ this.a11yLocaleConfiguration = kbqInjectA11yLocaleConfiguration();
182
+ /** @docs-private */
183
+ this.element = kbqInjectNativeElement();
184
+ /**
185
+ * Identifies the panel to the `aria-controls` of its own separator, and gives a host something to point
186
+ * `aria-labelledby` or a fragment link at. Generated when omitted.
187
+ */
188
+ this.id = input(inject(_IdGenerator).getId('kbq-splitter-panel-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
189
+ /**
190
+ * Size the panel starts at, in pixels (`240`, `'240px'`) or as a share of the splitter (`'30%'`).
191
+ * Panels that leave it unset share whatever the sized ones did not claim.
192
+ */
193
+ this.size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
194
+ /** Smallest size the panel may be dragged to. Defaults to `0`. */
195
+ this.minSize = input(undefined, ...(ngDevMode ? [{ debugName: "minSize" }] : /* istanbul ignore next */ []));
196
+ /** Largest size the panel may be dragged to. Unbounded when omitted. */
197
+ this.maxSize = input(undefined, ...(ngDevMode ? [{ debugName: "maxSize" }] : /* istanbul ignore next */ []));
198
+ /**
199
+ * Sizes a drag is pulled onto when it is released near one. `minSize` and `maxSize` become snap points too
200
+ * as soon as either panel around a separator declares any snap size.
201
+ *
202
+ * The layout the panels start at settles onto them as well, so a splitter is never handed to the user
203
+ * sitting between two of its own snap points.
204
+ */
205
+ this.snapSizes = input([], ...(ngDevMode ? [{ debugName: "snapSizes" }] : /* istanbul ignore next */ []));
206
+ /**
207
+ * How close to one of this panel's {@link snapSizes} a drag has to be released for it to be pulled in, in
208
+ * pixels. Raise it to make the snap points reach further — past half the gap between two of them the panel
209
+ * can only ever land on a snap size.
210
+ *
211
+ * Defaults to the app-wide {@link KBQ_SPLITTER_OPTIONS}.
212
+ */
213
+ this.snapTolerance = input(this.options.snapTolerance, { ...(ngDevMode ? { debugName: "snapTolerance" } : /* istanbul ignore next */ {}), transform: numberAttribute });
214
+ /**
215
+ * Whether dragging the panel past half of its `minSize` collapses it to `collapsedSize` instead of
216
+ * stopping at the minimum.
217
+ */
218
+ this.collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
219
+ /** Size the panel takes while collapsed. `0` — the default — hides it completely. */
220
+ this.collapsedSize = input(0, ...(ngDevMode ? [{ debugName: "collapsedSize" }] : /* istanbul ignore next */ []));
221
+ /**
222
+ * Whether the panel is collapsed. Two-way, so a host can collapse and restore the panel itself — which is
223
+ * the only way back for a panel whose `collapsedSize` is `0` and which therefore has no separator to grab.
224
+ */
225
+ this.collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
226
+ /** Accessible name of the separator that follows the panel; falls back to the localized default. */
227
+ this.separatorAriaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "separatorAriaLabel" }] : /* istanbul ignore next */ []));
228
+ /** The panel's own separator; a subtree search would find a nested splitter's separators first. */
229
+ this.separator = viewChild('separator', ...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
230
+ /** @docs-private */
231
+ this.index = computed(() => this.splitter.panels().indexOf(this), ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
232
+ /**
233
+ * Whether the panel renders no separator. The last panel has nothing after it to resize against, and a
234
+ * panel that reached the splitter through the element injector without being one of its content children —
235
+ * a wrapper element or another component's template stands between them — has no place in the group at
236
+ * all, so it must not offer a handle whose ARIA values would resolve against an index of `-1`.
237
+ *
238
+ * @docs-private
239
+ */
240
+ this.last = computed(() => {
241
+ const index = this.index();
242
+ return index === -1 || index === this.splitter.panels().length - 1;
243
+ }, ...(ngDevMode ? [{ debugName: "last" }] : /* istanbul ignore next */ []));
244
+ /** @docs-private */
245
+ this.disabled = computed(() => this.splitter.disabled(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
246
+ /** A separator is oriented across the axis its splitter lays panels out along. @docs-private */
247
+ this.separatorOrientation = computed(() => this.splitter.orientation() === 'horizontal' ? 'vertical' : 'horizontal', ...(ngDevMode ? [{ debugName: "separatorOrientation" }] : /* istanbul ignore next */ []));
248
+ /** @docs-private */
249
+ this.separatorCursor = computed(() => this.splitter.separatorCursor(this.index()), ...(ngDevMode ? [{ debugName: "separatorCursor" }] : /* istanbul ignore next */ []));
250
+ /** @docs-private */
251
+ this.separatorValues = computed(() => this.splitter.separatorValues(this.index()), ...(ngDevMode ? [{ debugName: "separatorValues" }] : /* istanbul ignore next */ []));
252
+ /** @docs-private */
253
+ this.resolvedSeparatorAriaLabel = computed(() => this.separatorAriaLabel() || this.a11yLocaleConfiguration().resizePanels, ...(ngDevMode ? [{ debugName: "resolvedSeparatorAriaLabel" }] : /* istanbul ignore next */ []));
254
+ /** Unsupported sizes already reported, so a check that runs again does not repeat itself. */
255
+ this.reportedSizes = new Set();
256
+ // A size in another unit is ignored, which would otherwise leave the panel without the limit its template
257
+ // asks for and nothing to say why.
258
+ if (isDevMode())
259
+ effect(() => this.reportUnsupportedSizes());
260
+ }
261
+ /**
262
+ * Demotes the separator's focus origin to the pointer when a drag starts, so the keyboard-focus frame
263
+ * stays hidden for the whole drag and does not linger afterwards. Keyboard focus keeps the frame.
264
+ *
265
+ * `preventScroll` because half of the separator reaches past the panel it belongs to: once the panel beyond
266
+ * it is collapsed to nothing, that half hangs outside the splitter itself, and revealing it would scroll
267
+ * whatever clipping box the splitter sits in — leaving the panels shifted by half a hit area, with a blank
268
+ * strip along the edge that nothing scrolls back.
269
+ *
270
+ * @docs-private
271
+ */
272
+ handleResizeStart({ width, height }) {
273
+ const separator = this.separator();
274
+ if (separator)
275
+ this.focusMonitor.focusVia(separator.nativeElement, 'mouse', { preventScroll: true });
276
+ // The resizer adds the travel to the size it measured at the press, which is the panel's content box.
277
+ // Measured from the track instead, padding and sub-pixel rounding would land as a jump on the first move.
278
+ this.splitter.handleResizeStart(this.index(), this.splitter.orientation() === 'horizontal' ? width : height);
279
+ }
280
+ /** @docs-private */
281
+ handleSizeChange({ width, height }) {
282
+ this.splitter.handleResizeTo(this.index(), this.splitter.orientation() === 'horizontal' ? width : height);
283
+ }
284
+ /** @docs-private */
285
+ handleSeparatorKeydown(event) {
286
+ this.splitter.handleSeparatorKeydown(this.index(), event);
287
+ }
288
+ /** @docs-private */
289
+ handleSeparatorDblClick(event) {
290
+ event.preventDefault();
291
+ this.splitter.handleSeparatorDblClick(this.index());
292
+ }
293
+ reportUnsupportedSizes() {
294
+ const sizes = [
295
+ ['size', this.size()],
296
+ ['minSize', this.minSize()],
297
+ ['maxSize', this.maxSize()],
298
+ ['collapsedSize', this.collapsedSize()],
299
+ ...this.snapSizes().map((size) => ['snapSizes', size])
300
+ ];
301
+ for (const [name, size] of sizes) {
302
+ const key = `${name}=${size}`;
303
+ if (size === undefined || resolveSplitterSize(size, 0) !== null || this.reportedSizes.has(key))
304
+ continue;
305
+ this.reportedSizes.add(key);
306
+ // eslint-disable-next-line no-console
307
+ console.warn(`kbq-splitter-panel: \`${name}\` "${size}" is ignored. A size is a number of pixels, ` +
308
+ 'a "<number>px" string or a "<number>%" share of the splitter.');
309
+ }
144
310
  }
145
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqGutterGhostDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
146
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqGutterGhostDirective, isStandalone: true, selector: "kbq-gutter-ghost", inputs: { visible: "visible", x: "x", y: "y", direction: "direction", size: "size" }, host: { properties: { "class.kbq-gutter-ghost_vertical": "isVertical", "class.kbq-gutter-ghost_visible": "visible" }, classAttribute: "kbq-gutter-ghost" }, ngImport: i0 }); }
311
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterPanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
312
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqSplitterPanel, isStandalone: true, selector: "kbq-splitter-panel", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, minSize: { classPropertyName: "minSize", publicName: "minSize", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, snapSizes: { classPropertyName: "snapSizes", publicName: "snapSizes", isSignal: true, isRequired: false, transformFunction: null }, snapTolerance: { classPropertyName: "snapTolerance", publicName: "snapTolerance", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, collapsedSize: { classPropertyName: "collapsedSize", publicName: "collapsedSize", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, separatorAriaLabel: { classPropertyName: "separatorAriaLabel", publicName: "separatorAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { attributes: { "tabindex": "-1" }, properties: { "attr.id": "id()", "class.kbq-splitter-panel_collapsed": "collapsed()" }, classAttribute: "kbq-splitter-panel" }, viewQueries: [{ propertyName: "separator", first: true, predicate: ["separator"], descendants: true, isSignal: true }], exportAs: ["kbqSplitterPanel"], hostDirectives: [{ directive: i1.KbqResizable }], ngImport: i0, template: `
313
+ <div class="kbq-splitter-panel__content">
314
+ <ng-content />
315
+ </div>
316
+
317
+ @if (!last()) {
318
+ <div
319
+ #separator
320
+ cdkMonitorElementFocus
321
+ class="kbq-splitter-panel__separator"
322
+ role="separator"
323
+ [attr.aria-controls]="id()"
324
+ [attr.aria-disabled]="disabled() || null"
325
+ [attr.aria-label]="resolvedSeparatorAriaLabel()"
326
+ [attr.aria-orientation]="separatorOrientation()"
327
+ [attr.aria-valuemax]="separatorValues().max"
328
+ [attr.aria-valuemin]="separatorValues().min"
329
+ [attr.aria-valuenow]="separatorValues().now"
330
+ [attr.tabindex]="disabled() ? -1 : 0"
331
+ [cursor]="separatorCursor()"
332
+ [disableSizeUpdate]="true"
333
+ [kbqResizer]="splitter.resizerDirection()"
334
+ (dblclick)="handleSeparatorDblClick($event)"
335
+ (keydown)="handleSeparatorKeydown($event)"
336
+ (lostpointercapture)="splitter.handleResizeEnd()"
337
+ (resizeStart)="handleResizeStart($event)"
338
+ (sizeChange)="handleSizeChange($event)"
339
+ ></div>
340
+ }
341
+ `, isInline: true, dependencies: [{ kind: "directive", type: KbqResizer, selector: "[kbqResizer]", inputs: ["kbqResizer", "cursor", "disableSizeUpdate"], outputs: ["resizeStart", "sizeChange"], exportAs: ["kbqResizer"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
147
342
  }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqGutterGhostDirective, decorators: [{
149
- type: Directive,
343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterPanel, decorators: [{
344
+ type: Component,
150
345
  args: [{
151
- selector: 'kbq-gutter-ghost',
346
+ selector: 'kbq-splitter-panel',
347
+ imports: [KbqResizer, CdkMonitorFocus],
348
+ template: `
349
+ <div class="kbq-splitter-panel__content">
350
+ <ng-content />
351
+ </div>
352
+
353
+ @if (!last()) {
354
+ <div
355
+ #separator
356
+ cdkMonitorElementFocus
357
+ class="kbq-splitter-panel__separator"
358
+ role="separator"
359
+ [attr.aria-controls]="id()"
360
+ [attr.aria-disabled]="disabled() || null"
361
+ [attr.aria-label]="resolvedSeparatorAriaLabel()"
362
+ [attr.aria-orientation]="separatorOrientation()"
363
+ [attr.aria-valuemax]="separatorValues().max"
364
+ [attr.aria-valuemin]="separatorValues().min"
365
+ [attr.aria-valuenow]="separatorValues().now"
366
+ [attr.tabindex]="disabled() ? -1 : 0"
367
+ [cursor]="separatorCursor()"
368
+ [disableSizeUpdate]="true"
369
+ [kbqResizer]="splitter.resizerDirection()"
370
+ (dblclick)="handleSeparatorDblClick($event)"
371
+ (keydown)="handleSeparatorKeydown($event)"
372
+ (lostpointercapture)="splitter.handleResizeEnd()"
373
+ (resizeStart)="handleResizeStart($event)"
374
+ (sizeChange)="handleSizeChange($event)"
375
+ ></div>
376
+ }
377
+ `,
378
+ changeDetection: ChangeDetectionStrategy.OnPush,
379
+ encapsulation: ViewEncapsulation.None,
152
380
  host: {
153
- class: 'kbq-gutter-ghost',
154
- '[class.kbq-gutter-ghost_vertical]': 'isVertical',
155
- '[class.kbq-gutter-ghost_visible]': 'visible'
156
- }
381
+ class: 'kbq-splitter-panel',
382
+ tabindex: '-1',
383
+ '[attr.id]': 'id()',
384
+ '[class.kbq-splitter-panel_collapsed]': 'collapsed()'
385
+ },
386
+ hostDirectives: [KbqResizable],
387
+ exportAs: 'kbqSplitterPanel'
157
388
  }]
158
- }], propDecorators: { visible: [{
159
- type: Input
160
- }], x: [{
161
- type: Input
162
- }], y: [{
163
- type: Input
164
- }], direction: [{
165
- type: Input
166
- }], size: [{
167
- type: Input
168
- }] } });
169
- class KbqSplitterComponent {
389
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], minSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSize", required: false }] }], maxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSize", required: false }] }], snapSizes: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapSizes", required: false }] }], snapTolerance: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapTolerance", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], collapsedSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedSize", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], separatorAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "separatorAriaLabel", required: false }] }], separator: [{ type: i0.ViewChild, args: ['separator', { isSignal: true }] }] } });
390
+ /**
391
+ * Splits an area into panels the user can resize by dragging the separators between them.
392
+ *
393
+ * Panels must be direct children of the splitter — a wrapper element around them hides them from the group.
394
+ *
395
+ * @example
396
+ * ```html
397
+ * <kbq-splitter>
398
+ * <kbq-splitter-panel [minSize]="100">…</kbq-splitter-panel>
399
+ * <kbq-splitter-panel>…</kbq-splitter-panel>
400
+ * </kbq-splitter>
401
+ * ```
402
+ */
403
+ class KbqSplitter {
170
404
  constructor() {
171
- this.elementRef = inject(ElementRef);
172
- this.changeDetectorRef = inject(ChangeDetectorRef);
173
- this.ngZone = inject(NgZone);
174
- this.renderer = inject(Renderer2);
175
- this.gutterPositionChange = output();
176
- this.areas = [];
177
- this.gutters = viewChildren(KbqGutterDirective, ...(ngDevMode ? [{ debugName: "gutters" }] : []));
178
- this.ghost = viewChild.required(KbqGutterGhostDirective);
179
- this._isDragging = false;
180
- this.areaPositionDivider = 2;
181
- this.listeners = [];
182
- this.areasChangeSubscription = Subscription.EMPTY;
183
- this._hideGutters = false;
184
- this._disabled = false;
185
- this._useGhost = false;
186
- this._gutterSize = 6;
187
- this._resizing = false;
188
- this.mapAndOrderArea = (area, index) => {
189
- const order = index * this.areaPositionDivider;
190
- area.setOrder(order);
191
- return {
192
- area,
193
- index,
194
- order,
195
- initialSize: area.getSize()
196
- };
197
- };
198
- }
199
- get isDragging() {
200
- return this._isDragging;
201
- }
202
- // TODO: Skipped for migration because:
203
- // Accessor inputs cannot be migrated as they are too complex.
204
- get hideGutters() {
205
- return this._hideGutters;
206
- }
207
- set hideGutters(value) {
208
- this._hideGutters = coerceBooleanProperty(value);
209
- }
210
- // TODO: Skipped for migration because:
211
- // Accessor inputs cannot be migrated as they are too complex.
212
- get direction() {
213
- return this._direction;
214
- }
215
- set direction(direction) {
216
- this._direction = direction;
217
- }
218
- // TODO: Skipped for migration because:
219
- // Accessor inputs cannot be migrated as they are too complex.
220
- get disabled() {
221
- return this._disabled;
222
- }
223
- set disabled(disabled) {
224
- this._disabled = coerceBooleanProperty(disabled);
225
- }
226
- // TODO: Skipped for migration because:
227
- // Accessor inputs cannot be migrated as they are too complex.
228
- get useGhost() {
229
- return this._useGhost;
230
- }
231
- set useGhost(useGhost) {
232
- this._useGhost = coerceBooleanProperty(useGhost);
233
- }
234
- // TODO: Skipped for migration because:
235
- // Accessor inputs cannot be migrated as they are too complex.
236
- get gutterSize() {
237
- return this._gutterSize;
238
- }
239
- set gutterSize(gutterSize) {
240
- const size = coerceNumberProperty(gutterSize);
241
- this._gutterSize = size > 0 ? size : this.gutterSize;
242
- }
243
- get resizing() {
244
- return this._resizing;
245
- }
246
- addArea(area) {
247
- this.areas.push(this.mapAndOrderArea(area, this.areas.length));
248
- this.changeDetectorRef.detectChanges();
249
- }
250
- ngOnInit() {
251
- if (!this.direction) {
252
- this.direction = Direction.Horizontal;
253
- }
254
- this.setStyle("flex-direction" /* StyleProperty.FlexDirection */, this.isVertical() ? 'column' : 'row');
255
- }
256
- ngAfterContentInit() {
257
- this.areasChangeSubscription = this.areaRefs.changes.subscribe((data) => {
258
- this.areas = data.map(this.mapAndOrderArea);
259
- this.changeDetectorRef.markForCheck();
405
+ this.nativeElement = kbqInjectNativeElement();
406
+ this.destroyRef = inject(DestroyRef);
407
+ this.platform = inject(Platform);
408
+ this.window = inject(KBQ_WINDOW);
409
+ this.resizeObserver = inject(SharedResizeObserver);
410
+ this.directionality = inject(Directionality, { optional: true });
411
+ this.options = inject(KBQ_SPLITTER_OPTIONS);
412
+ /** Direction the panels are laid out in. */
413
+ this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
414
+ /** How the separators are drawn. Defaults to the app-wide {@link KBQ_SPLITTER_OPTIONS}. */
415
+ this.appearance = input(this.options.appearance, ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
416
+ /** Whether the panels can be resized at all. */
417
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
418
+ /**
419
+ * Sizes of the panels as percentages of the splitter, in panel order.
420
+ *
421
+ * Two-way and, while `null`, derived from what the panels declare — so a host reads it to persist a
422
+ * layout, writes it to restore one, and shares the same signal between two splitters to keep their panels
423
+ * the same width. Setting it back to `null` returns the panels to their declared sizes.
424
+ */
425
+ this.layout = model(null, ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
426
+ /** @docs-private */
427
+ this.panels = contentChildren(KbqSplitterPanel, { ...(ngDevMode ? { debugName: "panels" } : /* istanbul ignore next */ {}), descendants: false });
428
+ /** Boundary a drag is moving right now, or `null` when no drag is in progress. */
429
+ this.dragBoundary = signal(null, ...(ngDevMode ? [{ debugName: "dragBoundary" }] : /* istanbul ignore next */ []));
430
+ /** Whether a separator is being dragged right now. @docs-private */
431
+ this.dragging = computed(() => this.dragBoundary() !== null, ...(ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []));
432
+ /** Splitter size along the resize axis, in pixels; `0` until the first measurement. */
433
+ this.containerSize = signal(0, ...(ngDevMode ? [{ debugName: "containerSize" }] : /* istanbul ignore next */ []));
434
+ /** Sizes and layout captured when the drag began; every move is measured against these, so clamping cannot drift. */
435
+ this.dragSnapshot = null;
436
+ // `valueSignal` rather than the plain `value` getter: the getter is not reactive, so a `dir` flipped at
437
+ // runtime would leave every computed below it holding the direction the app booted with.
438
+ this.rtl = computed(() => this.directionality?.valueSignal() === 'rtl', ...(ngDevMode ? [{ debugName: "rtl" }] : /* istanbul ignore next */ []));
439
+ /** A disabled splitter reports no direction, which is how `KbqResizer` ignores a drag. @docs-private */
440
+ this.resizerDirection = computed(() => {
441
+ if (this.disabled())
442
+ return [0, 0];
443
+ if (this.orientation() === 'vertical')
444
+ return [0, 1];
445
+ // In RTL the first panel sits on the right, so growing it moves the boundary west.
446
+ return this.rtl() ? [-1, 0] : [1, 0];
447
+ }, ...(ngDevMode ? [{ debugName: "resizerDirection" }] : /* istanbul ignore next */ []));
448
+ /** Smallest size of each panel while it is not collapsed, in pixels. */
449
+ this.expandedMinSizes = computed(() => {
450
+ const total = this.containerSize();
451
+ return this.panels().map((panel) => Math.max(0, resolveSplitterSize(panel.minSize(), total) ?? 0));
452
+ }, ...(ngDevMode ? [{ debugName: "expandedMinSizes" }] : /* istanbul ignore next */ []));
453
+ /** Largest size of each panel while it is not collapsed, in pixels. */
454
+ this.expandedMaxSizes = computed(() => {
455
+ const total = this.containerSize();
456
+ const min = this.expandedMinSizes();
457
+ return this.panels().map((panel, index) => {
458
+ const max = resolveSplitterSize(panel.maxSize(), total) ?? Number.POSITIVE_INFINITY;
459
+ // A maximum below the minimum would make every clamp order-dependent; the minimum wins.
460
+ return Math.max(min[index], max);
461
+ });
462
+ }, ...(ngDevMode ? [{ debugName: "expandedMaxSizes" }] : /* istanbul ignore next */ []));
463
+ /** Size a collapsed panel is pinned to, in pixels. */
464
+ this.collapsedSizes = computed(() => {
465
+ const total = this.containerSize();
466
+ return this.panels().map((panel) => Math.max(0, resolveSplitterSize(panel.collapsedSize(), total) ?? 0));
467
+ }, ...(ngDevMode ? [{ debugName: "collapsedSizes" }] : /* istanbul ignore next */ []));
468
+ /**
469
+ * Panels the drag in progress may take through the gap between their collapsed size and their minimum.
470
+ *
471
+ * Only the two around the boundary being dragged. A collapsible panel further out is being pushed rather
472
+ * than aimed at, and letting a push carry one into its gap would collapse it without the user ever having
473
+ * pointed at it.
474
+ */
475
+ this.freePanels = computed(() => {
476
+ const boundary = this.dragBoundary();
477
+ return this.panels().map((panel, index) => boundary !== null && panel.collapsible() && (index === boundary || index === boundary + 1));
478
+ }, ...(ngDevMode ? [{ debugName: "freePanels" }] : /* istanbul ignore next */ []));
479
+ /**
480
+ * Smallest size of each panel in pixels; a collapsed panel is pinned to its collapsed size.
481
+ *
482
+ * The sizes a collapsible panel may take are its collapsed size and everything from its minimum up, with a
483
+ * gap in between that it never occupies. Pinning it by `collapsed` is what keeps a drag out of that gap: the
484
+ * panel stops at the minimum and waits there while the pointer crosses, and `collapsed` flips it to the strip
485
+ * once the pointer passes the midpoint.
486
+ */
487
+ this.minSizes = computed(() => this.panels().map((panel, index) => panel.collapsed() ? this.collapsedSizes()[index] : this.expandedMinSizes()[index]), ...(ngDevMode ? [{ debugName: "minSizes" }] : /* istanbul ignore next */ []));
488
+ /** Largest size of each panel in pixels; a collapsed panel is pinned to its collapsed size. */
489
+ this.maxSizes = computed(() => this.panels().map((panel, index) => panel.collapsed() ? this.collapsedSizes()[index] : this.expandedMaxSizes()[index]), ...(ngDevMode ? [{ debugName: "maxSizes" }] : /* istanbul ignore next */ []));
490
+ /** Sizes seeded from what the panels declare — where the splitter starts and what a reset returns to. */
491
+ this.defaultSizes = computed(() => {
492
+ const panels = this.panels();
493
+ const total = this.containerSize();
494
+ if (!panels.length || total <= 0)
495
+ return panels.map(() => 0);
496
+ const declared = panels.map((panel) => panel.collapsed()
497
+ ? (resolveSplitterSize(panel.collapsedSize(), total) ?? 0)
498
+ : resolveSplitterSize(panel.size(), total));
499
+ const flexible = declared.map((_, index) => index).filter((index) => declared[index] === null);
500
+ const claimed = declared.reduce((sum, size) => sum + (size ?? 0), 0);
501
+ const share = flexible.length ? Math.max(0, total - claimed) / flexible.length : 0;
502
+ return this.settleOnSnapPoints(fitSplitterSizes(declared.map((size) => size ?? share), this.minSizes(), this.maxSizes(), total), total);
503
+ }, ...(ngDevMode ? [{ debugName: "defaultSizes" }] : /* istanbul ignore next */ []));
504
+ /** Current size of every panel in pixels. */
505
+ this.sizes = computed(() => {
506
+ const layout = this.layout();
507
+ const total = this.containerSize();
508
+ if (!layout || layout.length !== this.panels().length || total <= 0)
509
+ return this.defaultSizes();
510
+ return fitSplitterSizes(collapseSplitterSizes(layout.map((share) => (share / 100) * total), this.panels().map((panel) => panel.collapsed()), this.collapsedSizes()), this.minSizes(), this.maxSizes(), total);
511
+ }, ...(ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []));
512
+ /**
513
+ * Tracks are percentages of the splitter's content box, which is exactly what `containerSize` measures, so
514
+ * `size / total` renders as `size` pixels whatever padding the host puts on the splitter.
515
+ *
516
+ * Not `fr`: a flex factor carries only a ratio, and CSS Grid normalizes the factors by their sum. Sizes
517
+ * that cannot add up to the container — every panel pinned to a minimum too large to fit, or every panel
518
+ * capped below it — would then be silently rescaled to fill it, violating the very `minSize`/`maxSize` the
519
+ * layout was computed from, while `aria-valuenow` and the drag arithmetic went on reporting the sizes the
520
+ * component believed it had applied. Percentages under- or overflow instead, which is visible.
521
+ *
522
+ * Equal tracks stand in until the first measurement, which is the only layout that cannot be wrong before
523
+ * the splitter has a size to resolve `%` and `px` against.
524
+ *
525
+ * @docs-private
526
+ */
527
+ this.gridTemplate = computed(() => {
528
+ const count = this.panels().length;
529
+ if (!count)
530
+ return null;
531
+ if (this.containerSize() <= 0)
532
+ return `repeat(${count}, minmax(0, 1fr))`;
533
+ const total = this.containerSize();
534
+ return this.sizes()
535
+ .map((size) => `${((Math.max(0, size) / total) * 100).toFixed(4)}%`)
536
+ .join(' ');
537
+ }, ...(ngDevMode ? [{ debugName: "gridTemplate" }] : /* istanbul ignore next */ []));
538
+ // `afterNextRender` runs in the browser only, so no explicit platform guard is needed here.
539
+ afterNextRender(() => {
540
+ this.resizeObserver
541
+ .observe(this.nativeElement)
542
+ .pipe(startWith(null), takeUntilDestroyed(this.destroyRef))
543
+ .subscribe(() => this.measure());
544
+ });
545
+ // Swapping the axis changes which dimension every size resolves against, and no resize observation
546
+ // fires for it: the splitter's own box may not have changed at all.
547
+ effect(() => {
548
+ this.orientation();
549
+ if (this.platform.isBrowser)
550
+ this.measure();
260
551
  });
261
552
  }
262
- ngOnDestroy() {
263
- this.areasChangeSubscription.unsubscribe();
553
+ /** @docs-private */
554
+ separatorCursor(index) {
555
+ const horizontal = this.orientation() === 'horizontal';
556
+ if (this.disabled())
557
+ return 'default';
558
+ const { grow, shrink } = this.boundaryRoom(index);
559
+ const rtl = this.rtl();
560
+ // Which way the pointer travels to grow the leading panel, so the one-sided cursors point at the room
561
+ // that is actually left rather than at the panel that owns it.
562
+ const growCursor = horizontal ? (rtl ? 'w-resize' : 'e-resize') : 's-resize';
563
+ const shrinkCursor = horizontal ? (rtl ? 'e-resize' : 'w-resize') : 'n-resize';
564
+ if (grow < EPSILON && shrink < EPSILON)
565
+ return 'default';
566
+ if (shrink < EPSILON)
567
+ return growCursor;
568
+ if (grow < EPSILON)
569
+ return shrinkCursor;
570
+ return horizontal ? 'col-resize' : 'row-resize';
571
+ }
572
+ /** @docs-private */
573
+ separatorValues(index) {
574
+ const total = this.containerSize();
575
+ if (total <= 0)
576
+ return { now: 0, min: 0, max: 100 };
577
+ const sizes = this.sizes();
578
+ const { grow, shrink } = this.panelRoom(index);
579
+ const toPercent = (size) => Math.round((size / total) * 100);
580
+ return {
581
+ now: toPercent(sizes[index]),
582
+ min: toPercent(sizes[index] - shrink),
583
+ max: toPercent(sizes[index] + grow)
584
+ };
264
585
  }
265
- onMouseDown(event, leftAreaIndex, rightAreaIndex) {
266
- if (this.disabled) {
586
+ /** @docs-private */
587
+ handleResizeStart(index, origin) {
588
+ // Without a measurement every size resolves to zero, and a drag would read as one that collapses every
589
+ // collapsible panel it touches. A splitter with no size has nothing to resize anyway.
590
+ if (this.disabled() || this.containerSize() <= 0)
267
591
  return;
268
- }
269
- event.preventDefault();
270
- const startPoint = {
271
- x: event.screenX,
272
- y: event.screenY
592
+ const sizes = [...this.sizes()];
593
+ this.dragSnapshot = {
594
+ index,
595
+ sizes,
596
+ total: this.containerSize(),
597
+ layout: this.layout(),
598
+ origin: origin ?? sizes[index],
599
+ moved: false
273
600
  };
274
- const leftArea = this.areas[leftAreaIndex];
275
- const rightArea = this.areas[rightAreaIndex];
276
- leftArea.initialSize = leftArea.area.getSize();
277
- rightArea.initialSize = rightArea.area.getSize();
278
- let currentGutter;
279
- if (this.useGhost) {
280
- const gutterOrder = leftAreaIndex * 2 + 1;
281
- currentGutter = this.gutters().find((gutter) => gutter.order === gutterOrder);
282
- if (currentGutter) {
283
- const gutterPosition = currentGutter.getPosition();
284
- const ghost = this.ghost();
285
- ghost.direction = currentGutter.direction;
286
- ghost.size = currentGutter.size;
287
- ghost.x = gutterPosition.x;
288
- ghost.y = gutterPosition.y;
289
- ghost.visible = true;
290
- this.setStyle("cursor" /* StyleProperty.Cursor */, currentGutter.direction === Direction.Vertical ? 'row-resize' : 'col-resize');
291
- }
292
- }
293
- else {
294
- this.areas.forEach((item) => {
295
- const size = item.area.getSize();
296
- item.area.disableFlex();
297
- item.area.setSize(size);
298
- });
299
- }
300
- this.listeners.push(this.renderer.listen('document', 'mouseup', () => this.onMouseUp(leftArea, rightArea, currentGutter)));
301
- this.ngZone.runOutsideAngular(() => {
302
- this.listeners.push(this.renderer.listen('document', 'mousemove', (e) => this.onMouseMove(e, startPoint, leftArea, rightArea, currentGutter)));
303
- });
304
- this._isDragging = true;
601
+ this.dragBoundary.set(index);
305
602
  }
306
- removeArea(area) {
307
- let indexToRemove = -1;
308
- this.areas.some((item, index) => {
309
- if (item.area === area) {
310
- indexToRemove = index;
311
- return true;
312
- }
313
- return false;
314
- });
315
- if (indexToRemove === -1) {
603
+ /** @docs-private */
604
+ handleResizeTo(index, size) {
605
+ const snapshot = this.dragSnapshot;
606
+ if (!snapshot || snapshot.index !== index || !this.matchesSnapshot(snapshot))
316
607
  return;
317
- }
318
- this.areas.splice(indexToRemove, 1);
319
- }
320
- isVertical() {
321
- return this.direction === Direction.Vertical;
322
- }
323
- updateGutter() {
324
- this.gutters().forEach((gutter) => {
325
- if (gutter.dragged) {
326
- gutter.dragged = false;
327
- this.changeDetectorRef.detectChanges();
328
- }
608
+ const delta = size - snapshot.origin;
609
+ // Until the pointer travels, the press is not a drag: writing the layout for it would take the layout over
610
+ // from the panels for a gesture that may never move.
611
+ if (!snapshot.moved && Math.abs(delta) < EPSILON)
612
+ return;
613
+ snapshot.moved = true;
614
+ const pins = this.pinsFor(index, delta, snapshot);
615
+ const free = this.freePanels();
616
+ // Live, the way `NSSplitView` collapses a subview the moment its divider passes the midpoint: whatever a
617
+ // host binds to `collapsed` has to agree with the screen for the whole gesture, not catch up on release.
618
+ // Compared first, so a host hears `collapsedChange` once per crossing rather than on every move.
619
+ this.panels().forEach((panel, panelIndex) => {
620
+ if (free[panelIndex] && panel.collapsed() !== pins[panelIndex])
621
+ panel.collapsed.set(pins[panelIndex]);
329
622
  });
330
- }
331
- onMouseMove(event, startPoint, leftArea, rightArea, currentGutter) {
332
- if (!this.isDragging || this.disabled) {
623
+ this.applySizes(resizeSplitterSizesAt(snapshot.sizes, index, delta, this.minSizes(), this.maxSizes()));
624
+ }
625
+ /** @docs-private */
626
+ handleResizeEnd() {
627
+ const snapshot = this.dragSnapshot;
628
+ this.dragSnapshot = null;
629
+ // A press that never travelled leaves everything as it was: settling or snapping it would rewrite a layout
630
+ // nobody touched, or hand one still derived from the panels over to the host.
631
+ if (!snapshot?.moved || snapshot.total <= 0 || !this.matchesSnapshot(snapshot))
632
+ return this.endDrag();
633
+ const collapsed = this.settleCollapse(snapshot);
634
+ this.endDrag();
635
+ // A panel that just collapsed has taken the whole boundary with it; there is nothing left to snap.
636
+ if (collapsed)
333
637
  return;
334
- }
335
- const endPoint = {
336
- x: event.screenX,
337
- y: event.screenY
338
- };
339
- const offset = this.isVertical() ? startPoint.y - endPoint.y : startPoint.x - endPoint.x;
340
- if (this.useGhost && currentGutter) {
341
- const gutterPosition = currentGutter.getPosition();
342
- const leftPos = leftArea.area.getPosition();
343
- const rightPos = rightArea.area.getPosition();
344
- const rightMin = rightArea.area.getMinSize() || 0;
345
- const leftMin = leftArea.area.getMinSize() || 0;
346
- const key = this.isVertical() ? 'y' : 'x';
347
- const minPos = leftPos[key] - leftMin;
348
- const maxPos = rightPos[key] + (rightArea.area.getSize() || 0) - rightMin - currentGutter.size;
349
- const newPos = gutterPosition[key] - offset;
350
- this.ghost()[key] = newPos < minPos ? minPos : Math.min(newPos, maxPos);
351
- }
352
- else {
353
- this.resizeAreas(leftArea, rightArea, offset);
354
- }
355
- }
356
- resizeAreas(leftArea, rightArea, sizeOffset) {
357
- const newLeftAreaSize = leftArea.initialSize - sizeOffset;
358
- const newRightAreaSize = rightArea.initialSize + sizeOffset;
359
- const minLeftAreaSize = leftArea.area.getMinSize();
360
- const minRightAreaSize = rightArea.area.getMinSize();
361
- if (newLeftAreaSize < minLeftAreaSize || newRightAreaSize < minRightAreaSize) {
638
+ // Snapping happens here rather than on every move: the boundary follows the pointer exactly for the
639
+ // whole drag and lands on the nearest snap point only once it is let go. Pulling mid-drag instead would
640
+ // freeze the panel for as long as the pointer stayed near a point and then jump when it broke free —
641
+ // and the specification names `scroll-snap-type: proximity`, which likewise settles on release.
642
+ const sizes = this.sizes();
643
+ const delta = this.snapDelta(snapshot.index, 0, { sizes, total: snapshot.total });
644
+ if (Math.abs(delta) < EPSILON)
362
645
  return;
363
- }
364
- else if (newLeftAreaSize <= 0) {
365
- leftArea.area.setSize(0);
366
- rightArea.area.setSize(rightArea.initialSize + leftArea.initialSize);
367
- }
368
- else if (newRightAreaSize <= 0) {
369
- leftArea.area.setSize(rightArea.initialSize + leftArea.initialSize);
370
- rightArea.area.setSize(0);
371
- }
372
- else {
373
- leftArea.area.setSize(newLeftAreaSize);
374
- rightArea.area.setSize(newRightAreaSize);
375
- }
376
- }
377
- onMouseUp(leftArea, rightArea, currentGutter) {
378
- while (this.listeners.length > 0) {
379
- const unsubscribe = this.listeners.pop();
380
- if (unsubscribe) {
381
- unsubscribe();
382
- }
383
- }
384
- if (this.useGhost && currentGutter) {
385
- const gutterPosition = currentGutter.getPosition();
386
- const ghost = this.ghost();
387
- const offset = ghost.direction === Direction.Vertical ? gutterPosition.y - ghost.y : gutterPosition.x - ghost.x;
388
- this.resizeAreas(leftArea, rightArea, offset);
389
- this.ghost().visible = false;
390
- this.setStyle("cursor" /* StyleProperty.Cursor */, 'unset');
391
- }
392
- this._isDragging = false;
393
- this.updateGutter();
394
- // TODO: The 'emit' function requires a mandatory void argument
395
- this.gutterPositionChange.emit();
396
- this.changeDetectorRef.markForCheck();
646
+ this.applySizes(resizeSplitterSizesAt(sizes, snapshot.index, delta, this.minSizes(), this.maxSizes()));
397
647
  }
398
- setStyle(property, value) {
399
- this.renderer.setStyle(this.elementRef.nativeElement, property, value);
400
- }
401
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSplitterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
402
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqSplitterComponent, isStandalone: true, selector: "kbq-splitter", inputs: { hideGutters: "hideGutters", direction: "direction", disabled: "disabled", useGhost: "useGhost", gutterSize: "gutterSize" }, outputs: { gutterPositionChange: "gutterPositionChange" }, host: { classAttribute: "kbq-splitter" }, queries: [{ propertyName: "areaRefs", predicate: i0.forwardRef(() => KbqSplitterAreaDirective) }], viewQueries: [{ propertyName: "gutters", predicate: KbqGutterDirective, descendants: true, isSignal: true }, { propertyName: "ghost", first: true, predicate: KbqGutterGhostDirective, descendants: true, isSignal: true }], exportAs: ["kbqSplitter"], ngImport: i0, template: "<ng-content />\n\n@for (area of areas; track area) {\n @if (!$last) {\n <kbq-gutter\n [attr.disabled]=\"disabled || null\"\n [direction]=\"direction\"\n [order]=\"$index * 2 + 1\"\n [size]=\"gutterSize\"\n [style.display]=\"hideGutters ? 'none' : 'flex'\"\n (mousedown)=\"onMouseDown($event, $index, $index + 1)\"\n />\n }\n}\n\n@if (useGhost) {\n <kbq-gutter-ghost />\n}\n", styles: [".kbq-splitter{display:flex;position:relative;flex-wrap:nowrap;align-items:stretch;overflow:hidden}.kbq-splitter .kbq-splitter-area{overflow:hidden}.kbq-splitter .kbq-splitter-area_resizing{pointer-events:none}.kbq-gutter{display:flex;flex-grow:0;flex-shrink:0;justify-content:center;align-items:center;overflow:hidden}.kbq-gutter.kbq-gutter_vertical>.kbq-icon{transform:rotate(90deg)}.kbq-gutter-ghost{position:absolute;z-index:999;display:none;overflow:hidden}.kbq-gutter-ghost.kbq-gutter-ghost_vertical>.kbq-icon{transform:rotate(90deg)}.kbq-gutter-ghost.kbq-gutter-ghost_visible{display:block}.kbq-gutter{cursor:col-resize}.kbq-gutter:hover,.kbq-gutter.kbq-gutter_dragged{background-color:var(--kbq-states-background-transparent-hover)}.kbq-gutter.kbq-gutter_vertical{cursor:row-resize}.kbq-gutter[disabled]{background-color:var(--kbq-states-background-disabled);cursor:default}.kbq-gutter-ghost{background:var(--kbq-states-background-transparent-active)}\n"], dependencies: [{ kind: "directive", type: KbqGutterDirective, selector: "kbq-gutter", inputs: ["direction", "order", "size"] }, { kind: "directive", type: KbqGutterGhostDirective, selector: "kbq-gutter-ghost", inputs: ["visible", "x", "y", "direction", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
403
- }
404
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSplitterComponent, decorators: [{
405
- type: Component,
406
- args: [{ selector: 'kbq-splitter', imports: [KbqGutterDirective, KbqGutterGhostDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
407
- class: 'kbq-splitter'
408
- }, exportAs: 'kbqSplitter', preserveWhitespaces: false, template: "<ng-content />\n\n@for (area of areas; track area) {\n @if (!$last) {\n <kbq-gutter\n [attr.disabled]=\"disabled || null\"\n [direction]=\"direction\"\n [order]=\"$index * 2 + 1\"\n [size]=\"gutterSize\"\n [style.display]=\"hideGutters ? 'none' : 'flex'\"\n (mousedown)=\"onMouseDown($event, $index, $index + 1)\"\n />\n }\n}\n\n@if (useGhost) {\n <kbq-gutter-ghost />\n}\n", styles: [".kbq-splitter{display:flex;position:relative;flex-wrap:nowrap;align-items:stretch;overflow:hidden}.kbq-splitter .kbq-splitter-area{overflow:hidden}.kbq-splitter .kbq-splitter-area_resizing{pointer-events:none}.kbq-gutter{display:flex;flex-grow:0;flex-shrink:0;justify-content:center;align-items:center;overflow:hidden}.kbq-gutter.kbq-gutter_vertical>.kbq-icon{transform:rotate(90deg)}.kbq-gutter-ghost{position:absolute;z-index:999;display:none;overflow:hidden}.kbq-gutter-ghost.kbq-gutter-ghost_vertical>.kbq-icon{transform:rotate(90deg)}.kbq-gutter-ghost.kbq-gutter-ghost_visible{display:block}.kbq-gutter{cursor:col-resize}.kbq-gutter:hover,.kbq-gutter.kbq-gutter_dragged{background-color:var(--kbq-states-background-transparent-hover)}.kbq-gutter.kbq-gutter_vertical{cursor:row-resize}.kbq-gutter[disabled]{background-color:var(--kbq-states-background-disabled);cursor:default}.kbq-gutter-ghost{background:var(--kbq-states-background-transparent-active)}\n"] }]
409
- }], propDecorators: { gutterPositionChange: [{ type: i0.Output, args: ["gutterPositionChange"] }], gutters: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KbqGutterDirective), { isSignal: true }] }], ghost: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqGutterGhostDirective), { isSignal: true }] }], areaRefs: [{
410
- type: ContentChildren,
411
- args: [forwardRef(() => KbqSplitterAreaDirective)]
412
- }], hideGutters: [{
413
- type: Input
414
- }], direction: [{
415
- type: Input
416
- }], disabled: [{
417
- type: Input
418
- }], useGhost: [{
419
- type: Input
420
- }], gutterSize: [{
421
- type: Input
422
- }] } });
423
- class KbqSplitterAreaDirective {
424
- constructor() {
425
- this.elementRef = inject(ElementRef);
426
- this.renderer = inject(Renderer2);
427
- this.splitter = inject(KbqSplitterComponent);
428
- this.sizeChange = output();
429
- this.window = inject(KBQ_WINDOW);
430
- this.platform = inject(Platform);
431
- this.emitSizeChange = () => {
432
- this.sizeChange.emit(this.getSize());
433
- };
434
- }
435
- isResizing() {
436
- return this.splitter.isDragging;
437
- }
438
- disableFlex() {
439
- this.renderer.removeStyle(this.elementRef.nativeElement, 'flex');
440
- }
441
- ngAfterViewInit() {
442
- this.splitter.addArea(this);
443
- this.removeStyle("max-width" /* StyleProperty.MaxWidth */);
444
- if (this.splitter.direction === Direction.Vertical) {
445
- this.setStyle("width" /* StyleProperty.Width */, '100%');
446
- this.removeStyle("height" /* StyleProperty.Height */);
447
- }
448
- else {
449
- this.setStyle("height" /* StyleProperty.Height */, '100%');
450
- this.removeStyle("width" /* StyleProperty.Width */);
648
+ /** @docs-private */
649
+ handleSeparatorKeydown(index, event) {
650
+ // A modified press belongs to the browser: Cmd+Left is Back, Ctrl+Home scrolls to the top. `Shift` is
651
+ // the exception — `Shift+F6` walks the panels backwards.
652
+ if (hasModifierKey(event, 'altKey', 'ctrlKey', 'metaKey'))
653
+ return;
654
+ if (event.key === 'F6') {
655
+ event.preventDefault();
656
+ // From a separator, "next" is the panel it opens onto and "previous" the one it closes.
657
+ return this.focusPanel(event.shiftKey ? index : index + 1);
451
658
  }
452
- this.splitter.gutterPositionChange.subscribe(this.emitSizeChange);
453
- }
454
- ngOnDestroy() {
455
- this.splitter.removeArea(this);
456
- }
457
- setOrder(order) {
458
- this.setStyle("order" /* StyleProperty.Order */, order);
459
- }
460
- setSize(size) {
461
- if (isNaN(size)) {
659
+ if (this.disabled())
462
660
  return;
661
+ const horizontal = this.orientation() === 'horizontal';
662
+ // In RTL a horizontal splitter grows its leading panel as the boundary travels west, so the arrow that
663
+ // moves the boundary right is the one that shrinks it.
664
+ const sign = horizontal && this.rtl() ? -1 : 1;
665
+ const panel = this.panels()[index];
666
+ switch (event.key) {
667
+ case 'ArrowLeft':
668
+ if (!horizontal)
669
+ return;
670
+ return this.commitKeydown(event, () => this.resizeBy(index, -KEYBOARD_STEP * sign));
671
+ case 'ArrowRight':
672
+ if (!horizontal)
673
+ return;
674
+ return this.commitKeydown(event, () => this.resizeBy(index, KEYBOARD_STEP * sign));
675
+ case 'ArrowUp':
676
+ if (horizontal)
677
+ return;
678
+ return this.commitKeydown(event, () => this.resizeBy(index, -KEYBOARD_STEP));
679
+ case 'ArrowDown':
680
+ if (horizontal)
681
+ return;
682
+ return this.commitKeydown(event, () => this.resizeBy(index, KEYBOARD_STEP));
683
+ case 'Home':
684
+ return this.commitKeydown(event, () => {
685
+ const min = this.expandedMinSizes()[index];
686
+ // A panel already at its minimum has nowhere left to go but away, when it may collapse.
687
+ if (panel.collapsible() && this.sizes()[index] <= min + EPSILON)
688
+ return panel.collapsed.set(true);
689
+ this.resizeBy(index, min - this.sizes()[index]);
690
+ });
691
+ case 'End':
692
+ return this.commitKeydown(event, () => {
693
+ // Expand first, so the size the panel is grown from is a real one and not its collapsed
694
+ // strip — but only where collapsing was the splitter's to do in the first place.
695
+ if (panel.collapsible())
696
+ panel.collapsed.set(false);
697
+ // `resizeBy` is bounded by what the trailing panels can give up, so the splitter's own size
698
+ // is a safe stand-in for an unbounded maximum.
699
+ const max = Math.min(this.expandedMaxSizes()[index], this.containerSize());
700
+ this.resizeBy(index, max - this.sizes()[index]);
701
+ });
702
+ case 'Enter':
703
+ if (!panel.collapsible())
704
+ return;
705
+ return this.commitKeydown(event, () => panel.collapsed.update((collapsed) => !collapsed));
706
+ default:
707
+ return;
463
708
  }
464
- this.setStyle(this.getSizeProperty(), coerceCssPixelValue(coerceNumberProperty(size)));
465
- }
466
- getSize() {
467
- if (!this.platform.isBrowser)
468
- return 0;
469
- return this.elementRef.nativeElement[this.getOffsetSizeProperty()];
470
709
  }
471
- getPosition() {
710
+ /** @docs-private */
711
+ handleSeparatorDblClick(index) {
712
+ if (this.disabled())
713
+ return;
714
+ // First return the whole group to the sizes its panels declare; from there, take the leading panel down
715
+ // to its minimum, which is the optional second step of the double-click behaviour.
716
+ if (this.layout() !== null)
717
+ return this.layout.set(null);
718
+ this.resizeBy(index, this.minSizes()[index] - this.sizes()[index]);
719
+ }
720
+ /**
721
+ * Whether the panels are still the ones the drag was measured against.
722
+ *
723
+ * A host that adds or removes a panel mid-drag invalidates every index the snapshot holds: the captured
724
+ * sizes stop lining up with `minSizes`/`maxSizes`, which turns the arithmetic into `NaN`, and a boundary
725
+ * index no longer names the panel the user took hold of.
726
+ */
727
+ matchesSnapshot(snapshot) {
728
+ return snapshot.sizes.length === this.panels().length;
729
+ }
730
+ commitKeydown(event, action) {
731
+ event.preventDefault();
732
+ action();
733
+ }
734
+ /** Moves focus onto a panel, which is how `F6` walks the regions of the splitter. */
735
+ focusPanel(index) {
736
+ this.panels().at(index)?.element.focus();
737
+ }
738
+ /**
739
+ * Room on each side of the boundary after `index`, in pixels.
740
+ *
741
+ * Measured against the expanded limits rather than the collapse pin, because a collapsed panel can still be
742
+ * dragged back out — reporting it as immovable would leave the cursor saying otherwise.
743
+ */
744
+ sideRoom(index) {
745
+ const sizes = this.sizes();
746
+ const min = this.expandedMinSizes();
747
+ const max = this.expandedMaxSizes();
748
+ const room = (available) => Math.max(0, available);
749
+ const sumOver = (panels, take) => sumOf(panels.map(take));
750
+ const leading = Array.from({ length: index + 1 }, (_, offset) => offset);
751
+ const trailing = Array.from({ length: sizes.length - index - 1 }, (_, offset) => index + 1 + offset);
472
752
  return {
473
- x: this.elementRef.nativeElement.offsetLeft,
474
- y: this.elementRef.nativeElement.offsetTop
753
+ leadingGrow: sumOver(leading, (panel) => room(max[panel] - sizes[panel])),
754
+ leadingShrink: sumOver(leading, (panel) => room(sizes[panel] - min[panel])),
755
+ trailingGive: sumOver(trailing, (panel) => room(sizes[panel] - min[panel])),
756
+ trailingTake: sumOver(trailing, (panel) => room(max[panel] - sizes[panel]))
475
757
  };
476
758
  }
477
- getMinSize() {
478
- const styles = this.window.getComputedStyle(this.elementRef.nativeElement);
479
- return parseFloat(styles[this.getMinSizeProperty()]);
480
- }
481
- isVertical() {
482
- return this.splitter.direction === Direction.Vertical;
483
- }
484
- getMinSizeProperty() {
485
- return this.isVertical() ? "min-height" /* StyleProperty.MinHeight */ : "minWidth" /* StyleProperty.MinWidth */;
486
- }
487
- getOffsetSizeProperty() {
488
- return this.isVertical() ? "offsetHeight" /* StyleProperty.OffsetHeight */ : "offsetWidth" /* StyleProperty.OffsetWidth */;
489
- }
490
- getSizeProperty() {
491
- return this.isVertical() ? "height" /* StyleProperty.Height */ : "width" /* StyleProperty.Width */;
492
- }
493
- setStyle(style, value) {
494
- this.renderer.setStyle(this.elementRef.nativeElement, style, value);
759
+ /**
760
+ * How far the boundary after `index` can still travel each way — what the cursor advertises.
761
+ *
762
+ * Both sides are summed across every panel, because the drag walks outwards from the boundary: a neighbour
763
+ * pinned at its limit passes the delta on, so the boundary is still movable when it alone is stuck.
764
+ */
765
+ boundaryRoom(index) {
766
+ if (index < 0 || index >= this.sizes().length - 1)
767
+ return { grow: 0, shrink: 0 };
768
+ const { leadingGrow, leadingShrink, trailingGive, trailingTake } = this.sideRoom(index);
769
+ return {
770
+ grow: Math.min(leadingGrow, trailingGive),
771
+ shrink: Math.min(leadingShrink, trailingTake)
772
+ };
495
773
  }
496
- removeStyle(style) {
497
- this.renderer.removeStyle(this.elementRef.nativeElement, style);
774
+ /**
775
+ * How far the panel at `index` itself can still be resized — what `aria-valuemin` / `aria-valuemax` report.
776
+ *
777
+ * Narrower than {@link boundaryRoom} on purpose: the boundary may keep moving by handing the delta to panels
778
+ * further out, and those moves leave the pane this separator controls exactly where it was.
779
+ */
780
+ panelRoom(index) {
781
+ const sizes = this.sizes();
782
+ if (index < 0 || index >= sizes.length - 1)
783
+ return { grow: 0, shrink: 0 };
784
+ const { trailingGive, trailingTake } = this.sideRoom(index);
785
+ const room = (available) => Math.max(0, available);
786
+ return {
787
+ grow: room(Math.min(this.expandedMaxSizes()[index] - sizes[index], trailingGive)),
788
+ shrink: room(Math.min(sizes[index] - this.expandedMinSizes()[index], trailingTake))
789
+ };
498
790
  }
499
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSplitterAreaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
500
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqSplitterAreaDirective, isStandalone: true, selector: "[kbq-splitter-area]", outputs: { sizeChange: "sizeChange" }, host: { properties: { "class.kbq-splitter-area_resizing": "isResizing()" }, classAttribute: "kbq-splitter-area" }, ngImport: i0 }); }
791
+ resizeBy(index, delta) {
792
+ this.applySizes(resizeSplitterSizesAt(this.sizes(), index, delta, this.minSizes(), this.maxSizes()));
793
+ }
794
+ /**
795
+ * Settles a seeded layout onto the snap points its panels declare, boundary by boundary, exactly as
796
+ * releasing a drag on each of them would.
797
+ *
798
+ * Only the seeded sizes go through this. A layout handed to the splitter is authoritative — settling that
799
+ * one would both overwrite a restored layout and pull the boundary onto a point mid-drag, since every move
800
+ * writes `layout`.
801
+ */
802
+ settleOnSnapPoints(sizes, total) {
803
+ const min = this.minSizes();
804
+ const max = this.maxSizes();
805
+ return sizes.reduce((settled, _, index) => {
806
+ if (index >= settled.length - 1)
807
+ return settled;
808
+ const delta = this.snapDelta(index, 0, { sizes: settled, total });
809
+ return Math.abs(delta) < EPSILON ? settled : resizeSplitterSizesAt(settled, index, delta, min, max);
810
+ }, sizes);
811
+ }
812
+ /** Pulls the drag onto the nearest snap point declared by either panel around the separator. */
813
+ snapDelta(index, delta, snapshot) {
814
+ const panels = this.panels();
815
+ const leading = panels[index];
816
+ const trailing = panels[index + 1];
817
+ if (!leading.snapSizes().length && !trailing?.snapSizes().length)
818
+ return delta;
819
+ // A size declared on the trailing panel is a position of the same boundary, so it is mapped into a size
820
+ // for the leading one before it can compete with the leading panel's own points.
821
+ const pairSize = snapshot.sizes[index] + (snapshot.sizes[index + 1] ?? 0);
822
+ const snapPointsOf = (panel, toLeadingSize) => [...panel.snapSizes(), panel.minSize(), panel.maxSize()]
823
+ .map((size) => resolveSplitterSize(size, snapshot.total))
824
+ .filter((size) => size !== null)
825
+ .map((size) => ({ size: toLeadingSize(size), tolerance: panel.snapTolerance() }));
826
+ const target = snapSplitterSize(snapshot.sizes[index] + delta, [
827
+ ...snapPointsOf(leading, (size) => size),
828
+ ...(trailing ? snapPointsOf(trailing, (size) => pairSize - size) : [])
829
+ ]);
830
+ return target - snapshot.sizes[index];
831
+ }
832
+ /**
833
+ * Which side of its gap each panel around the dragged boundary is held on.
834
+ *
835
+ * Decided from the size the pointer is asking for rather than the one on screen, because a panel held at
836
+ * its minimum or on its collapsed strip has stopped moving — only where the pointer went says what the user
837
+ * means. Half the minimum is the midpoint of the gap, so the same distance decides the panel whichever
838
+ * direction it came from.
839
+ */
840
+ pinsFor(index, delta, snapshot) {
841
+ const min = this.expandedMinSizes();
842
+ const aimed = {
843
+ [index]: snapshot.sizes[index] + delta,
844
+ [index + 1]: (snapshot.sizes[index + 1] ?? 0) - delta
845
+ };
846
+ return this.panels().map((_, panel) => panel in aimed && aimed[panel] < min[panel] / 2);
847
+ }
848
+ /** Clears the drag, so the panels go back to their settled limits. */
849
+ endDrag() {
850
+ this.dragBoundary.set(null);
851
+ }
852
+ /**
853
+ * Hands every collapsible panel around the boundary that ended the drag collapsed the share it had before the
854
+ * gesture. `collapsed` itself already changed during the drag; only the size it returns to is left to fix.
855
+ *
856
+ * Returns whether anything is collapsed.
857
+ */
858
+ settleCollapse(snapshot) {
859
+ const panels = this.panels();
860
+ const collapsing = [snapshot.index, snapshot.index + 1].filter((index) => panels[index]?.collapsible() && panels[index].collapsed());
861
+ const layout = this.layout();
862
+ if (!collapsing.length)
863
+ return false;
864
+ // A drag that travelled has written the layout already; without one there is no entry to hand a share to.
865
+ if (!layout)
866
+ return true;
867
+ // Hand a collapsing panel back the share it had before the gesture, so expanding it later returns it to
868
+ // that size rather than to the sliver the drag squeezed it down to on its way out. What that adds comes out
869
+ // of the open panels, which keeps them on screen exactly where the drag left them.
870
+ this.layout.set(keepSplitterRestoreSizes(layout, panels.map((panel) => panel.collapsed()), layout.map((_, index) => collapsing.includes(index)
871
+ ? (snapshot.layout?.[index] ?? (snapshot.sizes[index] / snapshot.total) * 100)
872
+ : undefined)));
873
+ return true;
874
+ }
875
+ applySizes(sizes) {
876
+ const total = this.containerSize();
877
+ if (total <= 0)
878
+ return;
879
+ const free = this.freePanels();
880
+ const previous = this.layout();
881
+ const collapsed = this.panels().map((panel) => panel.collapsed());
882
+ this.layout.set(keepSplitterRestoreSizes(sizes.map((size) => (size / total) * 100), collapsed,
883
+ // A collapsed panel keeps the share it had before it collapsed, so expanding restores that size
884
+ // instead of the strip it is pinned to while collapsed. A panel the drag is free to move is the
885
+ // exception: it is the one being aimed at, so what it records is where it actually is.
886
+ collapsed.map((isCollapsed, index) => (isCollapsed && !free[index] ? previous?.[index] : undefined))));
887
+ }
888
+ measure() {
889
+ const style = this.window.getComputedStyle(this.nativeElement);
890
+ // `clientWidth`/`clientHeight` are the padding box, and the tracks only ever fill the content box.
891
+ const size = this.orientation() === 'horizontal'
892
+ ? this.nativeElement.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight)
893
+ : this.nativeElement.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);
894
+ this.containerSize.set(Math.max(0, size || 0));
895
+ }
896
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
897
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type: KbqSplitter, isStandalone: true, selector: "kbq-splitter", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { layout: "layoutChange" }, host: { properties: { "class.kbq-splitter_vertical": "orientation() === 'vertical'", "class.kbq-splitter_disabled": "disabled()", "class.kbq-splitter_dragging": "dragging()", "class.kbq-splitter_transparent": "appearance() === 'transparent'", "class.kbq-splitter_handle": "appearance() === 'handle'", "style.grid-template-columns": "orientation() === 'horizontal' ? gridTemplate() : null", "style.grid-template-rows": "orientation() === 'vertical' ? gridTemplate() : null" }, classAttribute: "kbq-splitter" }, providers: [{ provide: KBQ_SPLITTER, useExisting: KbqSplitter }], queries: [{ propertyName: "panels", predicate: KbqSplitterPanel, isSignal: true }], exportAs: ["kbqSplitter"], ngImport: i0, template: '<ng-content />', isInline: true, styles: [".kbq-splitter{display:grid;position:relative;min-width:0;min-height:0;overflow:clip;grid-template-rows:minmax(0,1fr)}.kbq-splitter.kbq-splitter_vertical{grid-template-rows:none;grid-template-columns:minmax(0,1fr)}.kbq-splitter.kbq-splitter_dragging .kbq-splitter-panel__content{pointer-events:none;-webkit-user-select:none;user-select:none}.kbq-splitter-panel{position:relative;min-width:0;min-height:0;outline:none}.kbq-splitter-panel:focus-visible{outline:var(--kbq-splitter-size-focus-outline-width) solid var(--kbq-splitter-focus-outline-color);outline-offset:calc(-1 * var(--kbq-splitter-size-focus-outline-width))}.kbq-splitter-panel__content{display:flex;flex-direction:column;block-size:100%;inline-size:100%;overflow:hidden}.kbq-splitter-panel__separator{position:absolute;z-index:1;inset-block:0;inset-inline-end:calc(var(--kbq-splitter-size-hit-area) / -2);inline-size:var(--kbq-splitter-size-hit-area);touch-action:none;outline:none}.kbq-splitter-panel__separator:after{position:absolute;inset-block:0;inset-inline:0;inline-size:var(--kbq-splitter-size-line-width);margin-inline:auto;background-color:var(--kbq-splitter-line-color);content:\"\"}.kbq-splitter-panel__separator:is(:hover,.kbq-hover):after{background-color:var(--kbq-splitter-state-hover-line-color)}.kbq-splitter-panel__separator:is(:active,.kbq-active):after{inline-size:var(--kbq-splitter-size-active-line-width);background-color:var(--kbq-splitter-state-active-line-color)}.kbq-splitter-panel__separator.cdk-keyboard-focused{outline:var(--kbq-splitter-size-focus-outline-width) solid var(--kbq-splitter-focus-outline-color);outline-offset:calc(-1 * var(--kbq-splitter-size-focus-outline-width))}.kbq-splitter_disabled>.kbq-splitter-panel>.kbq-splitter-panel__separator{pointer-events:none}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator{inset-block:auto;inset-inline:0;inset-block-end:calc(var(--kbq-splitter-size-hit-area) / -2);inline-size:auto;block-size:var(--kbq-splitter-size-hit-area)}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-block:0;inset-inline:0;inline-size:auto;block-size:var(--kbq-splitter-size-line-width);margin-inline:0;margin-block:auto}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:active,.kbq-active):after{inline-size:auto;block-size:var(--kbq-splitter-size-active-line-width)}.kbq-splitter_transparent>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{opacity:0}.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-block:0;inline-size:var(--kbq-splitter-size-handle-thickness);block-size:var(--kbq-splitter-size-handle-length);margin-block:auto;border-radius:var(--kbq-splitter-size-handle-border-radius);background-color:var(--kbq-splitter-handle-color)}.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:hover,.kbq-hover):after,.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:active,.kbq-active):after,.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator.cdk-keyboard-focused:after{background-color:var(--kbq-splitter-state-active-handle-color)}.kbq-splitter_handle.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-inline:0;inline-size:var(--kbq-splitter-size-handle-length);block-size:var(--kbq-splitter-size-handle-thickness);margin-inline:auto;margin-block:auto}\n", ".kbq-splitter{--kbq-splitter-size-line-width: 1px;--kbq-splitter-size-active-line-width: 3px;--kbq-splitter-size-focus-outline-width: 2px;--kbq-splitter-size-hit-area: calc(2 * var(--kbq-size-s) + var(--kbq-splitter-size-line-width));--kbq-splitter-size-handle-length: var(--kbq-size-3xl);--kbq-splitter-size-handle-thickness: var(--kbq-size-xxs);--kbq-splitter-size-handle-border-radius: var(--kbq-size-3xs);--kbq-splitter-line-color: var(--kbq-line-contrast-less);--kbq-splitter-state-hover-line-color: var(--kbq-line-contrast-fade);--kbq-splitter-state-active-line-color: var(--kbq-states-line-focus-theme);--kbq-splitter-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-splitter-handle-color: var(--kbq-line-contrast-fade);--kbq-splitter-state-active-handle-color: var(--kbq-states-line-focus-theme)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
501
898
  }
502
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSplitterAreaDirective, decorators: [{
503
- type: Directive,
504
- args: [{
505
- selector: '[kbq-splitter-area]',
506
- host: {
507
- class: 'kbq-splitter-area',
508
- '[class.kbq-splitter-area_resizing]': 'isResizing()'
509
- }
510
- }]
511
- }], propDecorators: { sizeChange: [{ type: i0.Output, args: ["sizeChange"] }] } });
899
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitter, decorators: [{
900
+ type: Component,
901
+ args: [{ selector: 'kbq-splitter', template: '<ng-content />', providers: [{ provide: KBQ_SPLITTER, useExisting: KbqSplitter }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
902
+ class: 'kbq-splitter',
903
+ '[class.kbq-splitter_vertical]': "orientation() === 'vertical'",
904
+ '[class.kbq-splitter_disabled]': 'disabled()',
905
+ '[class.kbq-splitter_dragging]': 'dragging()',
906
+ '[class.kbq-splitter_transparent]': "appearance() === 'transparent'",
907
+ '[class.kbq-splitter_handle]': "appearance() === 'handle'",
908
+ '[style.grid-template-columns]': "orientation() === 'horizontal' ? gridTemplate() : null",
909
+ '[style.grid-template-rows]': "orientation() === 'vertical' ? gridTemplate() : null"
910
+ }, exportAs: 'kbqSplitter', styles: [".kbq-splitter{display:grid;position:relative;min-width:0;min-height:0;overflow:clip;grid-template-rows:minmax(0,1fr)}.kbq-splitter.kbq-splitter_vertical{grid-template-rows:none;grid-template-columns:minmax(0,1fr)}.kbq-splitter.kbq-splitter_dragging .kbq-splitter-panel__content{pointer-events:none;-webkit-user-select:none;user-select:none}.kbq-splitter-panel{position:relative;min-width:0;min-height:0;outline:none}.kbq-splitter-panel:focus-visible{outline:var(--kbq-splitter-size-focus-outline-width) solid var(--kbq-splitter-focus-outline-color);outline-offset:calc(-1 * var(--kbq-splitter-size-focus-outline-width))}.kbq-splitter-panel__content{display:flex;flex-direction:column;block-size:100%;inline-size:100%;overflow:hidden}.kbq-splitter-panel__separator{position:absolute;z-index:1;inset-block:0;inset-inline-end:calc(var(--kbq-splitter-size-hit-area) / -2);inline-size:var(--kbq-splitter-size-hit-area);touch-action:none;outline:none}.kbq-splitter-panel__separator:after{position:absolute;inset-block:0;inset-inline:0;inline-size:var(--kbq-splitter-size-line-width);margin-inline:auto;background-color:var(--kbq-splitter-line-color);content:\"\"}.kbq-splitter-panel__separator:is(:hover,.kbq-hover):after{background-color:var(--kbq-splitter-state-hover-line-color)}.kbq-splitter-panel__separator:is(:active,.kbq-active):after{inline-size:var(--kbq-splitter-size-active-line-width);background-color:var(--kbq-splitter-state-active-line-color)}.kbq-splitter-panel__separator.cdk-keyboard-focused{outline:var(--kbq-splitter-size-focus-outline-width) solid var(--kbq-splitter-focus-outline-color);outline-offset:calc(-1 * var(--kbq-splitter-size-focus-outline-width))}.kbq-splitter_disabled>.kbq-splitter-panel>.kbq-splitter-panel__separator{pointer-events:none}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator{inset-block:auto;inset-inline:0;inset-block-end:calc(var(--kbq-splitter-size-hit-area) / -2);inline-size:auto;block-size:var(--kbq-splitter-size-hit-area)}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-block:0;inset-inline:0;inline-size:auto;block-size:var(--kbq-splitter-size-line-width);margin-inline:0;margin-block:auto}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:active,.kbq-active):after{inline-size:auto;block-size:var(--kbq-splitter-size-active-line-width)}.kbq-splitter_transparent>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{opacity:0}.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-block:0;inline-size:var(--kbq-splitter-size-handle-thickness);block-size:var(--kbq-splitter-size-handle-length);margin-block:auto;border-radius:var(--kbq-splitter-size-handle-border-radius);background-color:var(--kbq-splitter-handle-color)}.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:hover,.kbq-hover):after,.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:active,.kbq-active):after,.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator.cdk-keyboard-focused:after{background-color:var(--kbq-splitter-state-active-handle-color)}.kbq-splitter_handle.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-inline:0;inline-size:var(--kbq-splitter-size-handle-length);block-size:var(--kbq-splitter-size-handle-thickness);margin-inline:auto;margin-block:auto}\n", ".kbq-splitter{--kbq-splitter-size-line-width: 1px;--kbq-splitter-size-active-line-width: 3px;--kbq-splitter-size-focus-outline-width: 2px;--kbq-splitter-size-hit-area: calc(2 * var(--kbq-size-s) + var(--kbq-splitter-size-line-width));--kbq-splitter-size-handle-length: var(--kbq-size-3xl);--kbq-splitter-size-handle-thickness: var(--kbq-size-xxs);--kbq-splitter-size-handle-border-radius: var(--kbq-size-3xs);--kbq-splitter-line-color: var(--kbq-line-contrast-less);--kbq-splitter-state-hover-line-color: var(--kbq-line-contrast-fade);--kbq-splitter-state-active-line-color: var(--kbq-states-line-focus-theme);--kbq-splitter-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-splitter-handle-color: var(--kbq-line-contrast-fade);--kbq-splitter-state-active-handle-color: var(--kbq-states-line-focus-theme)}\n"] }]
911
+ }], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }, { type: i0.Output, args: ["layoutChange"] }], panels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KbqSplitterPanel), { ...{ descendants: false }, isSignal: true }] }] } });
512
912
 
913
+ const COMPONENTS = [KbqSplitter, KbqSplitterPanel];
914
+ /**
915
+ * Convenience module for `NgModule` consumers. Everything it re-exports is standalone, so importing
916
+ * `KbqSplitter` and `KbqSplitterPanel` directly is the preferred way in — the library's own examples do that.
917
+ */
513
918
  class KbqSplitterModule {
514
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
515
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqSplitterModule, imports: [KbqIconModule,
516
- KbqGutterDirective,
517
- KbqGutterGhostDirective,
518
- KbqSplitterAreaDirective,
519
- KbqSplitterComponent], exports: [KbqGutterDirective,
520
- KbqSplitterAreaDirective,
521
- KbqSplitterComponent] }); }
522
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSplitterModule, imports: [KbqIconModule] }); }
919
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
920
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterModule, imports: [KbqSplitter, KbqSplitterPanel], exports: [KbqSplitter, KbqSplitterPanel] }); }
921
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterModule }); }
523
922
  }
524
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSplitterModule, decorators: [{
923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterModule, decorators: [{
525
924
  type: NgModule,
526
925
  args: [{
527
- imports: [
528
- KbqIconModule,
529
- KbqGutterDirective,
530
- KbqGutterGhostDirective,
531
- KbqSplitterAreaDirective,
532
- KbqSplitterComponent
533
- ],
534
- exports: [
535
- KbqGutterDirective,
536
- KbqSplitterAreaDirective,
537
- KbqSplitterComponent
538
- ]
926
+ imports: COMPONENTS,
927
+ exports: COMPONENTS
539
928
  }]
540
929
  }] });
541
930
 
@@ -543,5 +932,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
543
932
  * Generated bundle index. Do not edit.
544
933
  */
545
934
 
546
- export { Direction, KbqGutterDirective, KbqGutterGhostDirective, KbqSplitterAreaDirective, KbqSplitterComponent, KbqSplitterModule };
935
+ export { KBQ_SPLITTER, KBQ_SPLITTER_OPTIONS, KbqSplitter, KbqSplitterModule, KbqSplitterPanel, fitSplitterSizes, kbqSplitterOptionsProvider, resizeSplitterSizesAt, resolveSplitterSize, snapSplitterSize };
547
936
  //# sourceMappingURL=koobiq-components-splitter.mjs.map