@koobiq/components 20.4.2 → 21.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (798) hide show
  1. package/accordion/accordion-trigger.scss +3 -10
  2. package/accordion/accordion.scss +4 -6
  3. package/actions-panel/actions-panel-container.scss +45 -1
  4. package/alert/alert.component.scss +3 -2
  5. package/app-switcher/_app-switcher-theme.scss +0 -4
  6. package/app-switcher/app-switcher-dropdown-app.scss +3 -2
  7. package/app-switcher/app-switcher-dropdown-site.scss +2 -1
  8. package/app-switcher/{kbq-app-switcher-list-item.scss → app-switcher-list-item.scss} +18 -4
  9. package/app-switcher/app-switcher-tokens.scss +15 -0
  10. package/app-switcher/app-switcher.scss +14 -4
  11. package/autocomplete/autocomplete.scss +7 -6
  12. package/badge/badge.component.scss +5 -8
  13. package/breadcrumbs/breadcrumbs.scss +25 -10
  14. package/button/_button-base.scss +30 -7
  15. package/button/_button-theme.scss +16 -0
  16. package/button/button-group.scss +7 -0
  17. package/button/button-tokens.scss +0 -2
  18. package/button/button.scss +34 -2
  19. package/button-toggle/_button-toggle-theme.scss +7 -2
  20. package/button-toggle/button-toggle.scss +65 -15
  21. package/checkbox/_checkbox-theme.scss +4 -3
  22. package/checkbox/checkbox.scss +3 -6
  23. package/clamped-text/clamped-text.scss +6 -2
  24. package/code-block/code-block-tokens.scss +0 -224
  25. package/code-block/code-block.scss +20 -9
  26. package/content-panel/content-panel-aside.scss +3 -2
  27. package/content-panel/content-panel-container.scss +37 -0
  28. package/content-panel/content-panel.scss +4 -3
  29. package/core/highlight/_highlight-theme.scss +3 -1
  30. package/core/option/action-container.scss +2 -2
  31. package/core/option/action.scss +2 -1
  32. package/core/option/option.scss +2 -1
  33. package/core/pop-up/_pop-up.scss +0 -37
  34. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +5 -10
  35. package/core/styles/_core.scss +3 -0
  36. package/core/styles/_koobiq-theme.scss +5 -6
  37. package/core/styles/common/_animation.scss +44 -16
  38. package/core/styles/common/_groups-mixins.scss +21 -19
  39. package/core/styles/common/_groups.scss +4 -32
  40. package/core/styles/common/_index.scss +0 -2
  41. package/core/styles/common/_link.scss +117 -0
  42. package/core/styles/common/_list.scss +0 -26
  43. package/core/styles/common/_overlay.scss +8 -10
  44. package/core/styles/common/_rtl.scss +0 -14
  45. package/core/styles/common/_select.scss +33 -15
  46. package/core/styles/common/_squircle.scss +63 -0
  47. package/core/styles/common/_tokens.scss +0 -11
  48. package/core/styles/common/_vendor-prefixes.scss +0 -20
  49. package/core/styles/functions/_timing.scss +0 -22
  50. package/core/styles/theming/_scrollbar-theme.scss +6 -1
  51. package/core/styles/theming/_theming.scss +13 -65
  52. package/core/styles/typography/_index.scss +0 -1
  53. package/core/styles/typography/_typography.scss +0 -143
  54. package/core/styles/visual/_body.scss +1 -6
  55. package/core/styles/visual/_layout.scss +0 -12
  56. package/datepicker/calendar-body.scss +3 -1
  57. package/datepicker/calendar-header.scss +0 -1
  58. package/datepicker/datepicker-content.scss +33 -1
  59. package/datepicker/datepicker-toggle.scss +0 -38
  60. package/dl/dl-tokens.scss +10 -0
  61. package/dl/dl.scss +113 -13
  62. package/dropdown/_dropdown-theme.scss +4 -16
  63. package/dropdown/dropdown-item.scss +4 -10
  64. package/dropdown/dropdown.scss +2 -1
  65. package/empty-state/_empty-state-theme.scss +10 -4
  66. package/empty-state/empty-state-tokens.scss +4 -4
  67. package/empty-state/empty-state.scss +4 -0
  68. package/fesm2022/koobiq-components-accordion.mjs +347 -229
  69. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  70. package/fesm2022/koobiq-components-actions-panel.mjs +302 -187
  71. package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
  72. package/fesm2022/koobiq-components-alert.mjs +39 -39
  73. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-app-switcher.mjs +677 -367
  75. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-autocomplete.mjs +620 -253
  77. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  78. package/fesm2022/koobiq-components-badge.mjs +46 -48
  79. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  80. package/fesm2022/koobiq-components-breadcrumbs.mjs +221 -169
  81. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  82. package/fesm2022/koobiq-components-button-toggle.mjs +565 -196
  83. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  84. package/fesm2022/koobiq-components-button.mjs +332 -116
  85. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-checkbox.mjs +172 -132
  87. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-clamped-text.mjs +165 -158
  89. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  90. package/fesm2022/koobiq-components-code-block.mjs +791 -609
  91. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  92. package/fesm2022/koobiq-components-content-panel.mjs +260 -143
  93. package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
  94. package/fesm2022/koobiq-components-core.mjs +4342 -1595
  95. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  96. package/fesm2022/koobiq-components-datepicker.mjs +1713 -1606
  97. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  98. package/fesm2022/koobiq-components-divider.mjs +73 -36
  99. package/fesm2022/koobiq-components-divider.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-dl.mjs +447 -89
  101. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  102. package/fesm2022/koobiq-components-dropdown.mjs +703 -599
  103. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  104. package/fesm2022/koobiq-components-dynamic-translation.mjs +20 -20
  105. package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
  106. package/fesm2022/koobiq-components-ellipsis-center.mjs +46 -31
  107. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  108. package/fesm2022/koobiq-components-empty-state.mjs +116 -60
  109. package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
  110. package/fesm2022/koobiq-components-file-upload.mjs +550 -290
  111. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  112. package/fesm2022/koobiq-components-filter-bar.mjs +2871 -2595
  113. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  114. package/fesm2022/koobiq-components-flag.mjs +79 -24
  115. package/fesm2022/koobiq-components-flag.mjs.map +1 -1
  116. package/fesm2022/koobiq-components-form-field.mjs +389 -525
  117. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  118. package/fesm2022/koobiq-components-icon.mjs +400 -149
  119. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  120. package/fesm2022/koobiq-components-inline-edit.mjs +429 -212
  121. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  122. package/fesm2022/koobiq-components-input.mjs +601 -459
  123. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  124. package/fesm2022/koobiq-components-link-deprecated.mjs +196 -0
  125. package/fesm2022/koobiq-components-link-deprecated.mjs.map +1 -0
  126. package/fesm2022/koobiq-components-link.mjs +328 -125
  127. package/fesm2022/koobiq-components-link.mjs.map +1 -1
  128. package/fesm2022/koobiq-components-list.mjs +583 -433
  129. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  130. package/fesm2022/koobiq-components-loader-overlay.mjs +167 -68
  131. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  132. package/fesm2022/koobiq-components-markdown.mjs +55 -78
  133. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  134. package/fesm2022/koobiq-components-modal.mjs +853 -475
  135. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  136. package/fesm2022/koobiq-components-navbar.mjs +895 -556
  137. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  138. package/fesm2022/koobiq-components-notification-center.mjs +680 -310
  139. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  140. package/fesm2022/koobiq-components-overflow-items.mjs +46 -64
  141. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  142. package/fesm2022/koobiq-components-popover.mjs +684 -285
  143. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  144. package/fesm2022/koobiq-components-progress-bar.mjs +87 -33
  145. package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
  146. package/fesm2022/koobiq-components-progress-spinner.mjs +52 -43
  147. package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
  148. package/fesm2022/koobiq-components-radio.mjs +450 -231
  149. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  150. package/fesm2022/koobiq-components-resizer.mjs +127 -21
  151. package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
  152. package/fesm2022/koobiq-components-scrollbar-deprecated.mjs +299 -0
  153. package/fesm2022/koobiq-components-scrollbar-deprecated.mjs.map +1 -0
  154. package/fesm2022/koobiq-components-scrollbar.mjs +745 -222
  155. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  156. package/fesm2022/koobiq-components-search-expandable.mjs +288 -126
  157. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  158. package/fesm2022/koobiq-components-select.mjs +883 -693
  159. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  160. package/fesm2022/koobiq-components-sidebar.mjs +207 -88
  161. package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
  162. package/fesm2022/koobiq-components-sidepanel.mjs +689 -296
  163. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  164. package/fesm2022/koobiq-components-skeleton.mjs +815 -41
  165. package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
  166. package/fesm2022/koobiq-components-split-button.mjs +109 -88
  167. package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
  168. package/fesm2022/koobiq-components-splitter-deprecated.mjs +591 -0
  169. package/fesm2022/koobiq-components-splitter-deprecated.mjs.map +1 -0
  170. package/fesm2022/koobiq-components-splitter.mjs +890 -501
  171. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  172. package/fesm2022/koobiq-components-table.mjs +63 -49
  173. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  174. package/fesm2022/koobiq-components-tabs.mjs +1062 -603
  175. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  176. package/fesm2022/koobiq-components-tags.mjs +886 -733
  177. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  178. package/fesm2022/koobiq-components-textarea.mjs +213 -185
  179. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  180. package/fesm2022/koobiq-components-time-range.mjs +299 -147
  181. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  182. package/fesm2022/koobiq-components-timepicker.mjs +233 -245
  183. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  184. package/fesm2022/koobiq-components-timezone.mjs +344 -142
  185. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  186. package/fesm2022/koobiq-components-title.mjs +229 -145
  187. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  188. package/fesm2022/koobiq-components-toast.mjs +463 -143
  189. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  190. package/fesm2022/koobiq-components-toggle.mjs +177 -130
  191. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  192. package/fesm2022/koobiq-components-tooltip.mjs +657 -214
  193. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  194. package/fesm2022/koobiq-components-top-bar.mjs +61 -32
  195. package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
  196. package/fesm2022/koobiq-components-tree-select.mjs +734 -488
  197. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  198. package/fesm2022/koobiq-components-tree.mjs +1700 -617
  199. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  200. package/fesm2022/koobiq-components-username.mjs +290 -135
  201. package/fesm2022/koobiq-components-username.mjs.map +1 -1
  202. package/file-upload/dropzone.scss +31 -3
  203. package/file-upload/file-upload-tokens.scss +2 -22
  204. package/file-upload/file-upload.scss +6 -0
  205. package/file-upload/multiple-file-upload.component.scss +14 -12
  206. package/file-upload/single-file-upload.component.scss +3 -2
  207. package/filter-bar/filters.scss +7 -0
  208. package/filter-bar/pipes/base-pipe.scss +3 -3
  209. package/filter-bar/pipes/pipe-date.scss +8 -1
  210. package/flag/flag-tokens.scss +22 -0
  211. package/flag/flag.scss +34 -21
  212. package/form-field/{_fiedset-theme.scss → _fieldset-theme.scss} +1 -5
  213. package/form-field/_form-field-theme.scss +4 -9
  214. package/form-field/cleaner.scss +3 -1
  215. package/form-field/fieldset.scss +3 -4
  216. package/form-field/form-field.scss +26 -21
  217. package/form-field/password-toggle.scss +3 -1
  218. package/icon/_icon-button-theme.scss +7 -0
  219. package/icon/_icon-theme.scss +10 -7
  220. package/icon/icon-button.scss +0 -2
  221. package/icon/icon-tokens.scss +12 -9
  222. package/inline-edit/inline-edit.scss +40 -54
  223. package/input/input.scss +4 -0
  224. package/link/{_link-theme.scss → deprecated/_link-theme.scss} +11 -6
  225. package/link/deprecated/link-tokens.scss +27 -0
  226. package/link/link-tokens.scss +6 -25
  227. package/link/link.scss +137 -0
  228. package/list/list.scss +3 -2
  229. package/loader-overlay/_loader-overlay-theme.scss +19 -10
  230. package/loader-overlay/loader-overlay-tokens.scss +0 -2
  231. package/loader-overlay/loader-overlay.scss +7 -1
  232. package/markdown/_markdown-theme.scss +16 -0
  233. package/markdown/markdown-tokens.scss +5 -0
  234. package/markdown/markdown.scss +2 -1
  235. package/modal/_modal-animation.scss +23 -14
  236. package/modal/modal-tokens.scss +2 -1
  237. package/modal/modal.scss +35 -31
  238. package/navbar/_navbar-item_horizontal.scss +8 -6
  239. package/navbar/_navbar-item_vertical.scss +18 -6
  240. package/navbar/_navbar-theme.scss +9 -1
  241. package/navbar/navbar-brand.scss +8 -6
  242. package/navbar/navbar-divider.scss +1 -1
  243. package/navbar/navbar-item.scss +8 -9
  244. package/navbar/navbar-toggle.scss +3 -3
  245. package/navbar/navbar-tokens.scss +14 -0
  246. package/navbar/navbar.scss +1 -2
  247. package/navbar/vertical-navbar.scss +2 -2
  248. package/notification-center/_notification-center-theme.scss +11 -6
  249. package/notification-center/notification-center-tokens.scss +33 -0
  250. package/notification-center/notification-center.scss +58 -20
  251. package/notification-center/notification-item.scss +15 -6
  252. package/package.json +112 -81
  253. package/popover/popover-tokens.scss +0 -2
  254. package/popover/popover.scss +41 -19
  255. package/prebuilt-themes/theme.css +1 -1
  256. package/progress-bar/_progress-bar-theme.scss +20 -3
  257. package/progress-bar/progress-bar-tokens.scss +3 -0
  258. package/progress-bar/progress-bar.scss +36 -8
  259. package/progress-spinner/progress-spinner.scss +4 -3
  260. package/radio/_radio-theme.scss +21 -4
  261. package/radio/radio-tokens.scss +7 -3
  262. package/radio/radio.scss +55 -8
  263. package/schematics/collection.json +415 -18
  264. package/schematics/migrations/accordion-state-saving-default/README.md +60 -0
  265. package/schematics/migrations/accordion-state-saving-default/data.cjs +75 -0
  266. package/schematics/migrations/accordion-state-saving-default/index.cjs +61 -0
  267. package/schematics/migrations/accordion-state-saving-default/schema.json +15 -0
  268. package/schematics/migrations/actions-panel-overlay-container/README.md +35 -0
  269. package/schematics/migrations/actions-panel-overlay-container/data.cjs +47 -0
  270. package/schematics/migrations/actions-panel-overlay-container/index.cjs +55 -0
  271. package/schematics/migrations/actions-panel-overlay-container/schema.json +15 -0
  272. package/schematics/migrations/alert-signals/README.md +13 -7
  273. package/schematics/migrations/alert-signals/{data.js → data.cjs} +3 -0
  274. package/schematics/migrations/alert-signals/index.cjs +221 -0
  275. package/schematics/migrations/angular-animations-removal/README.md +46 -0
  276. package/schematics/migrations/angular-animations-removal/data.cjs +150 -0
  277. package/schematics/migrations/angular-animations-removal/index.cjs +21 -0
  278. package/schematics/migrations/angular-animations-removal/schema.json +15 -0
  279. package/schematics/migrations/app-switcher-signals/README.md +88 -0
  280. package/schematics/migrations/app-switcher-signals/data.cjs +136 -0
  281. package/schematics/migrations/app-switcher-signals/index.cjs +366 -0
  282. package/schematics/migrations/app-switcher-signals/schema.json +20 -0
  283. package/schematics/migrations/autocomplete-panel-width-auto/README.md +2 -2
  284. package/schematics/migrations/autocomplete-panel-width-auto/{index.js → index.cjs} +6 -5
  285. package/schematics/migrations/autocomplete-signals/README.md +92 -0
  286. package/schematics/migrations/autocomplete-signals/data.cjs +149 -0
  287. package/schematics/migrations/autocomplete-signals/index.cjs +707 -0
  288. package/schematics/migrations/autocomplete-signals/schema.json +20 -0
  289. package/schematics/migrations/badge-signals/README.md +77 -0
  290. package/schematics/migrations/badge-signals/data.cjs +109 -0
  291. package/schematics/migrations/badge-signals/index.cjs +694 -0
  292. package/schematics/migrations/badge-signals/schema.json +20 -0
  293. package/schematics/migrations/button-state-and-styles/README.md +129 -0
  294. package/schematics/migrations/button-state-and-styles/data.cjs +136 -0
  295. package/schematics/migrations/button-state-and-styles/index.cjs +221 -0
  296. package/schematics/migrations/button-state-and-styles/schema.json +20 -0
  297. package/schematics/migrations/button-supported-colors/README.md +73 -0
  298. package/schematics/migrations/button-supported-colors/data.cjs +106 -0
  299. package/schematics/migrations/button-supported-colors/index.cjs +261 -0
  300. package/schematics/migrations/button-supported-colors/schema.json +20 -0
  301. package/schematics/migrations/button-toggle-signals-and-aria/README.md +137 -0
  302. package/schematics/migrations/button-toggle-signals-and-aria/data.cjs +200 -0
  303. package/schematics/migrations/button-toggle-signals-and-aria/index.cjs +497 -0
  304. package/schematics/migrations/button-toggle-signals-and-aria/schema.json +20 -0
  305. package/schematics/migrations/button-truncation/README.md +110 -0
  306. package/schematics/migrations/button-truncation/data.cjs +88 -0
  307. package/schematics/migrations/button-truncation/index.cjs +270 -0
  308. package/schematics/migrations/button-truncation/schema.json +20 -0
  309. package/schematics/migrations/checkbox-signals/README.md +76 -0
  310. package/schematics/migrations/checkbox-signals/data.cjs +114 -0
  311. package/schematics/migrations/checkbox-signals/index.cjs +635 -0
  312. package/schematics/migrations/checkbox-signals/schema.json +20 -0
  313. package/schematics/migrations/clamped-text-disclosure/README.md +62 -0
  314. package/schematics/migrations/clamped-text-disclosure/data.cjs +101 -0
  315. package/schematics/migrations/clamped-text-disclosure/index.cjs +60 -0
  316. package/schematics/migrations/clamped-text-disclosure/schema.json +15 -0
  317. package/schematics/migrations/code-block-highlight-js-core/README.md +53 -0
  318. package/schematics/migrations/code-block-highlight-js-core/data.cjs +64 -0
  319. package/schematics/migrations/code-block-highlight-js-core/index.cjs +319 -0
  320. package/schematics/migrations/code-block-highlight-js-core/schema.json +20 -0
  321. package/schematics/migrations/code-block-signals/README.md +84 -0
  322. package/schematics/migrations/code-block-signals/data.cjs +121 -0
  323. package/schematics/migrations/code-block-signals/index.cjs +701 -0
  324. package/schematics/migrations/code-block-signals/schema.json +20 -0
  325. package/schematics/migrations/color-signals/README.md +46 -0
  326. package/schematics/migrations/color-signals/data.cjs +131 -0
  327. package/schematics/migrations/color-signals/index.cjs +20 -0
  328. package/schematics/migrations/color-signals/schema.json +20 -0
  329. package/schematics/migrations/core-mixins-removal/README.md +20 -0
  330. package/schematics/migrations/core-mixins-removal/data.cjs +27 -0
  331. package/schematics/migrations/core-mixins-removal/index.cjs +18 -0
  332. package/schematics/migrations/core-mixins-removal/schema.json +15 -0
  333. package/schematics/migrations/css-selectors/README.md +2 -2
  334. package/schematics/migrations/css-selectors/{index.js → index.cjs} +4 -3
  335. package/schematics/migrations/datepicker-signals/README.md +24 -0
  336. package/schematics/migrations/datepicker-signals/data.cjs +49 -0
  337. package/schematics/migrations/datepicker-signals/index.cjs +18 -0
  338. package/schematics/migrations/datepicker-signals/schema.json +15 -0
  339. package/schematics/migrations/deprecated-icons/README.md +2 -2
  340. package/schematics/migrations/deprecated-icons/{index.js → index.cjs} +8 -7
  341. package/schematics/migrations/design-tokens-v4/README.md +75 -0
  342. package/schematics/migrations/design-tokens-v4/index.cjs +60 -0
  343. package/schematics/migrations/design-tokens-v4/schema.json +15 -0
  344. package/schematics/migrations/divider-signals-and-aria/README.md +47 -0
  345. package/schematics/migrations/divider-signals-and-aria/data.cjs +62 -0
  346. package/schematics/migrations/divider-signals-and-aria/index.cjs +212 -0
  347. package/schematics/migrations/divider-signals-and-aria/schema.json +15 -0
  348. package/schematics/migrations/dl-attribute-coercion/README.md +59 -0
  349. package/schematics/migrations/dl-attribute-coercion/data.cjs +85 -0
  350. package/schematics/migrations/dl-attribute-coercion/index.cjs +162 -0
  351. package/schematics/migrations/dl-attribute-coercion/schema.json +15 -0
  352. package/schematics/migrations/dl-standalone-names/README.md +49 -0
  353. package/schematics/migrations/dl-standalone-names/data.cjs +44 -0
  354. package/schematics/migrations/dl-standalone-names/index.cjs +322 -0
  355. package/schematics/migrations/dl-standalone-names/schema.json +20 -0
  356. package/schematics/migrations/dropdown-demote-overlay/README.md +137 -0
  357. package/schematics/migrations/dropdown-demote-overlay/data.cjs +84 -0
  358. package/schematics/migrations/dropdown-demote-overlay/index.cjs +289 -0
  359. package/schematics/migrations/dropdown-demote-overlay/schema.json +20 -0
  360. package/schematics/migrations/dropdown-signals/README.md +83 -0
  361. package/schematics/migrations/dropdown-signals/data.cjs +152 -0
  362. package/schematics/migrations/dropdown-signals/index.cjs +20 -0
  363. package/schematics/migrations/dropdown-signals/schema.json +20 -0
  364. package/schematics/migrations/empty-state-error-color/README.md +84 -0
  365. package/schematics/migrations/empty-state-error-color/data.cjs +85 -0
  366. package/schematics/migrations/empty-state-error-color/index.cjs +72 -0
  367. package/schematics/migrations/empty-state-error-color/schema.json +15 -0
  368. package/schematics/migrations/empty-state-size-attr/README.md +2 -2
  369. package/schematics/migrations/empty-state-size-attr/{index.js → index.cjs} +6 -5
  370. package/schematics/migrations/file-upload-cva-and-primitives/README.md +70 -0
  371. package/schematics/migrations/file-upload-cva-and-primitives/data.cjs +97 -0
  372. package/schematics/migrations/file-upload-cva-and-primitives/index.cjs +61 -0
  373. package/schematics/migrations/file-upload-cva-and-primitives/schema.json +15 -0
  374. package/schematics/migrations/file-upload-deprecated-outputs/README.md +90 -0
  375. package/schematics/migrations/file-upload-deprecated-outputs/data.cjs +20 -0
  376. package/schematics/migrations/file-upload-deprecated-outputs/index.cjs +71 -0
  377. package/schematics/migrations/file-upload-deprecated-outputs/schema.json +20 -0
  378. package/schematics/migrations/filter-bar-rename-action/README.md +183 -0
  379. package/schematics/migrations/filter-bar-rename-action/data.cjs +151 -0
  380. package/schematics/migrations/filter-bar-rename-action/index.cjs +178 -0
  381. package/schematics/migrations/filter-bar-rename-action/schema.json +20 -0
  382. package/schematics/migrations/filter-bar-signals/README.md +27 -16
  383. package/schematics/migrations/filter-bar-signals/{data.js → data.cjs} +1 -2
  384. package/schematics/migrations/filter-bar-signals/index.cjs +225 -0
  385. package/schematics/migrations/filter-bar-state-saving-default/README.md +53 -0
  386. package/schematics/migrations/filter-bar-state-saving-default/data.cjs +87 -0
  387. package/schematics/migrations/filter-bar-state-saving-default/index.cjs +62 -0
  388. package/schematics/migrations/filter-bar-state-saving-default/schema.json +15 -0
  389. package/schematics/migrations/flag-inner-html/README.md +67 -0
  390. package/schematics/migrations/flag-inner-html/data.cjs +58 -0
  391. package/schematics/migrations/flag-inner-html/index.cjs +62 -0
  392. package/schematics/migrations/flag-inner-html/schema.json +15 -0
  393. package/schematics/migrations/form-field-signals/README.md +125 -0
  394. package/schematics/migrations/form-field-signals/data.cjs +288 -0
  395. package/schematics/migrations/form-field-signals/index.cjs +383 -0
  396. package/schematics/migrations/form-field-signals/schema.json +20 -0
  397. package/schematics/migrations/icon-semantics-and-api/README.md +65 -0
  398. package/schematics/migrations/icon-semantics-and-api/data.cjs +97 -0
  399. package/schematics/migrations/icon-semantics-and-api/index.cjs +65 -0
  400. package/schematics/migrations/icon-semantics-and-api/schema.json +15 -0
  401. package/schematics/migrations/icons-replacement/README.md +5 -5
  402. package/schematics/migrations/icons-replacement/{index.js → index.cjs} +4 -3
  403. package/schematics/migrations/inline-edit-a11y-and-types/README.md +82 -0
  404. package/schematics/migrations/inline-edit-a11y-and-types/data.cjs +117 -0
  405. package/schematics/migrations/inline-edit-a11y-and-types/index.cjs +98 -0
  406. package/schematics/migrations/inline-edit-a11y-and-types/schema.json +20 -0
  407. package/schematics/migrations/input-number-surface/README.md +140 -0
  408. package/schematics/migrations/input-number-surface/data.cjs +135 -0
  409. package/schematics/migrations/input-number-surface/index.cjs +293 -0
  410. package/schematics/migrations/input-number-surface/schema.json +20 -0
  411. package/schematics/migrations/input-signals/README.md +20 -0
  412. package/schematics/migrations/input-signals/data.cjs +30 -0
  413. package/schematics/migrations/input-signals/index.cjs +18 -0
  414. package/schematics/migrations/input-signals/schema.json +15 -0
  415. package/schematics/migrations/link-deprecated-path/README.md +144 -0
  416. package/schematics/migrations/link-deprecated-path/index.cjs +20 -0
  417. package/schematics/migrations/link-deprecated-path/schema.json +20 -0
  418. package/schematics/migrations/link-signals/README.md +71 -0
  419. package/schematics/migrations/link-signals/data.cjs +116 -0
  420. package/schematics/migrations/link-signals/index.cjs +416 -0
  421. package/schematics/migrations/link-signals/schema.json +20 -0
  422. package/schematics/migrations/list-signals/README.md +22 -0
  423. package/schematics/migrations/list-signals/data.cjs +35 -0
  424. package/schematics/migrations/list-signals/index.cjs +18 -0
  425. package/schematics/migrations/list-signals/schema.json +15 -0
  426. package/schematics/migrations/list-tree-multiple-input/README.md +105 -0
  427. package/schematics/migrations/list-tree-multiple-input/data.cjs +74 -0
  428. package/schematics/migrations/list-tree-multiple-input/index.cjs +222 -0
  429. package/schematics/migrations/list-tree-multiple-input/schema.json +20 -0
  430. package/schematics/migrations/loader-overlay-signals/README.md +62 -0
  431. package/schematics/migrations/loader-overlay-signals/data.cjs +101 -0
  432. package/schematics/migrations/loader-overlay-signals/index.cjs +698 -0
  433. package/schematics/migrations/loader-overlay-signals/schema.json +20 -0
  434. package/schematics/migrations/loader-overlay-size-attr/README.md +2 -2
  435. package/schematics/migrations/loader-overlay-size-attr/{index.js → index.cjs} +6 -5
  436. package/schematics/migrations/locale-configuration-providers/README.md +163 -0
  437. package/schematics/migrations/locale-configuration-providers/data.cjs +257 -0
  438. package/schematics/migrations/locale-configuration-providers/index.cjs +295 -0
  439. package/schematics/migrations/locale-configuration-providers/schema.json +20 -0
  440. package/schematics/migrations/mandatory-peer-dependencies/README.md +70 -0
  441. package/schematics/migrations/mandatory-peer-dependencies/index.cjs +43 -0
  442. package/schematics/migrations/mandatory-peer-dependencies/schema.json +15 -0
  443. package/schematics/migrations/markdown-signals/README.md +58 -0
  444. package/schematics/migrations/markdown-signals/data.cjs +79 -0
  445. package/schematics/migrations/markdown-signals/index.cjs +640 -0
  446. package/schematics/migrations/markdown-signals/schema.json +20 -0
  447. package/schematics/migrations/modal-dialog-semantics/README.md +106 -0
  448. package/schematics/migrations/modal-dialog-semantics/data.cjs +110 -0
  449. package/schematics/migrations/modal-dialog-semantics/index.cjs +59 -0
  450. package/schematics/migrations/modal-dialog-semantics/schema.json +15 -0
  451. package/schematics/migrations/modal-signals/README.md +88 -0
  452. package/schematics/migrations/modal-signals/data.cjs +132 -0
  453. package/schematics/migrations/modal-signals/index.cjs +20 -0
  454. package/schematics/migrations/modal-signals/schema.json +20 -0
  455. package/schematics/migrations/navbar-signals-and-aria/README.md +111 -0
  456. package/schematics/migrations/navbar-signals-and-aria/data.cjs +198 -0
  457. package/schematics/migrations/navbar-signals-and-aria/index.cjs +569 -0
  458. package/schematics/migrations/navbar-signals-and-aria/schema.json +20 -0
  459. package/schematics/migrations/new-icons-pack/README.md +10 -10
  460. package/schematics/migrations/new-icons-pack/{index.js → index.cjs} +8 -7
  461. package/schematics/migrations/notification-center-signals/README.md +67 -0
  462. package/schematics/migrations/notification-center-signals/data.cjs +66 -0
  463. package/schematics/migrations/notification-center-signals/index.cjs +62 -0
  464. package/schematics/migrations/notification-center-signals/schema.json +15 -0
  465. package/schematics/migrations/option-signals/README.md +37 -0
  466. package/schematics/migrations/option-signals/data.cjs +86 -0
  467. package/schematics/migrations/option-signals/index.cjs +20 -0
  468. package/schematics/migrations/option-signals/schema.json +20 -0
  469. package/schematics/migrations/popover-leave-delay/README.md +51 -0
  470. package/schematics/migrations/popover-leave-delay/data.cjs +61 -0
  471. package/schematics/migrations/popover-leave-delay/index.cjs +55 -0
  472. package/schematics/migrations/popover-leave-delay/schema.json +15 -0
  473. package/schematics/migrations/progress-bar-percentage-and-aria/README.md +54 -0
  474. package/schematics/migrations/progress-bar-percentage-and-aria/data.cjs +76 -0
  475. package/schematics/migrations/progress-bar-percentage-and-aria/index.cjs +59 -0
  476. package/schematics/migrations/progress-bar-percentage-and-aria/schema.json +15 -0
  477. package/schematics/migrations/progress-spinner-signals/README.md +72 -0
  478. package/schematics/migrations/progress-spinner-signals/data.cjs +83 -0
  479. package/schematics/migrations/progress-spinner-signals/index.cjs +695 -0
  480. package/schematics/migrations/progress-spinner-signals/schema.json +20 -0
  481. package/schematics/migrations/query-list-signals/README.md +32 -0
  482. package/schematics/migrations/query-list-signals/data.cjs +70 -0
  483. package/schematics/migrations/query-list-signals/index.cjs +18 -0
  484. package/schematics/migrations/query-list-signals/schema.json +15 -0
  485. package/schematics/migrations/radio-signals-and-aria/README.md +82 -0
  486. package/schematics/migrations/radio-signals-and-aria/data.cjs +163 -0
  487. package/schematics/migrations/radio-signals-and-aria/index.cjs +40 -0
  488. package/schematics/migrations/radio-signals-and-aria/schema.json +20 -0
  489. package/schematics/migrations/read-state-dwell-handlers/README.md +125 -0
  490. package/schematics/migrations/read-state-dwell-handlers/data.cjs +45 -0
  491. package/schematics/migrations/read-state-dwell-handlers/index.cjs +216 -0
  492. package/schematics/migrations/read-state-dwell-handlers/schema.json +20 -0
  493. package/schematics/migrations/scrollbar-deprecated-path/README.md +128 -0
  494. package/schematics/migrations/scrollbar-deprecated-path/index.cjs +21 -0
  495. package/schematics/migrations/scrollbar-deprecated-path/schema.json +20 -0
  496. package/schematics/migrations/select-signal-inputs/README.md +61 -0
  497. package/schematics/migrations/select-signal-inputs/data.cjs +99 -0
  498. package/schematics/migrations/select-signal-inputs/index.cjs +58 -0
  499. package/schematics/migrations/select-signal-inputs/schema.json +15 -0
  500. package/schematics/migrations/sidepanel-non-modal-behavior/README.md +57 -0
  501. package/schematics/migrations/sidepanel-non-modal-behavior/data.cjs +111 -0
  502. package/schematics/migrations/sidepanel-non-modal-behavior/index.cjs +58 -0
  503. package/schematics/migrations/sidepanel-non-modal-behavior/schema.json +15 -0
  504. package/schematics/migrations/signal-inputs-subclasses/README.md +28 -0
  505. package/schematics/migrations/signal-inputs-subclasses/data.cjs +69 -0
  506. package/schematics/migrations/signal-inputs-subclasses/index.cjs +18 -0
  507. package/schematics/migrations/signal-inputs-subclasses/schema.json +15 -0
  508. package/schematics/migrations/split-button-optional-disabled/README.md +47 -0
  509. package/schematics/migrations/split-button-optional-disabled/data.cjs +53 -0
  510. package/schematics/migrations/split-button-optional-disabled/index.cjs +58 -0
  511. package/schematics/migrations/split-button-optional-disabled/schema.json +15 -0
  512. package/schematics/migrations/splitter-deprecated-path/README.md +136 -0
  513. package/schematics/migrations/splitter-deprecated-path/index.cjs +21 -0
  514. package/schematics/migrations/splitter-deprecated-path/schema.json +20 -0
  515. package/schematics/migrations/state-saving-default/README.md +67 -0
  516. package/schematics/migrations/state-saving-default/data.cjs +88 -0
  517. package/schematics/migrations/state-saving-default/index.cjs +63 -0
  518. package/schematics/migrations/state-saving-default/schema.json +15 -0
  519. package/schematics/migrations/table-cell-content/README.md +55 -0
  520. package/schematics/migrations/table-cell-content/data.cjs +66 -0
  521. package/schematics/migrations/table-cell-content/index.cjs +67 -0
  522. package/schematics/migrations/table-cell-content/schema.json +15 -0
  523. package/schematics/migrations/tabs-signals-and-aria/README.md +93 -0
  524. package/schematics/migrations/tabs-signals-and-aria/data.cjs +139 -0
  525. package/schematics/migrations/tabs-signals-and-aria/index.cjs +66 -0
  526. package/schematics/migrations/tabs-signals-and-aria/schema.json +15 -0
  527. package/schematics/migrations/tag-list-cleaner/README.md +58 -0
  528. package/schematics/migrations/tag-list-cleaner/data.cjs +42 -0
  529. package/schematics/migrations/tag-list-cleaner/index.cjs +197 -0
  530. package/schematics/migrations/tag-list-cleaner/schema.json +20 -0
  531. package/schematics/migrations/tag-slots/README.md +41 -0
  532. package/schematics/migrations/tag-slots/index.cjs +191 -0
  533. package/schematics/migrations/tag-slots/schema.json +20 -0
  534. package/schematics/migrations/tags-signals/README.md +85 -0
  535. package/schematics/migrations/tags-signals/data.cjs +103 -0
  536. package/schematics/migrations/tags-signals/index.cjs +674 -0
  537. package/schematics/migrations/tags-signals/schema.json +20 -0
  538. package/schematics/migrations/textarea-signals/README.md +72 -0
  539. package/schematics/migrations/textarea-signals/data.cjs +121 -0
  540. package/schematics/migrations/textarea-signals/index.cjs +380 -0
  541. package/schematics/migrations/textarea-signals/schema.json +20 -0
  542. package/schematics/migrations/time-range-title-for/README.md +164 -0
  543. package/schematics/migrations/time-range-title-for/data.cjs +139 -0
  544. package/schematics/migrations/time-range-title-for/index.cjs +164 -0
  545. package/schematics/migrations/time-range-title-for/schema.json +20 -0
  546. package/schematics/migrations/timepicker-signals/README.md +78 -0
  547. package/schematics/migrations/timepicker-signals/data.cjs +82 -0
  548. package/schematics/migrations/timepicker-signals/index.cjs +710 -0
  549. package/schematics/migrations/timepicker-signals/schema.json +20 -0
  550. package/schematics/migrations/timezone-grouping-utils/README.md +73 -0
  551. package/schematics/migrations/timezone-grouping-utils/data.cjs +101 -0
  552. package/schematics/migrations/timezone-grouping-utils/index.cjs +65 -0
  553. package/schematics/migrations/timezone-grouping-utils/schema.json +15 -0
  554. package/schematics/migrations/title-encapsulation/README.md +49 -0
  555. package/schematics/migrations/title-encapsulation/data.cjs +69 -0
  556. package/schematics/migrations/title-encapsulation/index.cjs +58 -0
  557. package/schematics/migrations/title-encapsulation/schema.json +15 -0
  558. package/schematics/migrations/toast-stack-and-defaults/README.md +102 -0
  559. package/schematics/migrations/toast-stack-and-defaults/data.cjs +79 -0
  560. package/schematics/migrations/toast-stack-and-defaults/index.cjs +54 -0
  561. package/schematics/migrations/toast-stack-and-defaults/schema.json +15 -0
  562. package/schematics/migrations/tooltip-pointer-events-and-types/README.md +53 -0
  563. package/schematics/migrations/tooltip-pointer-events-and-types/data.cjs +89 -0
  564. package/schematics/migrations/tooltip-pointer-events-and-types/index.cjs +61 -0
  565. package/schematics/migrations/tooltip-pointer-events-and-types/schema.json +15 -0
  566. package/schematics/migrations/top-bar-container-selectors/README.md +111 -0
  567. package/schematics/migrations/top-bar-container-selectors/data.cjs +56 -0
  568. package/schematics/migrations/top-bar-container-selectors/index.cjs +85 -0
  569. package/schematics/migrations/top-bar-container-selectors/schema.json +20 -0
  570. package/schematics/migrations/tree-select-signals/README.md +61 -0
  571. package/schematics/migrations/tree-select-signals/data.cjs +106 -0
  572. package/schematics/migrations/tree-select-signals/index.cjs +59 -0
  573. package/schematics/migrations/tree-select-signals/schema.json +15 -0
  574. package/schematics/migrations/tree-signals/README.md +82 -0
  575. package/schematics/migrations/tree-signals/data.cjs +123 -0
  576. package/schematics/migrations/tree-signals/index.cjs +55 -0
  577. package/schematics/migrations/tree-signals/schema.json +15 -0
  578. package/schematics/migrations/tree-state-saving-default/README.md +66 -0
  579. package/schematics/migrations/tree-state-saving-default/data.cjs +78 -0
  580. package/schematics/migrations/tree-state-saving-default/index.cjs +61 -0
  581. package/schematics/migrations/tree-state-saving-default/schema.json +15 -0
  582. package/schematics/migrations/username-pipe-injection/README.md +59 -0
  583. package/schematics/migrations/username-pipe-injection/data.cjs +78 -0
  584. package/schematics/migrations/username-pipe-injection/index.cjs +59 -0
  585. package/schematics/migrations/username-pipe-injection/schema.json +15 -0
  586. package/schematics/migrations/v20-upgrade/README.md +36 -16
  587. package/schematics/migrations/v20-upgrade/{data.js → data.cjs} +124 -77
  588. package/schematics/migrations/v20-upgrade/index.cjs +19 -0
  589. package/schematics/migrations/v21-upgrade/README.md +271 -0
  590. package/schematics/migrations/v21-upgrade/data.cjs +1371 -0
  591. package/schematics/migrations/v21-upgrade/index.cjs +95 -0
  592. package/schematics/migrations/v21-upgrade/schema.json +20 -0
  593. package/schematics/migrations/zoneless-change-detection/README.md +30 -0
  594. package/schematics/migrations/zoneless-change-detection/data.cjs +29 -0
  595. package/schematics/migrations/zoneless-change-detection/index.cjs +21 -0
  596. package/schematics/migrations/zoneless-change-detection/schema.json +15 -0
  597. package/schematics/migrations.json +401 -6
  598. package/schematics/ng-add/index.cjs +266 -0
  599. package/schematics/ng-add/schema.json +15 -0
  600. package/schematics/utils/{angular-parsing.js → angular-parsing.cjs} +2 -2
  601. package/schematics/utils/deprecated-path-migration.cjs +62 -0
  602. package/schematics/utils/html-config.cjs +148 -0
  603. package/schematics/utils/{icon-migration.js → icon-migration.cjs} +2 -2
  604. package/schematics/utils/list-item-pattern.cjs +16 -0
  605. package/schematics/utils/{package-config.js → package-config.cjs} +3 -32
  606. package/schematics/utils/project-files.cjs +25 -0
  607. package/schematics/utils/replacement-driver.cjs +337 -0
  608. package/schematics/utils/safe-rule.cjs +23 -0
  609. package/schematics/utils/signal-members-migration.cjs +779 -0
  610. package/schematics/utils/tag-patterns.cjs +21 -0
  611. package/schematics/utils/template-ref-access.cjs +155 -0
  612. package/schematics/utils/{typescript.js → typescript.cjs} +1 -1
  613. package/schematics/utils/warn-only-migration.cjs +52 -0
  614. package/schematics/utils/workspace-styles.cjs +123 -0
  615. package/scrollbar/{_scrollbar-component-theme.scss → deprecated/_scrollbar-component-theme.scss} +1 -1
  616. package/scrollbar/{scrollbar.component.scss → deprecated/scrollbar.component.scss} +1 -1
  617. package/scrollbar/native-scrollbar.scss +68 -0
  618. package/scrollbar/scrollbar-tokens.scss +13 -22
  619. package/scrollbar/scrollbar-track.scss +94 -0
  620. package/scrollbar/scrollbar-viewport.scss +33 -0
  621. package/scrollbar/scrollbar.scss +24 -0
  622. package/search-expandable/search-expandable-tokens.scss +4 -0
  623. package/search-expandable/search-expandable.scss +4 -2
  624. package/select/_select-theme.scss +3 -16
  625. package/select/select.scss +0 -6
  626. package/sidebar/sidebar.scss +20 -0
  627. package/sidepanel/_sidepanel-theme.scss +1 -1
  628. package/sidepanel/sidepanel-tokens.scss +7 -1
  629. package/sidepanel/sidepanel.scss +41 -5
  630. package/skeleton/skeleton-presets.scss +350 -0
  631. package/skeleton/skeleton-tokens.scss +127 -0
  632. package/skeleton/skeleton.scss +53 -45
  633. package/split-button/_split-button-theme.scss +4 -4
  634. package/split-button/split-button.scss +2 -6
  635. package/splitter/{_splitter-theme.scss → deprecated/_splitter-theme.scss} +1 -1
  636. package/splitter/deprecated/splitter.scss +51 -0
  637. package/splitter/splitter-tokens.scss +19 -0
  638. package/splitter/splitter.scss +148 -28
  639. package/table/_table-theme.scss +13 -12
  640. package/table/table-tokens.scss +8 -0
  641. package/table/table.scss +47 -22
  642. package/tabs/_tabs-common.scss +14 -14
  643. package/tabs/_tabs-theme.scss +4 -5
  644. package/tabs/tab-body.scss +49 -1
  645. package/tabs/tab-header.scss +2 -1
  646. package/tags/tag-list.scss +4 -0
  647. package/tags/tag.scss +19 -1
  648. package/time-range/time-range.scss +9 -0
  649. package/timezone/timezone-option.component.scss +4 -7
  650. package/timezone/timezone-select.component.scss +3 -0
  651. package/toast/_toast-theme.scss +1 -4
  652. package/toast/toast-container.component.scss +19 -13
  653. package/toast/toast-tokens.scss +12 -6
  654. package/toast/toast.component.scss +42 -19
  655. package/toggle/_toggle-theme.scss +4 -10
  656. package/toggle/toggle.scss +67 -26
  657. package/tooltip/_tooltip-theme.scss +7 -1
  658. package/tooltip/tooltip-tokens.scss +1 -2
  659. package/tooltip/tooltip.scss +55 -9
  660. package/top-bar/top-bar-tokens.scss +13 -2
  661. package/top-bar/top-bar.scss +24 -19
  662. package/tree/_tree-theme.scss +0 -1
  663. package/tree/toggle.scss +5 -9
  664. package/tree/tree-option.scss +2 -4
  665. package/tree/tree-tokens.scss +2 -1
  666. package/tree/tree.scss +3 -5
  667. package/tree-select/_tree-select-theme.scss +4 -15
  668. package/tree-select/tree-select-tokens.scss +16 -0
  669. package/tree-select/tree-select.scss +0 -6
  670. package/{accordion/index.d.ts → types/koobiq-components-accordion.d.ts} +102 -84
  671. package/{actions-panel/index.d.ts → types/koobiq-components-actions-panel.d.ts} +44 -59
  672. package/{alert/index.d.ts → types/koobiq-components-alert.d.ts} +8 -3
  673. package/types/koobiq-components-app-switcher.d.ts +406 -0
  674. package/types/koobiq-components-autocomplete.d.ts +443 -0
  675. package/{badge/index.d.ts → types/koobiq-components-badge.d.ts} +25 -20
  676. package/{breadcrumbs/index.d.ts → types/koobiq-components-breadcrumbs.d.ts} +97 -46
  677. package/types/koobiq-components-button-toggle.d.ts +340 -0
  678. package/types/koobiq-components-button.d.ts +296 -0
  679. package/types/koobiq-components-checkbox.d.ts +172 -0
  680. package/types/koobiq-components-clamped-text.d.ts +184 -0
  681. package/{code-block/index.d.ts → types/koobiq-components-code-block.d.ts} +150 -88
  682. package/{content-panel/index.d.ts → types/koobiq-components-content-panel.d.ts} +81 -25
  683. package/{core/index.d.ts → types/koobiq-components-core.d.ts} +2827 -865
  684. package/{datepicker/index.d.ts → types/koobiq-components-datepicker.d.ts} +161 -116
  685. package/types/koobiq-components-divider.d.ts +43 -0
  686. package/types/koobiq-components-dl.d.ts +235 -0
  687. package/{dropdown/index.d.ts → types/koobiq-components-dropdown.d.ts} +245 -239
  688. package/types/koobiq-components-ellipsis-center.d.ts +85 -0
  689. package/types/koobiq-components-empty-state.d.ts +106 -0
  690. package/{file-upload/index.d.ts → types/koobiq-components-file-upload.d.ts} +214 -107
  691. package/{filter-bar/index.d.ts → types/koobiq-components-filter-bar.d.ts} +410 -495
  692. package/types/koobiq-components-flag.d.ts +68 -0
  693. package/{form-field/index.d.ts → types/koobiq-components-form-field.d.ts} +167 -191
  694. package/types/koobiq-components-icon.d.ts +333 -0
  695. package/{inline-edit/index.d.ts → types/koobiq-components-inline-edit.d.ts} +109 -46
  696. package/types/koobiq-components-input.d.ts +477 -0
  697. package/types/koobiq-components-link-deprecated.d.ts +101 -0
  698. package/types/koobiq-components-link.d.ts +176 -0
  699. package/{list/index.d.ts → types/koobiq-components-list.d.ts} +162 -99
  700. package/types/koobiq-components-loader-overlay.d.ts +101 -0
  701. package/{markdown/index.d.ts → types/koobiq-components-markdown.d.ts} +16 -24
  702. package/types/koobiq-components-modal.d.ts +666 -0
  703. package/types/koobiq-components-navbar.d.ts +569 -0
  704. package/types/koobiq-components-notification-center.d.ts +500 -0
  705. package/{overflow-items/index.d.ts → types/koobiq-components-overflow-items.d.ts} +8 -22
  706. package/types/koobiq-components-popover.d.ts +468 -0
  707. package/types/koobiq-components-progress-bar.d.ts +67 -0
  708. package/{progress-spinner/index.d.ts → types/koobiq-components-progress-spinner.d.ts} +33 -10
  709. package/types/koobiq-components-radio.d.ts +294 -0
  710. package/{resizer/index.d.ts → types/koobiq-components-resizer.d.ts} +37 -2
  711. package/{scrollbar/index.d.ts → types/koobiq-components-scrollbar-deprecated.d.ts} +18 -1
  712. package/types/koobiq-components-scrollbar.d.ts +154 -0
  713. package/types/koobiq-components-search-expandable.d.ts +164 -0
  714. package/{select/index.d.ts → types/koobiq-components-select.d.ts} +360 -167
  715. package/types/koobiq-components-sidebar.d.ts +152 -0
  716. package/types/koobiq-components-sidepanel.d.ts +436 -0
  717. package/types/koobiq-components-skeleton.d.ts +234 -0
  718. package/types/koobiq-components-split-button.d.ts +65 -0
  719. package/{splitter/index.d.ts → types/koobiq-components-splitter-deprecated.d.ts} +44 -1
  720. package/types/koobiq-components-splitter.d.ts +406 -0
  721. package/types/koobiq-components-table.d.ts +44 -0
  722. package/types/koobiq-components-tabs.d.ts +888 -0
  723. package/{tags/index.d.ts → types/koobiq-components-tags.d.ts} +249 -133
  724. package/types/koobiq-components-textarea.d.ts +178 -0
  725. package/{time-range/index.d.ts → types/koobiq-components-time-range.d.ts} +135 -62
  726. package/types/koobiq-components-timepicker.d.ts +223 -0
  727. package/types/koobiq-components-timezone.d.ts +266 -0
  728. package/types/koobiq-components-title.d.ts +184 -0
  729. package/types/koobiq-components-toast.d.ts +289 -0
  730. package/types/koobiq-components-toggle.d.ts +121 -0
  731. package/types/koobiq-components-tooltip.d.ts +610 -0
  732. package/types/koobiq-components-top-bar.d.ts +61 -0
  733. package/types/koobiq-components-tree-select.d.ts +670 -0
  734. package/types/koobiq-components-tree.d.ts +1339 -0
  735. package/types/koobiq-components-username.d.ts +340 -0
  736. package/username/_username-theme.scss +35 -0
  737. package/username/username.scss +10 -34
  738. package/app-switcher/index.d.ts +0 -276
  739. package/autocomplete/index.d.ts +0 -286
  740. package/button/index.d.ts +0 -153
  741. package/button-toggle/index.d.ts +0 -162
  742. package/checkbox/index.d.ts +0 -163
  743. package/clamped-text/index.d.ts +0 -146
  744. package/core/styles/_tokens.scss +0 -7
  745. package/core/styles/common/_clearfix.scss +0 -13
  746. package/core/styles/common/_popup.scss +0 -6
  747. package/core/styles/functions/_index.scss +0 -3
  748. package/core/styles/functions/_number.scss +0 -60
  749. package/core/styles/functions/_string.scss +0 -18
  750. package/core/styles/theming/scrollbar-tokens.scss +0 -25
  751. package/core/styles/typography/_typography-utils.scss +0 -84
  752. package/divider/index.d.ts +0 -20
  753. package/dl/index.d.ts +0 -45
  754. package/ellipsis-center/index.d.ts +0 -71
  755. package/empty-state/index.d.ts +0 -45
  756. package/flag/index.d.ts +0 -44
  757. package/icon/index.d.ts +0 -200
  758. package/input/index.d.ts +0 -354
  759. package/link/index.d.ts +0 -56
  760. package/loader-overlay/index.d.ts +0 -57
  761. package/modal/index.d.ts +0 -339
  762. package/navbar/index.d.ts +0 -372
  763. package/notification-center/index.d.ts +0 -323
  764. package/popover/index.d.ts +0 -182
  765. package/prebuilt-themes/dark-theme.css +0 -1
  766. package/prebuilt-themes/light-theme.css +0 -1
  767. package/progress-bar/index.d.ts +0 -31
  768. package/radio/index.d.ts +0 -203
  769. package/schematics/migrations/alert-signals/index.js +0 -353
  770. package/schematics/migrations/filter-bar-signals/index.js +0 -319
  771. package/schematics/migrations/v20-upgrade/index.js +0 -225
  772. package/schematics/ng-add/index.js +0 -39
  773. package/search-expandable/index.d.ts +0 -101
  774. package/sidebar/index.d.ts +0 -94
  775. package/sidepanel/index.d.ts +0 -272
  776. package/skeleton/index.d.ts +0 -26
  777. package/split-button/index.d.ts +0 -46
  778. package/table/index.d.ts +0 -25
  779. package/tabs/index.d.ts +0 -677
  780. package/textarea/index.d.ts +0 -138
  781. package/timepicker/index.d.ts +0 -197
  782. package/timezone/index.d.ts +0 -125
  783. package/title/index.d.ts +0 -139
  784. package/toast/index.d.ts +0 -178
  785. package/toggle/index.d.ts +0 -104
  786. package/tooltip/index.d.ts +0 -335
  787. package/top-bar/index.d.ts +0 -33
  788. package/tree/index.d.ts +0 -802
  789. package/tree-select/index.d.ts +0 -475
  790. package/username/index.d.ts +0 -194
  791. /package/schematics/migrations/css-selectors/{data.js → data.cjs} +0 -0
  792. /package/schematics/migrations/deprecated-icons/{data.js → data.cjs} +0 -0
  793. /package/schematics/migrations/icons-replacement/{data.js → data.cjs} +0 -0
  794. /package/schematics/migrations/new-icons-pack/{data.js → data.cjs} +0 -0
  795. /package/schematics/utils/{ast.js → ast.cjs} +0 -0
  796. /package/schematics/utils/{messages.js → messages.cjs} +0 -0
  797. /package/{dynamic-translation/index.d.ts → types/koobiq-components-dynamic-translation.d.ts} +0 -0
  798. /package/{index.d.ts → types/koobiq-components.d.ts} +0 -0
@@ -1,22 +1,299 @@
1
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
1
+ import { _IdGenerator, FocusMonitor } from '@angular/cdk/a11y';
2
2
  import * as i0 from '@angular/core';
3
- import { Directive, inject, ChangeDetectorRef, DestroyRef, ElementRef, input, booleanAttribute, contentChild, output, signal, contentChildren, forwardRef, Input, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, computed, ContentChildren, InjectionToken, NgModule } from '@angular/core';
4
- import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
3
+ import { InjectionToken, inject, ElementRef, signal, input, computed, output, booleanAttribute, untracked, Directive, ChangeDetectorRef, DestroyRef, Injector, contentChild, viewChild, contentChildren, forwardRef, afterNextRender, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, numberAttribute, linkedSignal, NgModule } from '@angular/core';
5
4
  import { KbqAutocompleteTrigger } from '@koobiq/components/autocomplete';
6
5
  import * as i1 from '@koobiq/components/core';
7
- import { KbqFieldSizingContent, KbqColorDirective, KbqComponentColors, hasModifierKey, isNull, KBQ_TITLE_TEXT_REF, ErrorStateMatcher, FocusKeyManager, isSelectAll, ENTER as ENTER$1, TAB as TAB$1, SPACE as SPACE$1, COMMA, SEMICOLON, kbqInjectAutofilled } from '@koobiq/components/core';
8
- import { KbqCleaner, KbqFormFieldControl, KBQ_CLEANER_CONTEXT, KbqTrim } from '@koobiq/components/form-field';
9
- import { FocusMonitor } from '@angular/cdk/a11y';
6
+ import { ENTER, TAB, SPACE, COMMA, SEMICOLON, kbqInjectAutofilled, ESCAPE, hasModifierKey, KbqFieldSizingContent, KbqColorDirective, kbqAnimationsDisabled, KbqComponentColors, isNull, KBQ_TITLE_TEXT_REF, KbqLocaleOverridesDirective, kbqInjectA11yLocaleConfiguration, runClearPredicate, ErrorStateMatcher, KbqErrorStateTracker, kbqQueryListFrom, FocusKeyManager, kbqLeaveTabOrderOnTabOut, isSelectAll } from '@koobiq/components/core';
7
+ import { KbqTrim, KbqCleaner, KbqFormFieldControl, kbqCleanerFactoryProvider } from '@koobiq/components/form-field';
10
8
  import { Directionality } from '@angular/cdk/bidi';
11
9
  import * as i2 from '@angular/cdk/drag-drop';
12
10
  import { CdkDrag, CdkDropList } from '@angular/cdk/drag-drop';
13
- import { DELETE, SPACE, BACKSPACE, ENTER, ESCAPE, F2, LEFT_ARROW, RIGHT_ARROW, TAB, HOME, END } from '@angular/cdk/keycodes';
11
+ import { DELETE, SPACE as SPACE$1, BACKSPACE, ENTER as ENTER$1, ESCAPE as ESCAPE$1, F2, LEFT_ARROW, RIGHT_ARROW, TAB as TAB$1, HOME, END } from '@angular/cdk/keycodes';
14
12
  import { takeUntilDestroyed, outputToObservable } from '@angular/core/rxjs-interop';
13
+ import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
15
14
  import { Subject, merge } from 'rxjs';
16
15
  import { startWith, takeUntil, filter } from 'rxjs/operators';
17
16
  import { KbqIcon } from '@koobiq/components/icon';
18
17
  import { PlatformModule } from '@angular/cdk/platform';
19
18
 
19
+ const KBQ_TAG_INPUT_DEFAULT_SEPARATORS = [
20
+ { symbol: /\r?\n/, key: 'Enter', keyCode: ENTER },
21
+ { symbol: /\t/, key: 'Tab', keyCode: TAB },
22
+ { symbol: / /, key: ' ', keyCode: SPACE },
23
+ { symbol: /,/, key: ',', keyCode: COMMA },
24
+ { symbol: /;/, key: ';', keyCode: SEMICOLON }
25
+ ];
26
+ const KBQ_TAGS_DEFAULT_OPTIONS_CONFIG = { separatorKeyCodes: [ENTER] };
27
+ /** Injection token to be used to override the default options. */
28
+ const KBQ_TAGS_DEFAULT_OPTIONS = new InjectionToken('kbq-tags-default-options', {
29
+ providedIn: 'root',
30
+ factory: () => KBQ_TAGS_DEFAULT_OPTIONS_CONFIG
31
+ });
32
+ /** Utility provider for `KBQ_TAGS_DEFAULT_OPTIONS`. */
33
+ const kbqTagsDefaultOptionsProvider = (options) => ({
34
+ provide: KBQ_TAGS_DEFAULT_OPTIONS,
35
+ useValue: { ...KBQ_TAGS_DEFAULT_OPTIONS_CONFIG, ...options }
36
+ });
37
+ /**
38
+ * Directive that adds tag-specific behaviors to an input element inside `<kbq-form-field>`.
39
+ * May be placed inside or outside of an `<kbq-tag-list>`.
40
+ */
41
+ class KbqTagInput {
42
+ /** Whether the input is disabled. */
43
+ get disabled() {
44
+ return this._disabled() || (this._tagList && this._tagList.disabled());
45
+ }
46
+ set disabled(value) {
47
+ this._disabled.set(value);
48
+ }
49
+ constructor() {
50
+ this.elementRef = inject(ElementRef);
51
+ this.defaultOptions = inject(KBQ_TAGS_DEFAULT_OPTIONS);
52
+ this.trimDirective = inject(KbqTrim, { optional: true, self: true });
53
+ /**
54
+ * The autocomplete trigger attached to the input, if any.
55
+ *
56
+ * @docs-private
57
+ */
58
+ this.autocompleteTrigger = inject(KbqAutocompleteTrigger, { optional: true, self: true });
59
+ this.focusedValue = signal(false, ...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
60
+ /**
61
+ * Whether the control is focused.
62
+ *
63
+ * @docs-private
64
+ */
65
+ this.focused = this.focusedValue.asReadonly();
66
+ /** Whether the control's value was filled in by the browser. */
67
+ this.autofilled = kbqInjectAutofilled();
68
+ /**
69
+ * The list of key codes that will trigger a tagEnd event.
70
+ *
71
+ * Defaults to `[ENTER]`.
72
+ */
73
+ this.separatorKeyCodes = input(this.defaultOptions.separatorKeyCodes, { ...(ngDevMode ? { debugName: "separatorKeyCodes" } : /* istanbul ignore next */ {}), alias: 'kbqTagInputSeparatorKeyCodes',
74
+ transform: (value) => value ?? [] });
75
+ this.allSeparators = this.defaultOptions.separators || KBQ_TAG_INPUT_DEFAULT_SEPARATORS;
76
+ /**
77
+ * The effective set of separators: entries gated by `keyCode` are included only when that
78
+ * code is present in `separatorKeyCodes`; entries without a `keyCode` (no single-keystroke
79
+ * equivalent, e.g. a run of whitespace) are always included.
80
+ *
81
+ * @docs-private
82
+ */
83
+ this.separators = computed(() => this.allSeparators.filter((separator) => separator.keyCode === undefined || this.separatorKeyCodes().includes(separator.keyCode)), ...(ngDevMode ? [{ debugName: "separators" }] : /* istanbul ignore next */ []));
84
+ /** Emitted when a tag is to be added. */
85
+ this.tagEnd = output({ alias: 'kbqTagInputTokenEnd' });
86
+ /** A value indicating whether allow/prevent tags duplication */
87
+ this.distinct = input(false, { ...(ngDevMode ? { debugName: "distinct" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
88
+ /** The input's placeholder text. */
89
+ this.placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
90
+ /** Unique id for the input. */
91
+ this.id = input(inject(_IdGenerator).getId('kbq-tag-list-input-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
92
+ /** Register input for tag list. */
93
+ this.tagList = input(undefined, { ...(ngDevMode ? { debugName: "tagList" } : /* istanbul ignore next */ {}), alias: 'kbqTagInputFor' });
94
+ /**
95
+ * Whether or not the tagEnd event will be emitted when the input is blurred.
96
+ */
97
+ this.addOnBlur = input(true, { ...(ngDevMode ? { debugName: "addOnBlur" } : /* istanbul ignore next */ {}), alias: 'kbqTagInputAddOnBlur', transform: booleanAttribute });
98
+ /**
99
+ * Whether the tagEnd event will be emitted when the text pasted. Defaults to `addOnPaste` of
100
+ * `KBQ_TAGS_DEFAULT_OPTIONS`, or `true`.
101
+ */
102
+ this.addOnPaste = input(this.defaultOptions.addOnPaste ?? true, { ...(ngDevMode ? { debugName: "addOnPaste" } : /* istanbul ignore next */ {}), alias: 'kbqTagInputAddOnPaste',
103
+ transform: booleanAttribute });
104
+ this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
105
+ this.emptyValue = signal(true, ...(ngDevMode ? [{ debugName: "emptyValue" }] : /* istanbul ignore next */ []));
106
+ /** Whether the input is empty. */
107
+ this.empty = this.emptyValue.asReadonly();
108
+ /** @docs-private */
109
+ this.disabledInput = input(undefined, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
110
+ transform: booleanAttribute });
111
+ this.inputElement = this.elementRef.nativeElement;
112
+ }
113
+ ngOnChanges(changes) {
114
+ // A bound input is handed to its member; unbound, it leaves what code wrote.
115
+ if (changes['disabledInput']) {
116
+ const disabled = this.disabledInput();
117
+ if (disabled !== undefined)
118
+ this.disabled = disabled;
119
+ }
120
+ const tagList = this.tagList();
121
+ // Registered here rather than in an effect or a computed. The tag list has no content query for its
122
+ // input and learns of it only through `registerInput()`, which has to land before the list's host
123
+ // bindings read the input on the first pass, and an effect runs after this hook. And
124
+ // `registerInput()` writes a signal, which a computed rejects with NG0600.
125
+ if (tagList && tagList !== this._tagList) {
126
+ this._tagList = tagList;
127
+ tagList.registerInput(this);
128
+ }
129
+ }
130
+ ngDoCheck() {
131
+ // The value changes without notice: the consumer clears the input once a tag is added.
132
+ this.emptyValue.set(!this.inputElement.value);
133
+ }
134
+ /** @docs-private */
135
+ onKeydown(event) {
136
+ const isSeparatorKey = this.matchesInputSeparator(event);
137
+ if (!this.inputElement.value) {
138
+ if (isSeparatorKey && event.keyCode !== TAB) {
139
+ event.preventDefault();
140
+ }
141
+ this._tagList.keydown(event);
142
+ // The tag list ignores Escape, and an autocomplete panel, which hears the key on `body`, or a dialog
143
+ // around the field still has to get it.
144
+ if (event.keyCode !== ESCAPE) {
145
+ event.stopPropagation();
146
+ }
147
+ return;
148
+ }
149
+ if (isSeparatorKey) {
150
+ if (event.keyCode === ENTER &&
151
+ this.autocompleteTrigger?.panelOpen &&
152
+ this.autocompleteTrigger?.activeOption) {
153
+ return;
154
+ }
155
+ this.emitTagEnd();
156
+ event.preventDefault();
157
+ }
158
+ }
159
+ /**
160
+ * Checks to see if the blur should emit the (tagEnd) event.
161
+ *
162
+ * @docs-private
163
+ */
164
+ blur(event) {
165
+ this.focusedValue.set(false);
166
+ // Blur the tag list if it is not focused
167
+ if (!this._tagList.focused()) {
168
+ this._tagList.blur();
169
+ }
170
+ // Chromium fires `blur` synchronously when the input becomes disabled, so without this
171
+ // guard disabling a focused tag input would append whatever was typed.
172
+ if (!this.disabled && this.addOnBlur() && (this.autocompleteTrigger?.onInputBlur()(event) ?? true)) {
173
+ this.emitTagEnd();
174
+ }
175
+ }
176
+ /**
177
+ * Checks to see if the (tagEnd) event needs to be emitted.
178
+ *
179
+ * @docs-private
180
+ */
181
+ emitTagEnd() {
182
+ // Untracked: called from a consumer's `effect()`, the tags read here would make it run again on every change.
183
+ untracked(() => this.addTag(this.trimValue(this.inputElement.value), this.existingTagValues()));
184
+ }
185
+ /**
186
+ * Whether the current input value duplicates an existing tag.
187
+ *
188
+ * @docs-private
189
+ */
190
+ get hasDuplicates() {
191
+ return this.tagValues().has(this.trimValue(this.inputElement.value));
192
+ }
193
+ /** @docs-private */
194
+ onInput() {
195
+ this.emptyValue.set(!this.inputElement.value);
196
+ }
197
+ /** @docs-private */
198
+ onPaste($event) {
199
+ if (!$event.clipboardData) {
200
+ return;
201
+ }
202
+ const data = $event.clipboardData.getData('text');
203
+ if (!data || !this.addOnPaste()) {
204
+ return;
205
+ }
206
+ const separatorsInString = this.getPasteSeparatorPatterns(data);
207
+ // prettier-ignore
208
+ const dividedString = separatorsInString.length > 0 ?
209
+ [...data.split(new RegExp(`${separatorsInString.join('|')}`))] :
210
+ [data];
211
+ // Built once per paste, then updated as items are accepted, so a batch also dedupes
212
+ // against itself — `tags` is a QueryList that cannot refresh between iterations.
213
+ const existingValues = this.existingTagValues();
214
+ dividedString.forEach((item) => this.addTag(this.trimValue(item), existingValues));
215
+ $event.preventDefault();
216
+ $event.stopPropagation();
217
+ }
218
+ /** @docs-private */
219
+ onFocus() {
220
+ this.focusedValue.set(true);
221
+ this._tagList.unselectAll();
222
+ }
223
+ /** Focuses the input. */
224
+ focus() {
225
+ this.inputElement.focus();
226
+ }
227
+ /**
228
+ * Implemented as part of KbqTagTextControl.
229
+ *
230
+ * @docs-private
231
+ */
232
+ suppressAutocompleteOnNextFocus() {
233
+ this.autocompleteTrigger?.suppressOpenOnNextFocus();
234
+ }
235
+ getPasteSeparatorPatterns(value) {
236
+ return this.separators()
237
+ .filter((separator) => (!separator.appliesTo || separator.appliesTo.includes('paste')) &&
238
+ value.search(separator.symbol) > -1)
239
+ .map((separator) => separator.symbol.source);
240
+ }
241
+ /**
242
+ * Single path for adding a tag, shared by typed input, blur and paste.
243
+ * `existingValues` is `null` unless `distinct` is on, and is mutated as values are accepted.
244
+ */
245
+ addTag(value, existingValues) {
246
+ if (existingValues) {
247
+ if (existingValues.has(value))
248
+ return;
249
+ existingValues.add(value);
250
+ }
251
+ // An empty value adds nothing, so latching the flag here would make the next
252
+ // programmatic tags update look UI-initiated.
253
+ if (value) {
254
+ this._tagList?.notifyPendingTagChange();
255
+ }
256
+ this.tagEnd.emit({ input: this.inputElement, value });
257
+ }
258
+ /** Values to dedupe against, or `null` when duplicates are allowed. */
259
+ existingTagValues() {
260
+ return this.distinct() ? this.tagValues() : null;
261
+ }
262
+ tagValues() {
263
+ return new Set(this._tagList.tags.map(({ value }) => value));
264
+ }
265
+ trimValue(value) {
266
+ return (this.trimDirective ? this.trimDirective.trim(value) : value);
267
+ }
268
+ /** Checks whether a keydown event matches a separator that applies to typed input. */
269
+ matchesInputSeparator(event) {
270
+ return this.separators().some((separator) => separator.key === event.key &&
271
+ !hasModifierKey(event) &&
272
+ (!separator.appliesTo || separator.appliesTo.includes('input')));
273
+ }
274
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
275
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqTagInput, isStandalone: true, selector: "input[kbqTagInputFor]", inputs: { separatorKeyCodes: { classPropertyName: "separatorKeyCodes", publicName: "kbqTagInputSeparatorKeyCodes", isSignal: true, isRequired: false, transformFunction: null }, distinct: { classPropertyName: "distinct", publicName: "distinct", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, tagList: { classPropertyName: "tagList", publicName: "kbqTagInputFor", isSignal: true, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "kbqTagInputAddOnBlur", isSignal: true, isRequired: false, transformFunction: null }, addOnPaste: { classPropertyName: "addOnPaste", publicName: "kbqTagInputAddOnPaste", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tagEnd: "kbqTagInputTokenEnd" }, host: { listeners: { "keydown": "onKeydown($event)", "blur": "blur($event)", "focus": "onFocus()", "input": "onInput()", "paste": "onPaste($event)" }, properties: { "id": "id()", "attr.disabled": "disabled || null", "attr.placeholder": "placeholder() || null" }, classAttribute: "kbq-tag-input" }, exportAs: ["kbqTagInput", "kbqTagInputFor"], usesOnChanges: true, hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
276
+ }
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagInput, decorators: [{
278
+ type: Directive,
279
+ args: [{
280
+ selector: 'input[kbqTagInputFor]',
281
+ host: {
282
+ class: 'kbq-tag-input',
283
+ '[id]': 'id()',
284
+ '[attr.disabled]': 'disabled || null',
285
+ '[attr.placeholder]': 'placeholder() || null',
286
+ '(keydown)': 'onKeydown($event)',
287
+ '(blur)': 'blur($event)',
288
+ '(focus)': 'onFocus()',
289
+ '(input)': 'onInput()',
290
+ '(paste)': 'onPaste($event)'
291
+ },
292
+ hostDirectives: [KbqFieldSizingContent],
293
+ exportAs: 'kbqTagInput, kbqTagInputFor'
294
+ }]
295
+ }], ctorParameters: () => [], propDecorators: { separatorKeyCodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputSeparatorKeyCodes", required: false }] }], tagEnd: [{ type: i0.Output, args: ["kbqTagInputTokenEnd"] }], distinct: [{ type: i0.Input, args: [{ isSignal: true, alias: "distinct", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], tagList: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputFor", required: false }] }], addOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputAddOnBlur", required: false }] }], addOnPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputAddOnPaste", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
296
+
20
297
  /**
21
298
  * Event object emitted by KbqTag when the tag is edited.
22
299
  */
@@ -41,13 +318,14 @@ const getTagEditInputMissingError = () => {
41
318
  };
42
319
  /**
43
320
  * Dummy directive to add CSS class to tag avatar.
321
+ *
44
322
  * @docs-private
45
323
  */
46
324
  class KbqTagAvatar {
47
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagAvatar, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
48
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqTagAvatar, isStandalone: true, selector: "kbq-tag-avatar, [kbqTagAvatar]", host: { classAttribute: "kbq-tag-avatar" }, ngImport: i0 }); }
325
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagAvatar, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
326
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagAvatar, isStandalone: true, selector: "kbq-tag-avatar, [kbqTagAvatar]", host: { classAttribute: "kbq-tag-avatar" }, ngImport: i0 }); }
49
327
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagAvatar, decorators: [{
328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagAvatar, decorators: [{
51
329
  type: Directive,
52
330
  args: [{
53
331
  selector: 'kbq-tag-avatar, [kbqTagAvatar]',
@@ -56,19 +334,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
56
334
  }] });
57
335
  /**
58
336
  * Dummy directive to add CSS class to tag trailing icon.
337
+ *
59
338
  * @docs-private
60
339
  */
61
340
  class KbqTagTrailingIcon {
62
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagTrailingIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
63
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqTagTrailingIcon, isStandalone: true, selector: "kbq-tag-trailing-icon, [kbqTagTrailingIcon]", host: { classAttribute: "kbq-tag-trailing-icon" }, ngImport: i0 }); }
341
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagTrailingIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
342
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagTrailingIcon, isStandalone: true, selector: "kbq-tag-trailing-icon, [kbqTagTrailingIcon]", host: { classAttribute: "kbq-tag-trailing-icon" }, ngImport: i0 }); }
64
343
  }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagTrailingIcon, decorators: [{
344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagTrailingIcon, decorators: [{
66
345
  type: Directive,
67
346
  args: [{
68
347
  selector: 'kbq-tag-trailing-icon, [kbqTagTrailingIcon]',
69
348
  host: { class: 'kbq-tag-trailing-icon' }
70
349
  }]
71
350
  }] });
351
+ /** Marks content to be projected into the prefix (leading) slot of a tag. */
352
+ class KbqTagPrefix {
353
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagPrefix, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
354
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagPrefix, isStandalone: true, selector: "[kbqTagPrefix]", host: { classAttribute: "kbq-tag-prefix" }, ngImport: i0 }); }
355
+ }
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagPrefix, decorators: [{
357
+ type: Directive,
358
+ args: [{
359
+ selector: '[kbqTagPrefix]',
360
+ host: {
361
+ class: 'kbq-tag-prefix'
362
+ }
363
+ }]
364
+ }] });
365
+ /** Marks content to be projected into the suffix (trailing) slot of a tag. */
366
+ class KbqTagSuffix {
367
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagSuffix, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
368
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagSuffix, isStandalone: true, selector: "[kbqTagSuffix]", host: { classAttribute: "kbq-tag-suffix" }, ngImport: i0 }); }
369
+ }
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagSuffix, decorators: [{
371
+ type: Directive,
372
+ args: [{
373
+ selector: '[kbqTagSuffix]',
374
+ host: {
375
+ class: 'kbq-tag-suffix'
376
+ }
377
+ }]
378
+ }] });
72
379
  /**
73
380
  * Directive to add submit behavior for the editable tag.
74
381
  */
@@ -77,10 +384,10 @@ class KbqTagEditSubmit {
77
384
  /** @docs-private */
78
385
  this.tag = inject(KbqTag);
79
386
  }
80
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagEditSubmit, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
81
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqTagEditSubmit, isStandalone: true, selector: "[kbqTagEditSubmit]", host: { listeners: { "click": "tag.submitEditing(\"click\")" }, properties: { "attr.tabindex": "-1" }, classAttribute: "kbq-tag-edit-submit" }, exportAs: ["kbqTagEditSubmit"], ngImport: i0 }); }
387
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagEditSubmit, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
388
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagEditSubmit, isStandalone: true, selector: "[kbqTagEditSubmit]", host: { listeners: { "click": "tag.submitEditing(\"click\")" }, properties: { "attr.tabindex": "-1" }, classAttribute: "kbq-tag-edit-submit" }, exportAs: ["kbqTagEditSubmit"], hostDirectives: [{ directive: KbqTagSuffix }], ngImport: i0 }); }
82
389
  }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagEditSubmit, decorators: [{
390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagEditSubmit, decorators: [{
84
391
  type: Directive,
85
392
  args: [{
86
393
  selector: '[kbqTagEditSubmit]',
@@ -89,6 +396,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
89
396
  '[attr.tabindex]': '-1',
90
397
  '(click)': 'tag.submitEditing("click")'
91
398
  },
399
+ hostDirectives: [KbqTagSuffix],
92
400
  exportAs: 'kbqTagEditSubmit'
93
401
  }]
94
402
  }] });
@@ -106,19 +414,19 @@ class KbqTagEditInput {
106
414
  /** @docs-private */
107
415
  handleKeydown(event) {
108
416
  switch (event.keyCode) {
109
- case ESCAPE: {
417
+ case ESCAPE$1: {
110
418
  event.stopPropagation();
111
419
  this.tag.cancelEditing('escape');
112
420
  break;
113
421
  }
114
- case ENTER: {
422
+ case ENTER$1: {
115
423
  event.stopPropagation();
116
424
  this.tag.submitEditing('enter');
117
425
  break;
118
426
  }
119
427
  // We should prevent KbqTag from receiving these keydown events
120
428
  case BACKSPACE:
121
- case SPACE:
429
+ case SPACE$1:
122
430
  case DELETE: {
123
431
  event.stopPropagation();
124
432
  break;
@@ -126,10 +434,10 @@ class KbqTagEditInput {
126
434
  default:
127
435
  }
128
436
  }
129
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagEditInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
130
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqTagEditInput, isStandalone: true, selector: "[kbqTagEditInput]", host: { listeners: { "keydown": "handleKeydown($event)", "click": "handleClick($event)" }, classAttribute: "kbq-tag-edit-input" }, exportAs: ["kbqTagEditInput"], hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
437
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagEditInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
438
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagEditInput, isStandalone: true, selector: "[kbqTagEditInput]", host: { listeners: { "keydown": "handleKeydown($event)", "click": "handleClick($event)" }, classAttribute: "kbq-tag-edit-input" }, exportAs: ["kbqTagEditInput"], hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
131
439
  }
132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagEditInput, decorators: [{
440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagEditInput, decorators: [{
133
441
  type: Directive,
134
442
  args: [{
135
443
  selector: '[kbqTagEditInput]',
@@ -143,27 +451,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
143
451
  }]
144
452
  }] });
145
453
  class KbqTag extends KbqColorDirective {
146
- /** Whether the tag is editable. */
147
- // TODO: Skipped for migration because:
148
- // Accessor inputs cannot be migrated as they are too complex.
149
- get editable() {
150
- return this._editable ?? !!this.tagList?.editable();
151
- }
152
- set editable(value) {
153
- this._editable = value;
154
- }
155
- /** Whether the tag is selected. */
156
- // TODO: Skipped for migration because:
157
- // Accessor inputs cannot be migrated as they are too complex.
158
- get selected() {
159
- return this._selected;
454
+ /**
455
+ * Whether the tag has focus.
456
+ *
457
+ * @docs-private
458
+ */
459
+ get hasFocus() {
460
+ return this._hasFocus();
160
461
  }
161
- set selected(value) {
162
- this.setSelectedState(value, { emitEvent: true });
462
+ /** @docs-private */
463
+ set hasFocus(value) {
464
+ this._hasFocus.set(value);
465
+ }
466
+ /**
467
+ * @docs-private
468
+ */
469
+ get textElement() {
470
+ return this.textElementQuery();
163
471
  }
164
472
  /** The value of the tag. Defaults to the content inside `<kbq-tag>` tags. */
165
- // TODO: Skipped for migration because:
166
- // Accessor inputs cannot be migrated as they are too complex.
473
+ // Stays an accessor: it falls back to the projected text content, which is DOM state.
167
474
  get value() {
168
475
  return this._value ?? this.elementRef.nativeElement.textContent?.trim();
169
476
  }
@@ -171,50 +478,30 @@ class KbqTag extends KbqColorDirective {
171
478
  this._value = value;
172
479
  }
173
480
  /**
174
- * Whether the tag is selectable.
175
- */
176
- // TODO: Skipped for migration because:
177
- // Accessor inputs cannot be migrated as they are too complex.
178
- get selectable() {
179
- return this._selectable || !!this.tagList?.selectable();
180
- }
181
- set selectable(value) {
182
- this._selectable = value;
183
- }
184
- /**
185
- * Determines whether the tag is removable.
481
+ * Whether the user may remove this tag through the controls the tag itself offers — the remove
482
+ * control and the `Delete` key. A disabled tag offers neither.
483
+ *
484
+ * This is the affordance, not the channel: `remove()` stays open so the list can still clear a
485
+ * disabled tag when `clearPredicate` asks for it.
186
486
  */
187
- // TODO: Skipped for migration because:
188
- // Accessor inputs cannot be migrated as they are too complex.
189
- get removable() {
190
- return this._removable && (this.tagList?.removable ?? true);
191
- }
192
- set removable(value) {
193
- this._removable = value;
487
+ get canRemove() {
488
+ return this.removable() && !this.disabled;
194
489
  }
195
- // TODO: Skipped for migration because:
196
- // Accessor inputs cannot be migrated as they are too complex.
490
+ /** Tab order of the tag. */
197
491
  get tabindex() {
198
- if (this.disabled)
199
- return null;
200
- if (this._tabindex === -1 && this.selectable && !this.tagList)
201
- return 0;
202
- return this._tabindex;
492
+ return this.tabindexState();
203
493
  }
204
494
  set tabindex(value) {
205
- this._tabindex = value;
495
+ this._tabindex.set(value);
206
496
  }
207
- /**
208
- * Whether the tag is disabled.
209
- */
210
- // TODO: Skipped for migration because:
211
- // Accessor inputs cannot be migrated as they are too complex.
497
+ /** Whether the tag is disabled. */
498
+ // Stays a plain boolean: the focus key manager skips items by reading `item.disabled` as a value, so a
499
+ // signal - a function, always truthy - would skip every tag. It also folds in the tag list's form control.
212
500
  get disabled() {
213
- return this._disabled || (this.tagList?.disabled ?? false);
501
+ return this.disabledState();
214
502
  }
215
503
  set disabled(value) {
216
- this._disabled = value;
217
- this.syncDragDisabledState();
504
+ this._disabled.set(value);
218
505
  }
219
506
  /**
220
507
  * Whether the tag is draggable.
@@ -222,7 +509,7 @@ class KbqTag extends KbqColorDirective {
222
509
  * @docs-private
223
510
  */
224
511
  get draggable() {
225
- return (this.tagList?.draggable ?? false) && !this.disabled;
512
+ return this.draggableState();
226
513
  }
227
514
  constructor() {
228
515
  super();
@@ -231,6 +518,7 @@ class KbqTag extends KbqColorDirective {
231
518
  this.tagList = inject(KbqTagList, { optional: true });
232
519
  this.drag = inject(CdkDrag, { host: true });
233
520
  this.destroyRef = inject(DestroyRef);
521
+ this.injector = inject(Injector);
234
522
  /** @docs-private */
235
523
  this.elementRef = inject(ElementRef);
236
524
  /**
@@ -247,15 +535,21 @@ class KbqTag extends KbqColorDirective {
247
535
  this.onBlur = new Subject();
248
536
  /** @docs-private */
249
537
  this.nativeElement = this.elementRef.nativeElement;
538
+ this._hasFocus = signal(false, ...(ngDevMode ? [{ debugName: "_hasFocus" }] : /* istanbul ignore next */ []));
250
539
  /**
251
- * Whether the tag has focus.
540
+ * Backing input of `editable`. Bind through the `editable` attribute; read `editable`, which falls
541
+ * back to the tag list's `editable` while this is unbound.
542
+ * `undefined` only as the default: the transform never runs on it, so a bound value is always a boolean.
252
543
  *
253
544
  * @docs-private
254
545
  */
255
- this.hasFocus = false;
546
+ this.editableInput = input(undefined, { ...(ngDevMode ? { debugName: "editableInput" } : /* istanbul ignore next */ {}), alias: 'editable',
547
+ transform: booleanAttribute });
548
+ /** Whether the tag is editable. */
549
+ this.editable = computed(() => this.editableInput() ?? !!this.tagList?.editable(), ...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
256
550
  /** Whether the tag edits can't be submitted. */
257
- this.preventEditSubmit = input(false, ...(ngDevMode ? [{ debugName: "preventEditSubmit", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
258
- this.editInputElementRef = contentChild(KbqTagEditInput, ...(ngDevMode ? [{ debugName: "editInputElementRef", read: ElementRef }] : [{ read: ElementRef }]));
551
+ this.preventEditSubmit = input(false, { ...(ngDevMode ? { debugName: "preventEditSubmit" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
552
+ this.editInputElementRef = contentChild(KbqTagEditInput, { ...(ngDevMode ? { debugName: "editInputElementRef" } : /* istanbul ignore next */ {}), read: ElementRef });
259
553
  /**
260
554
  * Emits event when the tag is edited.
261
555
  */
@@ -263,14 +557,15 @@ class KbqTag extends KbqColorDirective {
263
557
  /**
264
558
  * @docs-private
265
559
  */
266
- this.editing = signal(false, ...(ngDevMode ? [{ debugName: "editing" }] : []));
560
+ this.editing = signal(false, ...(ngDevMode ? [{ debugName: "editing" }] : /* istanbul ignore next */ []));
561
+ this.textElementQuery = viewChild('kbqTitleText', ...(ngDevMode ? [{ debugName: "textElementQuery" }] : /* istanbul ignore next */ []));
267
562
  this.contentChildren = contentChildren(KbqIcon);
268
563
  /** The tag avatar */
269
- this.avatar = contentChild(KbqTagAvatar, ...(ngDevMode ? [{ debugName: "avatar" }] : []));
564
+ this.avatar = contentChild(KbqTagAvatar, ...(ngDevMode ? [{ debugName: "avatar" }] : /* istanbul ignore next */ []));
270
565
  /** The tag's trailing icon. */
271
- this.trailingIcon = contentChild(KbqTagTrailingIcon, ...(ngDevMode ? [{ debugName: "trailingIcon" }] : []));
566
+ this.trailingIcon = contentChild(KbqTagTrailingIcon, ...(ngDevMode ? [{ debugName: "trailingIcon" }] : /* istanbul ignore next */ []));
272
567
  /** The tag's remove toggler. */
273
- this.removeIcon = contentChild(forwardRef(() => KbqTagRemove), ...(ngDevMode ? [{ debugName: "removeIcon" }] : []));
568
+ this.removeIcon = contentChild(forwardRef(() => KbqTagRemove), ...(ngDevMode ? [{ debugName: "removeIcon" }] : /* istanbul ignore next */ []));
274
569
  /** Emitted when the tag is selected or deselected. */
275
570
  this.selectionChange = output();
276
571
  /** Emitted when the tag is destroyed and leaving the DOM. */
@@ -280,18 +575,94 @@ class KbqTag extends KbqColorDirective {
280
575
  * Fires on programmatic and UI removal (click or keyboard).
281
576
  */
282
577
  this.removed = output();
283
- this._selected = false;
284
- this._selectable = false;
285
- this._removable = true;
286
- this._tabindex = -1;
287
- this._disabled = false;
288
- this.color = KbqComponentColors.ContrastFade;
578
+ /**
579
+ * Backing input of `selected`. Bind through the `selected` attribute; read `selected`, which also
580
+ * reflects `select()`, `deselect()` and user interaction.
581
+ * A change of the binding is applied in `ngOnChanges` through `setSelectedState()`, so it emits
582
+ * `selectionChange` the way the old setter did - the tag list listens to it.
583
+ *
584
+ * @docs-private
585
+ */
586
+ this.selectedInput = input(false, { ...(ngDevMode ? { debugName: "selectedInput" } : /* istanbul ignore next */ {}), alias: 'selected', transform: booleanAttribute });
587
+ this._selected = signal(false, ...(ngDevMode ? [{ debugName: "_selected" }] : /* istanbul ignore next */ []));
588
+ /** Whether the tag is selected. */
589
+ // Read-only rather than a `linkedSignal`: a binding change reset through a `linkedSignal` would skip
590
+ // `setSelectedState()` and never emit the `selectionChange` the tag list listens to.
591
+ this.selected = this._selected.asReadonly();
592
+ /**
593
+ * Backing input of `selectable`. Bind through the `selectable` attribute; read `selectable`, which is
594
+ * also true while the tag list is selectable.
595
+ *
596
+ * @docs-private
597
+ */
598
+ this.selectableInput = input(false, { ...(ngDevMode ? { debugName: "selectableInput" } : /* istanbul ignore next */ {}), alias: 'selectable', transform: booleanAttribute });
599
+ /** Whether the tag is selectable. */
600
+ this.selectable = computed(() => this.selectableInput() || !!this.tagList?.selectable(), ...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
601
+ /**
602
+ * Backing input of `removable`. Bind through the `removable` attribute; read `removable`, which also
603
+ * requires the tag list to be removable.
604
+ *
605
+ * @docs-private
606
+ */
607
+ this.removableInput = input(true, { ...(ngDevMode ? { debugName: "removableInput" } : /* istanbul ignore next */ {}), alias: 'removable', transform: booleanAttribute });
608
+ /** Determines whether the tag is removable. */
609
+ this.removable = computed(() => this.removableInput() && (this.tagList?.removable() ?? true), ...(ngDevMode ? [{ debugName: "removable" }] : /* istanbul ignore next */ []));
610
+ this._tabindex = signal(-1, ...(ngDevMode ? [{ debugName: "_tabindex" }] : /* istanbul ignore next */ []));
611
+ this.tabindexState = computed(() => {
612
+ if (this.disabled)
613
+ return null;
614
+ if (this._tabindex() === -1 && this.selectable() && !this.tagList)
615
+ return 0;
616
+ return this._tabindex();
617
+ }, ...(ngDevMode ? [{ debugName: "tabindexState" }] : /* istanbul ignore next */ []));
618
+ this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
619
+ this.disabledState = computed(() => this._disabled() || (this.tagList?.disabled() ?? false), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
620
+ /**
621
+ * Value of the `disabled` attribute.
622
+ *
623
+ * @internal
624
+ */
625
+ this.disabledAttribute = computed(() => this.disabled || null, ...(ngDevMode ? [{ debugName: "disabledAttribute" }] : /* istanbul ignore next */ []));
626
+ this.draggableState = computed(() => (this.tagList?.draggable ?? false) && !this.disabled, ...(ngDevMode ? [{ debugName: "draggableState" }] : /* istanbul ignore next */ []));
627
+ /**
628
+ * Whether the tag moves into place without motion while the list is reordered.
629
+ *
630
+ * @docs-private
631
+ */
632
+ this.animationsDisabled = kbqAnimationsDisabled();
633
+ /** @docs-private */
634
+ this.valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), alias: 'value' });
635
+ /** @docs-private */
636
+ this.tabindexInput = input(undefined, { ...(ngDevMode ? { debugName: "tabindexInput" } : /* istanbul ignore next */ {}), alias: 'tabindex' });
637
+ /** @docs-private */
638
+ this.disabledInput = input(undefined, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
639
+ transform: booleanAttribute });
289
640
  this.setDefaultColor(KbqComponentColors.ContrastFade);
290
641
  this.addHostClassName();
291
642
  this.setupDragInitialProperties();
292
643
  }
293
- ngAfterContentInit() {
294
- this.addClassModificatorForIcons();
644
+ ngOnChanges(changes) {
645
+ // A bound input is handed to its member; unbound, it leaves what code wrote.
646
+ if (changes['valueInput']) {
647
+ const value = this.valueInput();
648
+ if (value !== undefined)
649
+ this.value = value;
650
+ }
651
+ if (changes['tabindexInput']) {
652
+ const tabindex = this.tabindexInput();
653
+ if (tabindex !== undefined)
654
+ this.tabindex = tabindex;
655
+ }
656
+ if (changes['disabledInput']) {
657
+ const disabled = this.disabledInput();
658
+ if (disabled !== undefined)
659
+ this.disabled = disabled;
660
+ }
661
+ // Only a change of this binding: `ngOnChanges` also fires for every other input, and re-applying the
662
+ // bound value then would undo a selection the user made by clicking.
663
+ if (changes['selectedInput']) {
664
+ this.setSelectedState(this.selectedInput(), { emitEvent: true });
665
+ }
295
666
  }
296
667
  ngAfterViewInit() {
297
668
  this.setupFocusMonitor();
@@ -301,7 +672,14 @@ class KbqTag extends KbqColorDirective {
301
672
  this.focusMonitor.stopMonitoring(this.elementRef);
302
673
  this.destroyed.emit({ tag: this });
303
674
  }
304
- /** @docs-private */
675
+ /**
676
+ * Adds the legacy positional classes inferred from projected icons.
677
+ *
678
+ * @deprecated Use `KbqTagPrefix` and `KbqTagSuffix` to declare the position explicitly.
679
+ * Will be removed in 22.0.0.
680
+ *
681
+ * @docs-private
682
+ */
305
683
  addClassModificatorForIcons() {
306
684
  const icons = this.contentChildren().map((item) => item.elementRef.nativeElement);
307
685
  if (icons.length === 1) {
@@ -338,17 +716,23 @@ class KbqTag extends KbqColorDirective {
338
716
  * Selects the tag.
339
717
  */
340
718
  select() {
341
- if (this.disabled || !this.selectable)
342
- return;
343
- this.setSelectedState(true, { emitEvent: true });
719
+ // Untracked, like the other imperative methods: called from a consumer's `effect()`, the state read on the
720
+ // way — `selected`, `disabled`, focus, the inputs — would make the effect run again whenever it changes.
721
+ untracked(() => {
722
+ if (this.disabled || !this.selectable())
723
+ return;
724
+ this.setSelectedState(true, { emitEvent: true });
725
+ });
344
726
  }
345
727
  /**
346
728
  * Deselects the tag.
347
729
  */
348
730
  deselect() {
349
- if (this.disabled || !this.selectable)
350
- return;
351
- this.setSelectedState(false, { emitEvent: true });
731
+ untracked(() => {
732
+ if (this.disabled || !this.selectable())
733
+ return;
734
+ this.setSelectedState(false, { emitEvent: true });
735
+ });
352
736
  }
353
737
  /**
354
738
  * Selects the tag and emits event with isUserInput flag.
@@ -356,24 +740,31 @@ class KbqTag extends KbqColorDirective {
356
740
  * @docs-private
357
741
  */
358
742
  selectViaInteraction() {
359
- if (this.disabled || !this.selectable)
360
- return;
361
- this.setSelectedState(true, { isUserInput: true, emitEvent: true });
743
+ untracked(() => {
744
+ if (this.disabled || !this.selectable())
745
+ return;
746
+ this.setSelectedState(true, { isUserInput: true, emitEvent: true });
747
+ });
362
748
  }
363
749
  /**
364
750
  * Toggles the current selected state of the tag.
365
751
  */
366
752
  toggleSelected(isUserInput = false) {
367
- if (this.disabled || !this.selectable)
368
- return this.selected;
369
- this.setSelectedState(!this.selected, { isUserInput, emitEvent: true });
370
- return this.selected;
753
+ return untracked(() => {
754
+ if (this.disabled || !this.selectable())
755
+ return this.selected();
756
+ this.setSelectedState(!this.selected(), { isUserInput, emitEvent: true });
757
+ return this.selected();
758
+ });
371
759
  }
372
760
  /** Focuses the tag. */
373
761
  focus() {
374
- if (this.disabled)
375
- return;
376
- this.elementRef.nativeElement.focus();
762
+ // The focus monitor reports the focus synchronously, and its handler reads the focus state.
763
+ untracked(() => {
764
+ if (this.disabled)
765
+ return;
766
+ this.elementRef.nativeElement.focus();
767
+ });
377
768
  }
378
769
  /**
379
770
  * Allows for programmatic removal of the tag. Called by the KbqTagList when the DELETE or
@@ -382,7 +773,7 @@ class KbqTag extends KbqColorDirective {
382
773
  * Informs any listeners of the removal request. Does not remove the tag from the DOM.
383
774
  */
384
775
  remove() {
385
- if (this.removable) {
776
+ if (untracked(this.removable)) {
386
777
  this.removed.emit({ tag: this });
387
778
  }
388
779
  }
@@ -396,7 +787,7 @@ class KbqTag extends KbqColorDirective {
396
787
  // We should handle modifier-based selection only if tag is inside of a tag list.
397
788
  // Single tag can only be toggled on focus or blur.
398
789
  this.tagList &&
399
- this.selectable &&
790
+ this.selectable() &&
400
791
  hasModifierKey(event, 'metaKey', 'ctrlKey', 'shiftKey')) {
401
792
  if (!event.shiftKey)
402
793
  this.toggleSelected(true);
@@ -405,10 +796,10 @@ class KbqTag extends KbqColorDirective {
405
796
  event.stopPropagation();
406
797
  return;
407
798
  }
408
- if (this.tagList && this.selectable) {
799
+ if (this.tagList && this.selectable()) {
409
800
  this.tagList.handleSelectionInteraction(this, false);
410
801
  }
411
- if (!this.tagList && this.selectable) {
802
+ if (!this.tagList && this.selectable()) {
412
803
  this.toggleSelected(true);
413
804
  }
414
805
  }
@@ -430,7 +821,7 @@ class KbqTag extends KbqColorDirective {
430
821
  event.preventDefault();
431
822
  break;
432
823
  }
433
- case SPACE: {
824
+ case SPACE$1: {
434
825
  if (this.tagList) {
435
826
  this.toggleSelected(true);
436
827
  this.tagList.handleSelectionInteraction(this, false);
@@ -444,7 +835,7 @@ class KbqTag extends KbqColorDirective {
444
835
  break;
445
836
  }
446
837
  case F2:
447
- case ENTER:
838
+ case ENTER$1:
448
839
  this.startEditing(event.key);
449
840
  break;
450
841
  default:
@@ -452,43 +843,48 @@ class KbqTag extends KbqColorDirective {
452
843
  }
453
844
  /** @docs-private */
454
845
  blur() {
455
- this.elementRef.nativeElement.blur();
846
+ untracked(() => this.elementRef.nativeElement.blur());
456
847
  }
457
848
  /** @docs-private */
458
849
  handleDblClick(event) {
459
- if (this.disabled || !this.editable)
850
+ if (this.disabled || !this.editable())
460
851
  return;
461
852
  event.stopPropagation();
462
853
  this.startEditing('dblclick');
463
854
  }
464
855
  startEditing(reason) {
465
- if (!this.editable || this.editing())
856
+ if (!this.editable() || this.editing())
466
857
  return;
467
858
  this.editing.set(true);
468
859
  this.editChange.emit({ tag: this, type: 'start', reason });
469
- setTimeout(() => {
860
+ // The edit input exists once the editing state is rendered.
861
+ afterNextRender(() => {
470
862
  const input = this.editInputElementRef()?.nativeElement;
471
863
  if (!input)
472
864
  throw getTagEditInputMissingError();
473
865
  this.focusMonitor.focusVia(this.elementRef.nativeElement, 'keyboard');
474
866
  input.select();
475
- });
867
+ }, { injector: this.injector });
476
868
  }
477
869
  /** @docs-private */
478
870
  cancelEditing(reason) {
479
- if (!this.editing())
480
- return;
481
- this.editing.set(false);
482
- this.editChange.emit({ tag: this, type: 'cancel', reason });
483
- this.textElement.nativeElement.scrollTo?.({ left: 0, behavior: 'instant' });
871
+ untracked(() => {
872
+ if (!this.editing())
873
+ return;
874
+ this.editing.set(false);
875
+ this.editChange.emit({ tag: this, type: 'cancel', reason });
876
+ this.textElement.nativeElement.scrollTo?.({ left: 0, behavior: 'instant' });
877
+ });
484
878
  }
485
879
  /** @docs-private */
486
880
  submitEditing(reason) {
487
- if (!this.editing() || this.preventEditSubmit())
488
- return;
489
- this.editing.set(false);
490
- this.editChange.emit({ tag: this, type: 'submit', reason });
491
- this.textElement.nativeElement.scrollTo?.({ left: 0, behavior: 'instant' });
881
+ untracked(() => {
882
+ if (!this.editing() || this.preventEditSubmit())
883
+ return;
884
+ this.editing.set(false);
885
+ this.editChange.emit({ tag: this, type: 'submit', reason });
886
+ this.textElement.nativeElement.scrollTo?.({ left: 0, behavior: 'instant' });
887
+ });
492
888
  }
493
889
  /**
494
890
  * Sets the selected state of the tag.
@@ -497,27 +893,30 @@ class KbqTag extends KbqColorDirective {
497
893
  */
498
894
  setSelectedState(selected, options = {}) {
499
895
  const { isUserInput = false, emitEvent = false } = options;
500
- if (selected !== this.selected) {
501
- this._selected = selected;
502
- if (emitEvent) {
503
- this.selectionChange.emit({
504
- source: this,
505
- isUserInput,
506
- selected: this.selected
507
- });
896
+ untracked(() => {
897
+ if (selected !== this.selected()) {
898
+ this._selected.set(selected);
899
+ if (emitEvent) {
900
+ this.selectionChange.emit({
901
+ source: this,
902
+ isUserInput,
903
+ selected: this.selected()
904
+ });
905
+ }
508
906
  }
509
- this.changeDetectorRef.markForCheck();
510
- }
907
+ });
511
908
  }
512
909
  setupDragInitialProperties() {
513
- this.syncDragDisabledState();
910
+ // Derived rather than pushed: `draggable` folds in the tag list's `draggable` and `disabled`, so a
911
+ // push from this tag's own setter never saw the list's `draggable` flip, and `CdkDrag` keeps an
912
+ // explicit `disabled = true` regardless of what its container says.
913
+ effect(() => {
914
+ this.drag.disabled = !this.draggable;
915
+ });
514
916
  this.drag.started.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
515
917
  this.drag.data = { tag: this };
516
918
  });
517
919
  }
518
- syncDragDisabledState() {
519
- this.drag.disabled = !this.draggable;
520
- }
521
920
  setupFocusMonitor() {
522
921
  this.focusMonitor.monitor(this.elementRef, true).subscribe((origin) => {
523
922
  if (this.disabled)
@@ -536,14 +935,13 @@ class KbqTag extends KbqColorDirective {
536
935
  if (!this.tagList)
537
936
  this.deselect();
538
937
  }
539
- this.changeDetectorRef.markForCheck();
540
938
  }
541
939
  });
542
940
  }
543
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTag, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
544
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqTag, isStandalone: true, selector: "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", inputs: { editable: { classPropertyName: "editable", publicName: "editable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, preventEditSubmit: { classPropertyName: "preventEditSubmit", publicName: "preventEditSubmit", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, outputs: { editChange: "editChange", selectionChange: "selectionChange", destroyed: "destroyed", removed: "removed" }, host: { listeners: { "dblclick": "handleDblClick($event)", "click": "handleClick($event)", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "tabindex", "attr.disabled": "disabled || null", "class.kbq-selected": "selected", "class.kbq-tag-with-avatar": "avatar()", "class.kbq-tag-with-icon": "contentChildren()", "class.kbq-tag-with-trailing-icon": "trailingIcon() || removeIcon()", "class.kbq-disabled": "disabled", "class.kbq-tag_editable": "editable", "class.kbq-tag_editing": "editing()", "class.kbq-tag_removable": "removable", "class.kbq-tag_selectable": "selectable", "class.kbq-tag_draggable": "draggable" }, classAttribute: "kbq-tag" }, providers: [{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqTag }], queries: [{ propertyName: "editInputElementRef", first: true, predicate: KbqTagEditInput, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "contentChildren", predicate: KbqIcon, isSignal: true }, { propertyName: "avatar", first: true, predicate: KbqTagAvatar, descendants: true, isSignal: true }, { propertyName: "trailingIcon", first: true, predicate: KbqTagTrailingIcon, descendants: true, isSignal: true }, { propertyName: "removeIcon", first: true, predicate: i0.forwardRef(() => KbqTagRemove), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["kbqTitleText"], descendants: true }], exportAs: ["kbqTag"], usesInheritance: true, hostDirectives: [{ directive: i2.CdkDrag }], ngImport: i0, template: `
941
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTag, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
942
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqTag, isStandalone: true, selector: "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", inputs: { editableInput: { classPropertyName: "editableInput", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, preventEditSubmit: { classPropertyName: "preventEditSubmit", publicName: "preventEditSubmit", isSignal: true, isRequired: false, transformFunction: null }, selectedInput: { classPropertyName: "selectedInput", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectableInput: { classPropertyName: "selectableInput", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, removableInput: { classPropertyName: "removableInput", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, tabindexInput: { classPropertyName: "tabindexInput", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { editChange: "editChange", selectionChange: "selectionChange", destroyed: "destroyed", removed: "removed" }, host: { listeners: { "dblclick": "handleDblClick($event)", "click": "handleClick($event)", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "tabindex", "attr.disabled": "disabledAttribute()", "class.kbq-selected": "selected()", "class.kbq-tag-with-avatar": "avatar()", "class.kbq-tag-with-icon": "contentChildren()", "class.kbq-tag-with-trailing-icon": "trailingIcon() || removeIcon()", "class.kbq-disabled": "disabled", "class.kbq-tag_editable": "editable()", "class.kbq-tag_editing": "editing()", "class.kbq-tag_removable": "removable()", "class.kbq-tag_selectable": "selectable()", "class.kbq-tag_draggable": "draggable", "class.kbq-animations-disabled": "animationsDisabled" }, classAttribute: "kbq-tag" }, providers: [{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqTag }], queries: [{ propertyName: "editInputElementRef", first: true, predicate: KbqTagEditInput, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "contentChildren", predicate: KbqIcon, isSignal: true }, { propertyName: "avatar", first: true, predicate: KbqTagAvatar, descendants: true, isSignal: true }, { propertyName: "trailingIcon", first: true, predicate: KbqTagTrailingIcon, descendants: true, isSignal: true }, { propertyName: "removeIcon", first: true, predicate: i0.forwardRef(() => KbqTagRemove), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "textElementQuery", first: true, predicate: ["kbqTitleText"], descendants: true, isSignal: true }], exportAs: ["kbqTag"], usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: i2.CdkDrag }, { directive: i1.KbqLocaleOverridesDirective, inputs: ["kbqLocaleOverrides", "localeOverrides"] }], ngImport: i0, template: `
545
943
  <div class="kbq-tag__wrapper">
546
- <ng-content select="[kbq-icon]:not([kbqTagRemove]):not([kbqTagEditSubmit])" />
944
+ <ng-content select="[kbqTagPrefix]" />
547
945
  <span #kbqTitleText class="kbq-tag__text">
548
946
  @if (editing()) {
549
947
  <ng-content select="[kbqTagEditInput]" />
@@ -554,18 +952,19 @@ class KbqTag extends KbqColorDirective {
554
952
  @if (editing()) {
555
953
  <ng-content select="[kbqTagEditSubmit]" />
556
954
  } @else {
557
- @if (removable) {
955
+ @if (canRemove) {
558
956
  <ng-content select="[kbqTagRemove]" />
559
957
  }
560
958
  }
959
+ <ng-content select="[kbqTagSuffix]" />
561
960
  </div>
562
- `, isInline: true, styles: [".kbq-tag{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-block;max-width:100%;height:var(--kbq-size-xxl);padding:var(--kbq-tag-size-padding-vertical) var(--kbq-tag-size-padding-horizontal);border-radius:4px;cursor:default;outline:none;box-sizing:border-box}.kbq-tag .kbq-icon.kbq-tag-remove{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon.kbq-tag-remove:hover{cursor:pointer}.kbq-tag.kbq-disabled .kbq-icon.kbq-tag-remove:hover{cursor:default}.kbq-tag .kbq-tag__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0 var(--kbq-tag-size-content-gap-horizontal)}.kbq-tag .kbq-icon_left{margin-left:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-edit-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag .kbq-tag-edit-input::-ms-clear{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-webkit-search-decoration,.kbq-tag .kbq-tag-edit-input::-webkit-search-cancel-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-decoration{display:none}.kbq-tag .kbq-tag-edit-input{min-width:var(--kbq-size-xs);max-width:100%}.kbq-tag .kbq-tag-edit-input.kbq-input{min-height:unset!important;border-radius:unset!important;padding:unset!important}.kbq-tag .kbq-tag-edit-submit{margin-right:var(--kbq-size-3xs)}.kbq-tag.cdk-drag-placeholder{opacity:var(--kbq-opacity-disabled)}.kbq-tag.cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}.kbq-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
961
+ `, isInline: true, styles: ["@charset \"UTF-8\";.kbq-tag{-webkit-user-select:none;user-select:none;position:relative;display:inline-block;max-width:100%;height:var(--kbq-size-xxl);padding:var(--kbq-tag-size-padding-vertical) var(--kbq-tag-size-padding-horizontal);border-radius:4px}@supports (corner-shape: squircle){.kbq-tag{corner-shape:squircle;border-radius:7.4px}}.kbq-tag{cursor:default;outline:none;box-sizing:border-box}.kbq-tag .kbq-icon.kbq-tag-remove{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon.kbq-tag-remove:hover{cursor:pointer}.kbq-tag.kbq-disabled .kbq-icon.kbq-tag-remove:hover{cursor:default}.kbq-tag .kbq-tag__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0 var(--kbq-tag-size-content-gap-horizontal)}.kbq-tag .kbq-tag-prefix{flex-shrink:0;margin-inline-start:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-suffix{flex-shrink:0}.kbq-tag .kbq-tag-suffix:not(.kbq-tag-remove,.kbq-tag-edit-submit){margin-inline-end:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon_left{margin-left:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-edit-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag .kbq-tag-edit-input::-ms-clear{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-webkit-search-decoration,.kbq-tag .kbq-tag-edit-input::-webkit-search-cancel-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-decoration{display:none}.kbq-tag .kbq-tag-edit-input{min-width:var(--kbq-size-xs);max-width:100%}.kbq-tag .kbq-tag-edit-input.kbq-input{min-height:unset!important;border-radius:unset!important;padding:unset!important}.kbq-tag .kbq-tag-edit-submit{margin-right:var(--kbq-size-3xs)}.kbq-tag.cdk-drag-placeholder{opacity:var(--kbq-opacity-disabled)}.kbq-tag.cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}.kbq-tag.cdk-drag-animating.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tag.cdk-drag-animating{animation:none;transition:none}}.kbq-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
563
962
  }
564
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTag, decorators: [{
963
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTag, decorators: [{
565
964
  type: Component,
566
965
  args: [{ selector: 'kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]', template: `
567
966
  <div class="kbq-tag__wrapper">
568
- <ng-content select="[kbq-icon]:not([kbqTagRemove]):not([kbqTagEditSubmit])" />
967
+ <ng-content select="[kbqTagPrefix]" />
569
968
  <span #kbqTitleText class="kbq-tag__text">
570
969
  @if (editing()) {
571
970
  <ng-content select="[kbqTagEditInput]" />
@@ -576,52 +975,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
576
975
  @if (editing()) {
577
976
  <ng-content select="[kbqTagEditSubmit]" />
578
977
  } @else {
579
- @if (removable) {
978
+ @if (canRemove) {
580
979
  <ng-content select="[kbqTagRemove]" />
581
980
  }
582
981
  }
982
+ <ng-content select="[kbqTagSuffix]" />
583
983
  </div>
584
984
  `, providers: [{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqTag }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
585
985
  class: 'kbq-tag',
986
+ // No signal is read by two of these bindings, and none of the tag list's: the host bindings of every tag in a
987
+ // view run in that view's reactive consumer, where a signal read again after others costs a scan of all it has
988
+ // read so far, O(N²) per check across N tags. Each value that folds in `disabled` has a signal of its own.
586
989
  '[attr.tabindex]': 'tabindex',
587
- '[attr.disabled]': 'disabled || null',
588
- '[class.kbq-selected]': 'selected',
990
+ '[attr.disabled]': 'disabledAttribute()',
991
+ '[class.kbq-selected]': 'selected()',
589
992
  '[class.kbq-tag-with-avatar]': 'avatar()',
590
993
  '[class.kbq-tag-with-icon]': 'contentChildren()',
591
994
  '[class.kbq-tag-with-trailing-icon]': 'trailingIcon() || removeIcon()',
592
995
  '[class.kbq-disabled]': 'disabled',
593
- '[class.kbq-tag_editable]': 'editable',
996
+ '[class.kbq-tag_editable]': 'editable()',
594
997
  '[class.kbq-tag_editing]': 'editing()',
595
- '[class.kbq-tag_removable]': 'removable',
596
- '[class.kbq-tag_selectable]': 'selectable',
998
+ '[class.kbq-tag_removable]': 'removable()',
999
+ '[class.kbq-tag_selectable]': 'selectable()',
597
1000
  '[class.kbq-tag_draggable]': 'draggable',
1001
+ '[class.kbq-animations-disabled]': 'animationsDisabled',
598
1002
  '(dblclick)': 'handleDblClick($event)',
599
1003
  '(click)': 'handleClick($event)',
600
1004
  '(keydown)': 'handleKeydown($event)'
601
- }, hostDirectives: [CdkDrag], exportAs: 'kbqTag', styles: [".kbq-tag{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-block;max-width:100%;height:var(--kbq-size-xxl);padding:var(--kbq-tag-size-padding-vertical) var(--kbq-tag-size-padding-horizontal);border-radius:4px;cursor:default;outline:none;box-sizing:border-box}.kbq-tag .kbq-icon.kbq-tag-remove{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon.kbq-tag-remove:hover{cursor:pointer}.kbq-tag.kbq-disabled .kbq-icon.kbq-tag-remove:hover{cursor:default}.kbq-tag .kbq-tag__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0 var(--kbq-tag-size-content-gap-horizontal)}.kbq-tag .kbq-icon_left{margin-left:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-edit-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag .kbq-tag-edit-input::-ms-clear{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-webkit-search-decoration,.kbq-tag .kbq-tag-edit-input::-webkit-search-cancel-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-decoration{display:none}.kbq-tag .kbq-tag-edit-input{min-width:var(--kbq-size-xs);max-width:100%}.kbq-tag .kbq-tag-edit-input.kbq-input{min-height:unset!important;border-radius:unset!important;padding:unset!important}.kbq-tag .kbq-tag-edit-submit{margin-right:var(--kbq-size-3xs)}.kbq-tag.cdk-drag-placeholder{opacity:var(--kbq-opacity-disabled)}.kbq-tag.cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}.kbq-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"] }]
602
- }], ctorParameters: () => [], propDecorators: { editable: [{
603
- type: Input,
604
- args: [{ transform: booleanAttribute }]
605
- }], preventEditSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventEditSubmit", required: false }] }], editInputElementRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagEditInput), { ...{ read: ElementRef }, isSignal: true }] }], editChange: [{ type: i0.Output, args: ["editChange"] }], textElement: [{
606
- type: ViewChild,
607
- args: ['kbqTitleText']
608
- }], contentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KbqIcon), { isSignal: true }] }], avatar: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagAvatar), { isSignal: true }] }], trailingIcon: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagTrailingIcon), { isSignal: true }] }], removeIcon: [{ type: i0.ContentChild, args: [forwardRef(() => KbqTagRemove), { isSignal: true }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], destroyed: [{ type: i0.Output, args: ["destroyed"] }], removed: [{ type: i0.Output, args: ["removed"] }], selected: [{
609
- type: Input,
610
- args: [{ transform: booleanAttribute }]
611
- }], value: [{
612
- type: Input
613
- }], selectable: [{
614
- type: Input,
615
- args: [{ transform: booleanAttribute }]
616
- }], removable: [{
617
- type: Input,
618
- args: [{ transform: booleanAttribute }]
619
- }], tabindex: [{
620
- type: Input
621
- }], disabled: [{
622
- type: Input,
623
- args: [{ transform: booleanAttribute }]
624
- }] } });
1005
+ }, hostDirectives: [
1006
+ CdkDrag,
1007
+ { directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }
1008
+ ], exportAs: 'kbqTag', styles: ["@charset \"UTF-8\";.kbq-tag{-webkit-user-select:none;user-select:none;position:relative;display:inline-block;max-width:100%;height:var(--kbq-size-xxl);padding:var(--kbq-tag-size-padding-vertical) var(--kbq-tag-size-padding-horizontal);border-radius:4px}@supports (corner-shape: squircle){.kbq-tag{corner-shape:squircle;border-radius:7.4px}}.kbq-tag{cursor:default;outline:none;box-sizing:border-box}.kbq-tag .kbq-icon.kbq-tag-remove{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon.kbq-tag-remove:hover{cursor:pointer}.kbq-tag.kbq-disabled .kbq-icon.kbq-tag-remove:hover{cursor:default}.kbq-tag .kbq-tag__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0 var(--kbq-tag-size-content-gap-horizontal)}.kbq-tag .kbq-tag-prefix{flex-shrink:0;margin-inline-start:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-suffix{flex-shrink:0}.kbq-tag .kbq-tag-suffix:not(.kbq-tag-remove,.kbq-tag-edit-submit){margin-inline-end:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon_left{margin-left:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-edit-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag .kbq-tag-edit-input::-ms-clear{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-webkit-search-decoration,.kbq-tag .kbq-tag-edit-input::-webkit-search-cancel-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-decoration{display:none}.kbq-tag .kbq-tag-edit-input{min-width:var(--kbq-size-xs);max-width:100%}.kbq-tag .kbq-tag-edit-input.kbq-input{min-height:unset!important;border-radius:unset!important;padding:unset!important}.kbq-tag .kbq-tag-edit-submit{margin-right:var(--kbq-size-3xs)}.kbq-tag.cdk-drag-placeholder{opacity:var(--kbq-opacity-disabled)}.kbq-tag.cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}.kbq-tag.cdk-drag-animating.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tag.cdk-drag-animating{animation:none;transition:none}}.kbq-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"] }]
1009
+ }], ctorParameters: () => [], propDecorators: { editableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], preventEditSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventEditSubmit", required: false }] }], editInputElementRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagEditInput), { ...{ read: ElementRef }, isSignal: true }] }], editChange: [{ type: i0.Output, args: ["editChange"] }], textElementQuery: [{ type: i0.ViewChild, args: ['kbqTitleText', { isSignal: true }] }], contentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KbqIcon), { isSignal: true }] }], avatar: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagAvatar), { isSignal: true }] }], trailingIcon: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagTrailingIcon), { isSignal: true }] }], removeIcon: [{ type: i0.ContentChild, args: [forwardRef(() => KbqTagRemove), { isSignal: true }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], destroyed: [{ type: i0.Output, args: ["destroyed"] }], removed: [{ type: i0.Output, args: ["removed"] }], selectedInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], selectableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], removableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], tabindexInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
625
1010
  /**
626
1011
  *
627
1012
  * Example:
@@ -636,6 +1021,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
636
1021
  class KbqTagRemove {
637
1022
  constructor() {
638
1023
  this.parentTag = inject(KbqTag);
1024
+ this.elementRef = inject(ElementRef);
1025
+ this.a11yLocaleConfiguration = kbqInjectA11yLocaleConfiguration();
1026
+ /** Accessible name of the button. Defaults to the localized "Remove". */
1027
+ this.ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
1028
+ /** @docs-private */
1029
+ this.accessibleName = computed(() => this.ariaLabel() || this.a11yLocaleConfiguration().remove, ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
1030
+ /**
1031
+ * Position of the control in the tab order.
1032
+ *
1033
+ * Defaults to `-1`, because in a tag list the tag itself is the tab stop and removal is reached from
1034
+ * there. A tag rendered outside such a list — inside a select's trigger, for one — has to opt into a
1035
+ * tab stop of its own, or the control is left mouse-only.
1036
+ */
1037
+ this.tabIndex = input(-1, { ...(ngDevMode ? { debugName: "tabIndex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
639
1038
  }
640
1039
  /** @docs-private */
641
1040
  focus(event) {
@@ -647,7 +1046,7 @@ class KbqTagRemove {
647
1046
  * @docs-private
648
1047
  */
649
1048
  handleClick(event) {
650
- if (this.parentTag.removable) {
1049
+ if (this.parentTag.canRemove) {
651
1050
  this.parentTag.hasFocus = true;
652
1051
  this.parentTag.remove();
653
1052
  }
@@ -658,24 +1057,41 @@ class KbqTagRemove {
658
1057
  // that the tag is being removed before the event bubbles up.
659
1058
  event.stopPropagation();
660
1059
  }
661
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagRemove, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
662
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqTagRemove, isStandalone: true, selector: "[kbqTagRemove]", host: { listeners: { "click": "handleClick($event)", "focus": "focus($event)" }, properties: { "attr.tabindex": "-1" }, classAttribute: "kbq-tag-remove kbq-tag-trailing-icon" }, ngImport: i0 }); }
1060
+ /**
1061
+ * Activates the button from the keyboard by synthesizing a click, so that a `(click)` listener the
1062
+ * host template put on this very element — the way `KbqSelect` and `KbqTreeSelect` deselect the
1063
+ * option behind the tag — runs as well, and not only `handleClick` below.
1064
+ */
1065
+ handleKeydown(event) {
1066
+ // Space scrolls the page, and both keys are acted on by the tag list and by the select the tag
1067
+ // may be rendered in.
1068
+ event.preventDefault();
1069
+ event.stopPropagation();
1070
+ this.elementRef.nativeElement.click();
1071
+ }
1072
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagRemove, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1073
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqTagRemove, isStandalone: true, selector: "[kbqTagRemove]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "button" }, listeners: { "click": "handleClick($event)", "focus": "focus($event)", "keydown.enter": "handleKeydown($any($event))", "keydown.space": "handleKeydown($any($event))" }, properties: { "attr.aria-label": "accessibleName()", "attr.tabindex": "tabIndex()" }, classAttribute: "kbq-tag-remove kbq-tag-trailing-icon" }, hostDirectives: [{ directive: KbqTagSuffix }], ngImport: i0 }); }
663
1074
  }
664
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagRemove, decorators: [{
1075
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagRemove, decorators: [{
665
1076
  type: Directive,
666
1077
  args: [{
667
1078
  selector: '[kbqTagRemove]',
668
1079
  host: {
669
1080
  class: 'kbq-tag-remove kbq-tag-trailing-icon',
670
- '[attr.tabindex]': '-1',
1081
+ // The trailing icon is an icon-only control: without a role and an accessible name it is announced
1082
+ // as an unlabeled graphic, and with no keys bound it can only ever be operated with a pointer.
1083
+ role: 'button',
1084
+ '[attr.aria-label]': 'accessibleName()',
1085
+ '[attr.tabindex]': 'tabIndex()',
671
1086
  '(click)': 'handleClick($event)',
672
- '(focus)': 'focus($event)'
673
- }
1087
+ '(focus)': 'focus($event)',
1088
+ '(keydown.enter)': 'handleKeydown($any($event))',
1089
+ '(keydown.space)': 'handleKeydown($any($event))'
1090
+ },
1091
+ hostDirectives: [KbqTagSuffix]
674
1092
  }]
675
- }] });
1093
+ }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }] } });
676
1094
 
677
- // Increasing integer for generating unique ids for tag-list components.
678
- let nextUniqueId$1 = 0;
679
1095
  /** Change event object that is emitted when the tag list value has changed. */
680
1096
  class KbqTagListChange {
681
1097
  constructor(source, value) {
@@ -684,14 +1100,6 @@ class KbqTagListChange {
684
1100
  }
685
1101
  }
686
1102
  class KbqTagList {
687
- /**
688
- * Combined stream of all of the child tags' selection change events.
689
- *
690
- * @docs-private
691
- */
692
- get tagSelectionChanges() {
693
- return merge(...this.tags.map((tag) => outputToObservable(tag.selectionChange)));
694
- }
695
1103
  /**
696
1104
  * Combined stream of all of the child tags' focus change events.
697
1105
  *
@@ -738,120 +1146,83 @@ class KbqTagList {
738
1146
  * @docs-private
739
1147
  */
740
1148
  get selected() {
741
- return this.tags.filter(({ selected }) => selected);
1149
+ return this.tags.filter((tag) => tag.selected());
742
1150
  }
743
1151
  /** @docs-private */
744
1152
  get canShowCleaner() {
745
- return !!this.cleaner() && this.tags.length > 0;
746
- }
747
- /**
748
- * Implemented as part of KbqFormFieldControl.
749
- * @docs-private
750
- */
751
- // TODO: Skipped for migration because:
752
- // Accessor inputs cannot be migrated as they are too complex.
753
- get value() {
754
- return this._value;
755
- }
756
- set value(value) {
757
- this._value = value;
758
- }
759
- /**
760
- * Implemented as part of KbqFormFieldControl.
761
- * @docs-private
762
- */
763
- get id() {
764
- return this.tagInput ? this.tagInput.id : this.uid;
1153
+ return !!this.cleaner()?.canShow;
765
1154
  }
766
1155
  /**
767
- * Implemented as part of KbqFormFieldControl.
768
- * @docs-private
769
- */
770
- // TODO: Skipped for migration because:
771
- // Accessor inputs cannot be migrated as they are too complex.
772
- get required() {
773
- return this._required;
774
- }
775
- set required(value) {
776
- this._required = coerceBooleanProperty(value);
777
- this.stateChanges.next();
778
- }
779
- /**
780
- * Implemented as part of KbqFormFieldControl.
1156
+ * Marks the list for a change-detection check.
1157
+ *
1158
+ * Kept for back-compatibility. The cleaner's visibility is derived from signals of the list and its
1159
+ * tags, so the list re-renders on its own and nothing in the library calls this any more.
1160
+ * Kept at the DS-2196 review, like `KbqButtonToggle.markForCheck()`, which the migration guide promises stays.
1161
+ *
781
1162
  * @docs-private
782
1163
  */
783
- // TODO: Skipped for migration because:
784
- // Accessor inputs cannot be migrated as they are too complex.
785
- get placeholder() {
786
- return this.tagInput ? this.tagInput.placeholder : this._placeholder;
787
- }
788
- set placeholder(value) {
789
- this._placeholder = value;
790
- this.stateChanges.next();
791
- }
792
- /** Whether any tags or the kbqTagInput inside of this tag-list has focus. */
793
- get focused() {
794
- return (this.tagInput && this.tagInput.focused) || this.hasFocusedTag();
1164
+ markForCheck() {
1165
+ this.changeDetectorRef.markForCheck();
795
1166
  }
796
1167
  /**
797
- * Implemented as part of KbqFormFieldControl.
1168
+ * Whether the cleaner still has a tag to remove, and so is worth showing at all.
1169
+ *
798
1170
  * @docs-private
799
1171
  */
800
- get empty() {
801
- return (!this.tagInput || this.tagInput.empty) && this.tags.length === 0;
1172
+ get canClear() {
1173
+ const predicate = this.clearPredicate();
1174
+ // Read on every check, so it stops at the first accepted tag rather than building the whole list.
1175
+ return !!this.tags?.some((tag) => this.isClearTarget(tag, predicate));
802
1176
  }
803
- /**
804
- * Implemented as part of KbqFormFieldControl.
805
- * @docs-private
806
- */
807
- get shouldLabelFloat() {
808
- return !this.empty || this.focused;
1177
+ /** Tags the cleaner removes, in render order. */
1178
+ get clearTargets() {
1179
+ const predicate = this.clearPredicate();
1180
+ return this.tags?.filter((tag) => this.isClearTarget(tag, predicate)) ?? [];
809
1181
  }
810
- /**
811
- * Implemented as part of KbqFormFieldControl.
812
- * @docs-private
813
- */
814
- // TODO: Skipped for migration because:
815
- // Accessor inputs cannot be migrated as they are too complex.
816
- get disabled() {
817
- return this.ngControl ? !!this.ngControl.disabled : this._disabled;
1182
+ /** Whether the cleaner removes this tag: the list must allow removal and the predicate must accept it. */
1183
+ isClearTarget(tag, predicate) {
1184
+ return tag.removable() && runClearPredicate(predicate, tag);
818
1185
  }
819
- set disabled(value) {
820
- this._disabled = value;
821
- this.syncDropListDisabledState();
822
- }
823
- // TODO: Skipped for migration because:
824
- // Accessor inputs cannot be migrated as they are too complex.
1186
+ /** Whether the tags in the list can be reordered by dragging. */
825
1187
  get draggable() {
826
- return this._draggable && !this.disabled;
1188
+ return this.draggableState();
827
1189
  }
828
1190
  set draggable(value) {
829
- this._draggable = value;
1191
+ this._draggable.set(value);
830
1192
  this.syncDropListDisabledState();
831
1193
  }
832
- /** Whether the tags in the list are removable. */
833
- // TODO: Skipped for migration because:
834
- // Accessor inputs cannot be migrated as they are too complex.
835
- get removable() {
836
- return this._removable;
837
- }
838
- set removable(value) {
839
- this._removable = value;
840
- this.syncTagsRemovableState();
841
- }
842
1194
  /**
843
1195
  * Tab index of the tag list. This property is ignored when the tag list contains a tag input or is disabled.
844
1196
  *
845
1197
  * @docs-private
846
1198
  */
847
- // TODO: Skipped for migration because:
848
- // Accessor inputs cannot be migrated as they are too complex.
849
1199
  get tabIndex() {
850
- return this.disabled || this.tagInput ? null : this._tabIndex;
1200
+ return this.resolvedTabIndex();
851
1201
  }
852
1202
  set tabIndex(value) {
853
1203
  this.userTabIndex = value;
854
- this._tabIndex = value;
1204
+ this._tabIndex.set(value);
1205
+ }
1206
+ /**
1207
+ * The tag components contained within this tag list.
1208
+ *
1209
+ * @docs-private
1210
+ */
1211
+ get tags() {
1212
+ return this.tagsList();
1213
+ }
1214
+ ngOnChanges(changes) {
1215
+ // A bound input is handed to its member; unbound, it leaves what code wrote.
1216
+ if (changes['draggableInput']) {
1217
+ const draggable = this.draggableInput();
1218
+ if (draggable !== undefined)
1219
+ this.draggable = draggable;
1220
+ }
1221
+ if (changes['tabIndexInput']) {
1222
+ const tabIndex = this.tabIndexInput();
1223
+ if (tabIndex !== undefined)
1224
+ this.tabIndex = tabIndex;
1225
+ }
855
1226
  }
856
1227
  constructor() {
857
1228
  this.elementRef = inject(ElementRef);
@@ -869,23 +1240,74 @@ class KbqTagList {
869
1240
  *
870
1241
  * @docs-private
871
1242
  */
872
- this.controlType = 'tag-list';
1243
+ this.controlType = 'tag-list';
1244
+ this.errorStateTracker = new KbqErrorStateTracker(this.defaultErrorStateMatcher, this.ngControl, this.parentFormGroup, this.parentForm);
1245
+ /** @docs-private */
1246
+ this.valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), alias: 'value' });
1247
+ /**
1248
+ * Implemented as part of KbqFormFieldControl. Set with `[value]`, by the form control and by the rendered
1249
+ * tags.
1250
+ *
1251
+ * @docs-private
1252
+ */
1253
+ this.value = linkedSignal(() => this.valueInput(), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
1254
+ /**
1255
+ * Implemented as part of KbqFormFieldControl.
1256
+ *
1257
+ * @docs-private
1258
+ */
1259
+ this.id = computed(() => this.registeredInput()?.id() ?? this.uid, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
1260
+ /**
1261
+ * Implemented as part of KbqFormFieldControl.
1262
+ *
1263
+ * @docs-private
1264
+ */
1265
+ this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1266
+ /** @docs-private */
1267
+ this.placeholderInput = input(undefined, { ...(ngDevMode ? { debugName: "placeholderInput" } : /* istanbul ignore next */ {}), alias: 'placeholder' });
873
1268
  /**
874
- * Emits whenever the component state changes and should cause the parent
875
- * form-field to update. Implemented as part of `KbqFormFieldControl`.
1269
+ * Implemented as part of KbqFormFieldControl. Taken from the `kbqTagInput` when there is one.
1270
+ *
876
1271
  * @docs-private
877
1272
  */
878
- this.stateChanges = new Subject();
879
- this._required = false;
1273
+ this.placeholder = computed(() => {
1274
+ const tagInput = this.registeredInput();
1275
+ return tagInput ? tagInput.placeholder() : this.placeholderInput();
1276
+ }, ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
1277
+ /** Whether any tags or the kbqTagInput inside of this tag-list has focus. */
1278
+ // Derived from the current tags: one removed while focused fires no blur. Read from the query, as syncing
1279
+ // `tags` emits `changes`, whose subscribers must not run inside a computed.
1280
+ this.focused = computed(() => !!this.registeredInput()?.focused() || this.tagsQuery().some((tag) => tag.hasFocus), ...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
880
1281
  /**
881
1282
  * Implemented as part of KbqFormFieldControl. Forwarded from the registered `kbqTagInput`, which
882
1283
  * is the element the browser actually autofills — the tag list itself is not an input.
883
1284
  *
884
1285
  * @docs-private
885
1286
  */
886
- this.autofilled = computed(() => this.registeredInput()?.autofilled?.() ?? false, ...(ngDevMode ? [{ debugName: "autofilled" }] : []));
887
- this._disabled = false;
888
- this._draggable = false;
1287
+ this.autofilled = computed(() => this.registeredInput()?.autofilled?.() ?? false, ...(ngDevMode ? [{ debugName: "autofilled" }] : /* istanbul ignore next */ []));
1288
+ /**
1289
+ * Implemented as part of KbqFormFieldControl.
1290
+ *
1291
+ * @docs-private
1292
+ */
1293
+ this.empty = computed(() => {
1294
+ const tagInput = this.registeredInput();
1295
+ return (!tagInput || tagInput.empty()) && this.tagsQuery().length === 0;
1296
+ }, ...(ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []));
1297
+ /** @docs-private */
1298
+ this.disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
1299
+ transform: booleanAttribute });
1300
+ /**
1301
+ * Implemented as part of KbqFormFieldControl. Also set by the bound form control.
1302
+ *
1303
+ * @docs-private
1304
+ */
1305
+ this.disabled = linkedSignal(() => this.disabledInput(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
1306
+ this._draggable = signal(false, ...(ngDevMode ? [{ debugName: "_draggable" }] : /* istanbul ignore next */ []));
1307
+ // One signal per host value. The host bindings of every tag list in a view run in that view's reactive consumer,
1308
+ // where a signal read again by another binding costs a scan of everything the view has read.
1309
+ this.draggableState = computed(() => this._draggable() && !this.disabled(), ...(ngDevMode ? [{ debugName: "draggableState" }] : /* istanbul ignore next */ []));
1310
+ this.resolvedTabIndex = computed(() => this.disabled() || this.registeredInput() ? null : this._tabIndex(), ...(ngDevMode ? [{ debugName: "resolvedTabIndex" }] : /* istanbul ignore next */ []));
889
1311
  /**
890
1312
  * Emits when the user drops tag inside tag list container.
891
1313
  */
@@ -894,19 +1316,36 @@ class KbqTagList {
894
1316
  * Whether or not this tag list is selectable. When a tag list is not selectable,
895
1317
  * the selected states for all the tags inside the tag list are always ignored.
896
1318
  */
897
- this.selectable = input(true, ...(ngDevMode ? [{ debugName: "selectable", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
1319
+ this.selectable = input(true, { ...(ngDevMode ? { debugName: "selectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
898
1320
  /** Whether the tags in the list are editable. */
899
- this.editable = input(false, ...(ngDevMode ? [{ debugName: "editable", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
900
- this._removable = true;
901
- this._tabIndex = 0;
1321
+ this.editable = input(false, { ...(ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1322
+ /**
1323
+ * Decides which tags the projected `KbqCleaner` removes: return `true` to clear the tag, `false` to
1324
+ * keep it. Disabled tags are kept by default. Bind a stable reference — a new function on every change
1325
+ * detection re-runs the predicate over every tag.
1326
+ *
1327
+ * A tag the list does not allow to be removed is never offered, whatever the predicate answers.
1328
+ */
1329
+ this.clearPredicate = input((tag) => !tag.disabled, { ...(ngDevMode ? { debugName: "clearPredicate" } : /* istanbul ignore next */ {}), transform: (fn) => {
1330
+ if (typeof fn !== 'function') {
1331
+ throw Error('`clearPredicate` must be a function.');
1332
+ }
1333
+ return fn;
1334
+ } });
1335
+ /** Whether the tags in the list are removable. */
1336
+ // Nothing is pushed onto the tags: each folds this into its own `removable` computed, and a push would
1337
+ // overwrite a tag's own `[removable]="false"`, which Angular never re-writes.
1338
+ this.removable = input(true, { ...(ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1339
+ this._tabIndex = signal(0, ...(ngDevMode ? [{ debugName: "_tabIndex" }] : /* istanbul ignore next */ []));
902
1340
  /**
903
1341
  * Event that emits whenever the raw value of the tag-list changes. This is here primarily
904
1342
  * to facilitate the two-way binding for the `value` input.
1343
+ *
905
1344
  * @docs-private
906
1345
  */
907
1346
  this.valueChange = output();
908
1347
  /** @docs-private */
909
- this.uid = `kbq-tag-list-${nextUniqueId$1++}`;
1348
+ this.uid = inject(_IdGenerator).getId('kbq-tag-list-');
910
1349
  /**
911
1350
  * User defined tab index.
912
1351
  * When it is not null, use user defined tab index. Otherwise use tabIndex
@@ -914,21 +1353,25 @@ class KbqTagList {
914
1353
  * @docs-private
915
1354
  */
916
1355
  this.userTabIndex = null;
1356
+ /** An object used to control when error messages are shown. */
1357
+ this.errorStateMatcher = input(...(ngDevMode ? [undefined, { debugName: "errorStateMatcher" }] : /* istanbul ignore next */ []));
917
1358
  /** Event emitted when the selected tag list value has been changed by the user. */
918
1359
  this.change = output();
919
1360
  /** @docs-private */
920
- this.cleaner = contentChild(KbqCleaner, ...(ngDevMode ? [{ debugName: "cleaner", descendants: false }] : [{ descendants: false }]));
1361
+ this.cleaner = contentChild(KbqCleaner, { ...(ngDevMode ? { debugName: "cleaner" } : /* istanbul ignore next */ {}), descendants: false });
1362
+ this.tagsQuery = contentChildren(forwardRef(() => KbqTag), { ...(ngDevMode ? { debugName: "tagsQuery" } : /* istanbul ignore next */ {}), descendants: true });
1363
+ this.tagsList = kbqQueryListFrom(this.tagsQuery);
921
1364
  /**
922
1365
  * Whether the component is in an error state.
923
1366
  *
924
1367
  * @docs-private
925
1368
  */
926
- this.errorState = false;
1369
+ this.errorState = this.errorStateTracker.errorState;
927
1370
  /**
928
1371
  * The same control as `tagInput`, kept in a signal so `autofilled` can track it reactively —
929
1372
  * `registerInput()` runs after the first read.
930
1373
  */
931
- this.registeredInput = signal(undefined, ...(ngDevMode ? [{ debugName: "registeredInput" }] : []));
1374
+ this.registeredInput = signal(undefined, ...(ngDevMode ? [{ debugName: "registeredInput" }] : /* istanbul ignore next */ []));
932
1375
  /** True when the next `tags.changes` emission is triggered by a UI action, not programmatic update. */
933
1376
  this.pendingUIChange = false;
934
1377
  /** Shared range selection state used by pointer and keyboard interactions. */
@@ -939,9 +1382,19 @@ class KbqTagList {
939
1382
  * appropriate tag that should receive focus until the array of tags updated completely.
940
1383
  */
941
1384
  this.lastDestroyedTagIndex = null;
1385
+ /**
1386
+ * Tags the list has asked the consumer to drop. They stay rendered, and stay in `tags`, until the
1387
+ * consumer's own view is re-checked, so until then they cannot be given focus.
1388
+ */
1389
+ this.pendingRemoval = new Set();
942
1390
  /** Triggers unsubscription from all per-tags streams when tags are reset. */
943
1391
  this.tagsSubscriptions$ = new Subject();
944
1392
  /** @docs-private */
1393
+ this.draggableInput = input(undefined, { ...(ngDevMode ? { debugName: "draggableInput" } : /* istanbul ignore next */ {}), alias: 'draggable',
1394
+ transform: booleanAttribute });
1395
+ /** @docs-private */
1396
+ this.tabIndexInput = input(undefined, { ...(ngDevMode ? { debugName: "tabIndexInput" } : /* istanbul ignore next */ {}), alias: 'tabIndex' });
1397
+ /** @docs-private */
945
1398
  this.onTouched = () => { };
946
1399
  /** @docs-private */
947
1400
  this.onChange = () => { };
@@ -949,6 +1402,11 @@ class KbqTagList {
949
1402
  this.ngControl.valueAccessor = this;
950
1403
  }
951
1404
  this.setupDropListInitialProperties();
1405
+ // A disabled list cannot be reordered.
1406
+ effect(() => {
1407
+ this.disabled();
1408
+ untracked(() => this.syncDropListDisabledState());
1409
+ });
952
1410
  }
953
1411
  ngDoCheck() {
954
1412
  if (this.ngControl) {
@@ -968,22 +1426,13 @@ class KbqTagList {
968
1426
  .pipe(takeUntilDestroyed(this.destroyRef))
969
1427
  .subscribe((dir) => this.keyManager.withHorizontalOrientation(dir));
970
1428
  }
971
- // Prevents the tag list from capturing focus and redirecting
972
- // it back to the first tag when the user tabs out.
973
- this.keyManager.tabOut.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
974
- this._tabIndex = -1;
975
- // Direct DOM write since the binding update is deferred with eventCoalescing.
976
- this.elementRef.nativeElement.tabIndex = -1;
977
- setTimeout(() => {
978
- this._tabIndex = this.userTabIndex || 0;
979
- this.changeDetectorRef.markForCheck();
980
- });
981
- });
1429
+ kbqLeaveTabOrderOnTabOut(this.keyManager.tabOut, this.elementRef.nativeElement, () => this.tabIndex, this.destroyRef);
982
1430
  // When the list changes, re-subscribe
983
1431
  this.tags.changes
984
1432
  .pipe(startWith(null), takeUntilDestroyed(this.destroyRef))
985
1433
  .subscribe((currentTags) => {
986
1434
  this.resetTags();
1435
+ this.pendingRemoval.clear();
987
1436
  if (this.rangeSelection) {
988
1437
  const tags = this.tags.toArray();
989
1438
  if (!tags.includes(this.rangeSelection.anchor) || !tags.includes(this.rangeSelection.activeEnd)) {
@@ -997,7 +1446,6 @@ class KbqTagList {
997
1446
  // Defer setting the value in order to avoid the "Expression
998
1447
  // has changed after it was checked" errors from Angular.
999
1448
  Promise.resolve().then(() => {
1000
- this.stateChanges.next();
1001
1449
  if (currentTags && this.pendingUIChange) {
1002
1450
  this.pendingUIChange = false;
1003
1451
  // The latch can survive a UI action the consumer rejected (nothing was
@@ -1011,25 +1459,21 @@ class KbqTagList {
1011
1459
  });
1012
1460
  });
1013
1461
  }
1462
+ ngAfterContentChecked() {
1463
+ // Syncs the list here so `changes` emits after the projected items are bound and before the host bindings.
1464
+ this.tagsList();
1465
+ }
1014
1466
  ngAfterViewInit() {
1015
1467
  this.setupFocusMonitor();
1016
1468
  }
1017
1469
  ngOnDestroy() {
1018
- this.stateChanges.complete();
1019
1470
  this.focusMonitor.stopMonitoring(this.elementRef);
1020
1471
  this.tagsSubscriptions$.next();
1021
1472
  }
1022
1473
  /** @docs-private */
1023
1474
  updateErrorState() {
1024
- const oldState = this.errorState;
1025
- const parent = this.parentFormGroup || this.parentForm;
1026
- const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;
1027
- const control = this.ngControl ? this.ngControl.control : null;
1028
- const newState = matcher.isErrorState(control, parent);
1029
- if (newState !== oldState) {
1030
- this.errorState = newState;
1031
- this.stateChanges.next();
1032
- }
1475
+ this.errorStateTracker.errorStateMatcher = this.errorStateMatcher();
1476
+ this.errorStateTracker.updateErrorState();
1033
1477
  }
1034
1478
  /** Notifies that the next `tags.changes` emission is UI-initiated. */
1035
1479
  notifyPendingTagChange() {
@@ -1048,7 +1492,7 @@ class KbqTagList {
1048
1492
  * Implemented as part of ControlValueAccessor.
1049
1493
  */
1050
1494
  writeValue(value) {
1051
- this.value = value;
1495
+ this.value.set(value);
1052
1496
  }
1053
1497
  /**
1054
1498
  * Implemented as part of ControlValueAccessor.
@@ -1066,8 +1510,7 @@ class KbqTagList {
1066
1510
  * Implemented as part of ControlValueAccessor.
1067
1511
  */
1068
1512
  setDisabledState(isDisabled) {
1069
- this.disabled = isDisabled;
1070
- this.stateChanges.next();
1513
+ this.disabled.set(isDisabled);
1071
1514
  }
1072
1515
  /**
1073
1516
  * Implemented as part of KbqFormFieldControl.
@@ -1081,18 +1524,26 @@ class KbqTagList {
1081
1524
  * Focuses the tag list. If there is a tag input, focuses that instead.
1082
1525
  */
1083
1526
  focus() {
1084
- if (this.disabled)
1527
+ // Untracked, like the other imperative methods: called from a consumer's `effect()`, the state read on the
1528
+ // way — `disabled`, the tags and their state — would make the effect run again whenever it changes.
1529
+ untracked(() => this.focusFirstTag());
1530
+ }
1531
+ focusFirstTag() {
1532
+ if (this.disabled())
1085
1533
  return;
1086
1534
  if (this.tagInput) {
1087
1535
  this.focusInput();
1088
- this.stateChanges.next();
1089
1536
  return;
1090
1537
  }
1091
- if (this.tags.length > 0) {
1092
- this.keyManager.setFirstItemActive();
1093
- this.stateChanges.next();
1538
+ // `tags` still lists the tags a pending removal has not rendered away yet, so handing focus to one
1539
+ // of those gives it to a view about to be destroyed and it ends up on the body.
1540
+ const index = this.tags?.toArray().findIndex((tag) => !this.pendingRemoval.has(tag) && !tag.disabled) ?? -1;
1541
+ if (index > -1) {
1542
+ this.keyManager.setActiveItem(index);
1094
1543
  return;
1095
1544
  }
1545
+ // Nothing is left to take it, so keep focus on the list rather than lose it to the body.
1546
+ this.elementRef.nativeElement.focus();
1096
1547
  }
1097
1548
  /**
1098
1549
  * Focuses the tag input inside the tag list.
@@ -1112,7 +1563,7 @@ class KbqTagList {
1112
1563
  handleSelectionInteraction(tag, extendRange) {
1113
1564
  const tags = this.tags.toArray();
1114
1565
  const tagIndex = tags.indexOf(tag);
1115
- if (this.disabled || !tag.selectable || tag.disabled || !this.isValidIndex(tagIndex))
1566
+ if (this.disabled() || !tag.selectable() || tag.disabled || !this.isValidIndex(tagIndex))
1116
1567
  return;
1117
1568
  if (extendRange) {
1118
1569
  this.extendSelectionTo(tag);
@@ -1127,7 +1578,7 @@ class KbqTagList {
1127
1578
  */
1128
1579
  keydown(event) {
1129
1580
  const target = event.target;
1130
- if (this.disabled || isNull(target))
1581
+ if (this.disabled() || isNull(target))
1131
1582
  return;
1132
1583
  const shouldSelectAll = this.selectable() && isSelectAll(event);
1133
1584
  const shouldUpdateKeyboardRange = this.selectable() &&
@@ -1140,7 +1591,7 @@ class KbqTagList {
1140
1591
  if (this.isInputEmpty(target)) {
1141
1592
  if (event.keyCode === BACKSPACE ||
1142
1593
  event.keyCode === LEFT_ARROW ||
1143
- (event.keyCode === TAB && event.shiftKey)) {
1594
+ (event.keyCode === TAB$1 && event.shiftKey)) {
1144
1595
  this.keyManager.setLastItemActive();
1145
1596
  event.preventDefault();
1146
1597
  return;
@@ -1182,37 +1633,37 @@ class KbqTagList {
1182
1633
  }
1183
1634
  }
1184
1635
  }
1185
- this.stateChanges.next();
1186
1636
  }
1187
1637
  }
1188
1638
  /** When blurred, mark the field as touched when focus moved outside the tag list. */
1189
1639
  blur() {
1190
- if (!this.hasFocusedTag()) {
1191
- this.keyManager.setActiveItem(-1);
1192
- }
1193
- if (!this.disabled) {
1194
- if (this.tagInput) {
1195
- // If there's a tag input, we should check whether the focus moved to tag input.
1196
- // If the focus is not moved to tag input, mark the field as touched. If the focus moved
1197
- // to tag input, do nothing.
1198
- // Timeout is needed to wait for the focus() event trigger on tag input.
1199
- setTimeout(() => {
1200
- if (!this.focused) {
1201
- this.markAsTouched();
1202
- }
1203
- });
1640
+ untracked(() => {
1641
+ if (!this.hasFocusedTag()) {
1642
+ this.keyManager.setActiveItem(-1);
1204
1643
  }
1205
- else {
1206
- // If there's no tag input, then mark the field as touched.
1207
- this.markAsTouched();
1644
+ if (!this.disabled()) {
1645
+ if (this.tagInput) {
1646
+ // If there's a tag input, we should check whether the focus moved to tag input.
1647
+ // If the focus is not moved to tag input, mark the field as touched. If the focus moved
1648
+ // to tag input, do nothing.
1649
+ // Timeout is needed to wait for the focus() event trigger on tag input.
1650
+ setTimeout(() => {
1651
+ if (!this.focused()) {
1652
+ this.markAsTouched();
1653
+ }
1654
+ });
1655
+ }
1656
+ else {
1657
+ // If there's no tag input, then mark the field as touched.
1658
+ this.markAsTouched();
1659
+ }
1208
1660
  }
1209
- }
1661
+ });
1210
1662
  }
1211
1663
  /** Mark the field as touched */
1212
1664
  markAsTouched() {
1213
1665
  this.onTouched();
1214
1666
  this.changeDetectorRef.markForCheck();
1215
- this.stateChanges.next();
1216
1667
  }
1217
1668
  /**
1218
1669
  * Check the tab index as you should not be allowed to focus an empty list.
@@ -1221,7 +1672,7 @@ class KbqTagList {
1221
1672
  */
1222
1673
  updateTabIndex() {
1223
1674
  // If we have 0 tags, we should not allow keyboard focus
1224
- this._tabIndex = this.userTabIndex || (this.tags.length === 0 ? -1 : 0);
1675
+ this._tabIndex.set(this.userTabIndex || (this.tags.length === 0 ? -1 : 0));
1225
1676
  }
1226
1677
  /**
1227
1678
  * If the amount of tags changed, we need to update the
@@ -1267,7 +1718,7 @@ class KbqTagList {
1267
1718
  this.tags
1268
1719
  .toArray()
1269
1720
  .reverse()
1270
- .find((tag) => tag.selectable && !tag.disabled));
1721
+ .find((tag) => tag.selectable() && !tag.disabled));
1271
1722
  }
1272
1723
  /**
1273
1724
  * Unselects all tags in the list.
@@ -1275,7 +1726,7 @@ class KbqTagList {
1275
1726
  * @docs-private
1276
1727
  */
1277
1728
  unselectAll() {
1278
- this.tags.forEach((tag) => tag.setSelectedState(false));
1729
+ untracked(() => this.tags.forEach((tag) => tag.setSelectedState(false)));
1279
1730
  this.rangeSelection = null;
1280
1731
  }
1281
1732
  /**
@@ -1284,20 +1735,39 @@ class KbqTagList {
1284
1735
  * @docs-private
1285
1736
  */
1286
1737
  removeSelected() {
1287
- this.selected.forEach((tag) => tag.remove());
1738
+ untracked(() => this.selected.filter((tag) => tag.canRemove).forEach((tag) => tag.remove()));
1739
+ }
1740
+ /**
1741
+ * Removes the tags `clearPredicate` accepts, which by default leaves the disabled ones in place.
1742
+ *
1743
+ * The tags belong to the consumer, so each one is asked to go through its `removed` output, the same
1744
+ * output the remove control reports to. Unlike that control it will ask for a disabled tag too, when
1745
+ * the predicate accepts one.
1746
+ *
1747
+ * @docs-private
1748
+ */
1749
+ clear() {
1750
+ const targets = untracked(() => this.clearTargets);
1751
+ targets.forEach((tag) => this.pendingRemoval.add(tag));
1752
+ // `KbqCleaner` restores focus to the control right after this, and the autocomplete must not read
1753
+ // that as the user asking for the option list.
1754
+ this.tagInput?.suppressAutocompleteOnNextFocus?.();
1755
+ // Last to first: every handler runs before anything re-renders, so removing by position would see
1756
+ // the indices ahead of it shift if we went the other way.
1757
+ targets.reverse().forEach((tag) => tag.remove());
1288
1758
  }
1289
1759
  /** Whether the rendered tags no longer match the value this control last reported. */
1290
1760
  hasTagsValueChanged() {
1291
1761
  const currentValue = this.tags.map(({ value }) => value);
1292
- if (!Array.isArray(this._value)) {
1762
+ const value = this.value();
1763
+ if (!Array.isArray(value)) {
1293
1764
  return currentValue.length > 0;
1294
1765
  }
1295
- return (this._value.length !== currentValue.length ||
1296
- currentValue.some((value, index) => value !== this._value[index]));
1766
+ return value.length !== currentValue.length || currentValue.some((item, index) => item !== value[index]);
1297
1767
  }
1298
1768
  propagateTagsChanges() {
1299
1769
  const valueToEmit = this.tags.map((tag) => tag.value);
1300
- this._value = valueToEmit;
1770
+ this.value.set(valueToEmit);
1301
1771
  this.change.emit(new KbqTagListChange(this, valueToEmit));
1302
1772
  this.valueChange.emit(valueToEmit);
1303
1773
  this.onChange(valueToEmit);
@@ -1317,22 +1787,16 @@ class KbqTagList {
1317
1787
  this.keyManager.setFocusOrigin(origin);
1318
1788
  this.keyManager.updateActiveItem(tagIndex);
1319
1789
  }
1320
- this.stateChanges.next();
1321
- });
1322
- this.tagBlurChanges.pipe(takeUntil(this.tagsSubscriptions$)).subscribe(() => {
1323
- this.blur();
1324
- this.stateChanges.next();
1325
1790
  });
1791
+ this.tagBlurChanges.pipe(takeUntil(this.tagsSubscriptions$)).subscribe(() => this.blur());
1326
1792
  }
1327
1793
  listenToTagsRemoved() {
1328
- this.tagRemoveChanges.pipe(takeUntil(this.tagsSubscriptions$)).subscribe((event) => {
1329
- const tag = event.tag;
1330
- const tagIndex = this.tags.toArray().indexOf(event.tag);
1794
+ this.tagRemoveChanges.pipe(takeUntil(this.tagsSubscriptions$)).subscribe(({ tag }) => {
1331
1795
  // In case the tag that will be removed is currently focused, we temporarily store
1332
1796
  // the index in order to be able to determine an appropriate sibling tag that will
1333
- // receive focus.
1334
- if (this.isValidIndex(tagIndex) && tag.hasFocus) {
1335
- this.lastDestroyedTagIndex = tagIndex;
1797
+ // receive focus. Taken from the key manager: `tags` no longer holds a destroyed tag.
1798
+ if (tag.hasFocus && this.keyManager.activeItem === tag) {
1799
+ this.lastDestroyedTagIndex = this.keyManager.activeItemIndex;
1336
1800
  }
1337
1801
  });
1338
1802
  // Set the pending flag so the subsequent `tags.changes` is treated as UI action.
@@ -1349,9 +1813,6 @@ class KbqTagList {
1349
1813
  hasFocusedTag() {
1350
1814
  return this.tags.some((tag) => tag.hasFocus);
1351
1815
  }
1352
- syncTagsRemovableState() {
1353
- this.tags?.forEach((tag) => (tag.removable = this.removable));
1354
- }
1355
1816
  setupDropListInitialProperties() {
1356
1817
  this.syncDropListDisabledState();
1357
1818
  this.dropList.elementContainerSelector = '.kbq-tags-list__list-container';
@@ -1395,7 +1856,7 @@ class KbqTagList {
1395
1856
  const fromIndex = Math.min(anchorIndex, activeEndIndex);
1396
1857
  const toIndex = Math.max(anchorIndex, activeEndIndex);
1397
1858
  tags.forEach((tag, index) => {
1398
- if (tag.disabled || !tag.selectable)
1859
+ if (tag.disabled || !tag.selectable())
1399
1860
  return;
1400
1861
  const belongsToRange = index >= fromIndex && index <= toIndex;
1401
1862
  const belongedToPreviousRange = index >= previousFromIndex && index <= previousToIndex;
@@ -1408,12 +1869,21 @@ class KbqTagList {
1408
1869
  setRangeOrigin(anchor) {
1409
1870
  this.rangeSelection = anchor ? { anchor, activeEnd: anchor } : null;
1410
1871
  }
1411
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1412
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqTagList, isStandalone: true, selector: "kbq-tag-list", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { dropped: "dropped", valueChange: "valueChange", change: "change" }, host: { listeners: { "focus": "focus()", "blur": "blur()", "keydown": "keydown($event)" }, properties: { "class.kbq-disabled": "disabled", "class.kbq-invalid": "errorState", "class.kbq-tag-list_selectable": "selectable()", "class.kbq-tag-list_editable": "editable()", "class.kbq-tag-list_removable": "removable", "class.kbq-tag-list_draggable": "draggable", "attr.tabindex": "tabIndex", "id": "uid" }, classAttribute: "kbq-tag-list" }, providers: [
1872
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1873
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqTagList, isStandalone: true, selector: "kbq-tag-list", inputs: { valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, placeholderInput: { classPropertyName: "placeholderInput", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, clearPredicate: { classPropertyName: "clearPredicate", publicName: "clearPredicate", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null }, draggableInput: { classPropertyName: "draggableInput", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, tabIndexInput: { classPropertyName: "tabIndexInput", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dropped: "dropped", valueChange: "valueChange", change: "change" }, host: { listeners: { "focus": "focus()", "blur": "blur()", "keydown": "keydown($event)" }, properties: { "class.kbq-disabled": "disabled()", "class.kbq-invalid": "errorState()", "class.kbq-tag-list_selectable": "selectable()", "class.kbq-tag-list_editable": "editable()", "class.kbq-tag-list_removable": "removable()", "class.kbq-tag-list_draggable": "draggable", "attr.tabindex": "tabIndex", "id": "uid" }, classAttribute: "kbq-tag-list" }, providers: [
1413
1874
  { provide: KbqFormFieldControl, useExisting: KbqTagList },
1414
- // Tag-list cleaners use consumer-provided click handlers; do not also reset the outer form control.
1415
- { provide: KBQ_CLEANER_CONTEXT, useValue: null }
1416
- ], queries: [{ propertyName: "cleaner", first: true, predicate: KbqCleaner, isSignal: true }, { propertyName: "tags", predicate: i0.forwardRef(() => KbqTag), descendants: true }], exportAs: ["kbqTagList"], hostDirectives: [{ directive: i2.CdkDropList }], ngImport: i0, template: `
1875
+ kbqCleanerFactoryProvider((() => {
1876
+ const tagList = inject(KbqTagList);
1877
+ return {
1878
+ get control() {
1879
+ return tagList;
1880
+ },
1881
+ clearByEscape: false,
1882
+ clear: (() => tagList.clear()),
1883
+ canClear: (() => tagList.canClear)
1884
+ };
1885
+ }))
1886
+ ], queries: [{ propertyName: "cleaner", first: true, predicate: KbqCleaner, isSignal: true }, { propertyName: "tagsQuery", predicate: i0.forwardRef(() => KbqTag), descendants: true, isSignal: true }], exportAs: ["kbqTagList"], usesOnChanges: true, hostDirectives: [{ directive: i2.CdkDropList }], ngImport: i0, template: `
1417
1887
  <div class="kbq-tags-list__list-container">
1418
1888
  <ng-content />
1419
1889
  </div>
@@ -1423,9 +1893,9 @@ class KbqTagList {
1423
1893
  <ng-content select="kbq-cleaner" />
1424
1894
  </div>
1425
1895
  }
1426
- `, isInline: true, styles: [".kbq-tag-list{display:flex;flex-direction:row;min-height:var(--kbq-size-xxl);box-sizing:border-box}.kbq-tag-list:focus-visible{outline:none}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}.kbq-tag-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag-input::-ms-clear{display:none;width:0;height:0}.kbq-tag-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag-input::-webkit-search-decoration,.kbq-tag-input::-webkit-search-cancel-button,.kbq-tag-input::-webkit-search-results-button,.kbq-tag-input::-webkit-search-results-decoration{display:none}.kbq-tag-input{padding-top:var(--kbq-tag-size-padding-vertical);padding-bottom:var(--kbq-tag-size-padding-vertical);padding-left:var(--kbq-size-xxs);padding-right:unset;min-width:var(--kbq-size-3xl);max-width:100%;flex-grow:1}.kbq-tag-input.kbq-input{--kbq-input-size-padding-vertical: 0;--kbq-form-field-size-border-radius: 0;padding-left:var(--kbq-size-xxs);min-height:unset!important;width:auto}.kbq-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;box-sizing:border-box;min-width:0;gap:var(--kbq-tag-list-size-content-gap)}.kbq-tags-list__list-container .kbq-tag-input:first-child{padding-left:var(--kbq-size-s)}.kbq-tags-list__cleaner .kbq-cleaner{max-height:24px}.kbq-form-field-type-tag-list .kbq-form-field__container{padding-top:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width));padding-bottom:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width))}body:has(.kbq-tag-list.cdk-drop-list-dragging){cursor:grabbing}\n", ".kbq-tag,.kbq-tag-list,.kbq-tag-input{--kbq-tag-list-size-content-gap: var(--kbq-size-xxs);--kbq-tag-size-padding-horizontal: var(--kbq-size-xxs);--kbq-tag-size-padding-vertical: var(--kbq-size-3xs);--kbq-tag-size-content-gap-horizontal: var(--kbq-size-3xs);--kbq-tag-size-icon-margin-left: var(--kbq-size-3xs);--kbq-tag-size-close-button-margin-right: var(--kbq-size-3xs);--kbq-tag-theme-fade-on-default-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-default-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-default-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-default-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-background: var(--kbq-states-background-theme-fade-hover);--kbq-tag-theme-fade-on-states-hover-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-hover-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-states-focus-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-focus-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-theme-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-theme-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-theme-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-theme-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-theme-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-theme-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-default-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-default-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-default-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-default-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-background: var(--kbq-states-background-contrast-fade-hover);--kbq-tag-contrast-fade-on-states-hover-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-hover-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-focus-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-contrast-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-contrast-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-contrast-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-contrast-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-contrast-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-default-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-default-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-default-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-default-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-tag-error-fade-on-states-hover-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-hover-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-states-focus-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-focus-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-outline: var(--kbq-states-line-focus-error);--kbq-tag-error-fade-on-states-selected-background: var(--kbq-background-error);--kbq-tag-error-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-error-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-error-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-error-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-default-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-default-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-default-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-default-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-background: var(--kbq-states-background-warning-fade-hover);--kbq-tag-warning-fade-states-hover-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-hover-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-states-focus-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-focus-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-warning-fade-states-selected-background: var(--kbq-background-warning);--kbq-tag-warning-fade-states-selected-text: var(--kbq-foreground-contrast);--kbq-tag-warning-fade-states-selected-icon: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-selected-close-button: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-warning-fade-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-warning-fade-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-states-disabled-close-button: var(--kbq-states-icon-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1896
+ `, isInline: true, styles: ["@charset \"UTF-8\";.kbq-tag-list{display:flex;flex-direction:row;min-height:var(--kbq-size-xxl);box-sizing:border-box}.kbq-tag-list:focus-visible{outline:none}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{animation:none;transition:none}}.kbq-tag-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag-input::-ms-clear{display:none;width:0;height:0}.kbq-tag-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag-input::-webkit-search-decoration,.kbq-tag-input::-webkit-search-cancel-button,.kbq-tag-input::-webkit-search-results-button,.kbq-tag-input::-webkit-search-results-decoration{display:none}.kbq-tag-input{padding-top:var(--kbq-tag-size-padding-vertical);padding-bottom:var(--kbq-tag-size-padding-vertical);padding-left:var(--kbq-size-xxs);padding-right:unset;min-width:var(--kbq-size-3xl);max-width:100%;flex-grow:1}.kbq-tag-input.kbq-input{--kbq-input-size-padding-vertical: 0;--kbq-form-field-size-border-radius: 0;padding-left:var(--kbq-size-xxs);min-height:unset!important;width:auto}.kbq-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;box-sizing:border-box;min-width:0;gap:var(--kbq-tag-list-size-content-gap)}.kbq-tags-list__list-container .kbq-tag-input:first-child{padding-left:var(--kbq-size-s)}.kbq-tags-list__cleaner .kbq-cleaner{max-height:24px}.kbq-form-field-type-tag-list .kbq-form-field__container{padding-top:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width));padding-bottom:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width))}body:has(.kbq-tag-list.cdk-drop-list-dragging){cursor:grabbing}\n", ".kbq-tag,.kbq-tag-list,.kbq-tag-input{--kbq-tag-list-size-content-gap: var(--kbq-size-xxs);--kbq-tag-size-padding-horizontal: var(--kbq-size-xxs);--kbq-tag-size-padding-vertical: var(--kbq-size-3xs);--kbq-tag-size-content-gap-horizontal: var(--kbq-size-3xs);--kbq-tag-size-icon-margin-left: var(--kbq-size-3xs);--kbq-tag-size-close-button-margin-right: var(--kbq-size-3xs);--kbq-tag-theme-fade-on-default-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-default-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-default-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-default-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-background: var(--kbq-states-background-theme-fade-hover);--kbq-tag-theme-fade-on-states-hover-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-hover-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-states-focus-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-focus-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-theme-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-theme-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-theme-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-theme-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-theme-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-theme-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-default-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-default-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-default-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-default-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-background: var(--kbq-states-background-contrast-fade-hover);--kbq-tag-contrast-fade-on-states-hover-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-hover-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-focus-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-contrast-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-contrast-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-contrast-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-contrast-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-contrast-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-default-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-default-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-default-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-default-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-tag-error-fade-on-states-hover-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-hover-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-states-focus-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-focus-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-outline: var(--kbq-states-line-focus-error);--kbq-tag-error-fade-on-states-selected-background: var(--kbq-background-error);--kbq-tag-error-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-error-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-error-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-error-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-default-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-default-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-default-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-default-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-background: var(--kbq-states-background-warning-fade-hover);--kbq-tag-warning-fade-states-hover-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-hover-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-states-focus-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-focus-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-warning-fade-states-selected-background: var(--kbq-background-warning);--kbq-tag-warning-fade-states-selected-text: var(--kbq-foreground-contrast);--kbq-tag-warning-fade-states-selected-icon: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-selected-close-button: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-warning-fade-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-warning-fade-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-states-disabled-close-button: var(--kbq-states-icon-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1427
1897
  }
1428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagList, decorators: [{
1898
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagList, decorators: [{
1429
1899
  type: Component,
1430
1900
  args: [{ selector: 'kbq-tag-list', template: `
1431
1901
  <div class="kbq-tags-list__list-container">
@@ -1439,364 +1909,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
1439
1909
  }
1440
1910
  `, providers: [
1441
1911
  { provide: KbqFormFieldControl, useExisting: KbqTagList },
1442
- // Tag-list cleaners use consumer-provided click handlers; do not also reset the outer form control.
1443
- { provide: KBQ_CLEANER_CONTEXT, useValue: null }
1912
+ kbqCleanerFactoryProvider((() => {
1913
+ const tagList = inject(KbqTagList);
1914
+ return {
1915
+ get control() {
1916
+ return tagList;
1917
+ },
1918
+ clearByEscape: false,
1919
+ clear: (() => tagList.clear()),
1920
+ canClear: (() => tagList.canClear)
1921
+ };
1922
+ }))
1444
1923
  ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
1445
1924
  class: 'kbq-tag-list',
1446
- '[class.kbq-disabled]': 'disabled',
1447
- '[class.kbq-invalid]': 'errorState',
1925
+ '[class.kbq-disabled]': 'disabled()',
1926
+ '[class.kbq-invalid]': 'errorState()',
1448
1927
  '[class.kbq-tag-list_selectable]': 'selectable()',
1449
1928
  '[class.kbq-tag-list_editable]': 'editable()',
1450
- '[class.kbq-tag-list_removable]': 'removable',
1929
+ '[class.kbq-tag-list_removable]': 'removable()',
1451
1930
  '[class.kbq-tag-list_draggable]': 'draggable',
1452
1931
  '[attr.tabindex]': 'tabIndex',
1453
1932
  '[id]': 'uid',
1454
1933
  '(focus)': 'focus()',
1455
1934
  '(blur)': 'blur()',
1456
1935
  '(keydown)': 'keydown($event)'
1457
- }, hostDirectives: [CdkDropList], exportAs: 'kbqTagList', styles: [".kbq-tag-list{display:flex;flex-direction:row;min-height:var(--kbq-size-xxl);box-sizing:border-box}.kbq-tag-list:focus-visible{outline:none}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}.kbq-tag-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag-input::-ms-clear{display:none;width:0;height:0}.kbq-tag-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag-input::-webkit-search-decoration,.kbq-tag-input::-webkit-search-cancel-button,.kbq-tag-input::-webkit-search-results-button,.kbq-tag-input::-webkit-search-results-decoration{display:none}.kbq-tag-input{padding-top:var(--kbq-tag-size-padding-vertical);padding-bottom:var(--kbq-tag-size-padding-vertical);padding-left:var(--kbq-size-xxs);padding-right:unset;min-width:var(--kbq-size-3xl);max-width:100%;flex-grow:1}.kbq-tag-input.kbq-input{--kbq-input-size-padding-vertical: 0;--kbq-form-field-size-border-radius: 0;padding-left:var(--kbq-size-xxs);min-height:unset!important;width:auto}.kbq-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;box-sizing:border-box;min-width:0;gap:var(--kbq-tag-list-size-content-gap)}.kbq-tags-list__list-container .kbq-tag-input:first-child{padding-left:var(--kbq-size-s)}.kbq-tags-list__cleaner .kbq-cleaner{max-height:24px}.kbq-form-field-type-tag-list .kbq-form-field__container{padding-top:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width));padding-bottom:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width))}body:has(.kbq-tag-list.cdk-drop-list-dragging){cursor:grabbing}\n", ".kbq-tag,.kbq-tag-list,.kbq-tag-input{--kbq-tag-list-size-content-gap: var(--kbq-size-xxs);--kbq-tag-size-padding-horizontal: var(--kbq-size-xxs);--kbq-tag-size-padding-vertical: var(--kbq-size-3xs);--kbq-tag-size-content-gap-horizontal: var(--kbq-size-3xs);--kbq-tag-size-icon-margin-left: var(--kbq-size-3xs);--kbq-tag-size-close-button-margin-right: var(--kbq-size-3xs);--kbq-tag-theme-fade-on-default-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-default-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-default-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-default-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-background: var(--kbq-states-background-theme-fade-hover);--kbq-tag-theme-fade-on-states-hover-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-hover-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-states-focus-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-focus-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-theme-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-theme-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-theme-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-theme-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-theme-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-theme-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-default-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-default-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-default-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-default-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-background: var(--kbq-states-background-contrast-fade-hover);--kbq-tag-contrast-fade-on-states-hover-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-hover-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-focus-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-contrast-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-contrast-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-contrast-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-contrast-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-contrast-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-default-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-default-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-default-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-default-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-tag-error-fade-on-states-hover-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-hover-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-states-focus-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-focus-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-outline: var(--kbq-states-line-focus-error);--kbq-tag-error-fade-on-states-selected-background: var(--kbq-background-error);--kbq-tag-error-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-error-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-error-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-error-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-default-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-default-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-default-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-default-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-background: var(--kbq-states-background-warning-fade-hover);--kbq-tag-warning-fade-states-hover-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-hover-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-states-focus-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-focus-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-warning-fade-states-selected-background: var(--kbq-background-warning);--kbq-tag-warning-fade-states-selected-text: var(--kbq-foreground-contrast);--kbq-tag-warning-fade-states-selected-icon: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-selected-close-button: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-warning-fade-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-warning-fade-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-states-disabled-close-button: var(--kbq-states-icon-disabled)}\n"] }]
1458
- }], ctorParameters: () => [], propDecorators: { value: [{
1459
- type: Input
1460
- }], required: [{
1461
- type: Input
1462
- }], placeholder: [{
1463
- type: Input
1464
- }], disabled: [{
1465
- type: Input,
1466
- args: [{ transform: booleanAttribute }]
1467
- }], draggable: [{
1468
- type: Input,
1469
- args: [{ transform: booleanAttribute }]
1470
- }], dropped: [{ type: i0.Output, args: ["dropped"] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], removable: [{
1471
- type: Input,
1472
- args: [{ transform: booleanAttribute }]
1473
- }], tabIndex: [{
1474
- type: Input
1475
- }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], errorStateMatcher: [{
1476
- type: Input
1477
- }], change: [{ type: i0.Output, args: ["change"] }], cleaner: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqCleaner), { ...{ descendants: false }, isSignal: true }] }], tags: [{
1478
- type: ContentChildren,
1479
- args: [forwardRef(() => KbqTag), {
1480
- // Need to use `descendants: true`,
1481
- // Ivy will no longer match indirect descendants if it's left as false.
1482
- descendants: true
1483
- }]
1484
- }] } });
1485
-
1486
- const KBQ_TAG_INPUT_DEFAULT_SEPARATORS = [
1487
- { symbol: /\r?\n/, key: 'Enter', keyCode: ENTER$1 },
1488
- { symbol: /\t/, key: 'Tab', keyCode: TAB$1 },
1489
- { symbol: / /, key: ' ', keyCode: SPACE$1 },
1490
- { symbol: /,/, key: ',', keyCode: COMMA },
1491
- { symbol: /;/, key: ';', keyCode: SEMICOLON }
1492
- ];
1493
- const KBQ_TAGS_DEFAULT_OPTIONS_CONFIG = { separatorKeyCodes: [ENTER$1] };
1494
- /** Injection token to be used to override the default options. */
1495
- const KBQ_TAGS_DEFAULT_OPTIONS = new InjectionToken('kbq-tags-default-options', {
1496
- providedIn: 'root',
1497
- factory: () => KBQ_TAGS_DEFAULT_OPTIONS_CONFIG
1498
- });
1499
- /** Utility provider for `KBQ_TAGS_DEFAULT_OPTIONS`. */
1500
- const kbqTagsDefaultOptionsProvider = (options) => ({
1501
- provide: KBQ_TAGS_DEFAULT_OPTIONS,
1502
- useValue: { ...KBQ_TAGS_DEFAULT_OPTIONS_CONFIG, ...options }
1503
- });
1504
- // Increasing integer for generating unique ids.
1505
- let nextUniqueId = 0;
1506
- /**
1507
- * Directive that adds tag-specific behaviors to an input element inside `<kbq-form-field>`.
1508
- * May be placed inside or outside of an `<kbq-tag-list>`.
1509
- */
1510
- class KbqTagInput {
1511
- /**
1512
- * The list of key codes that will trigger a tagEnd event.
1513
- *
1514
- * Defaults to `[ENTER]`.
1515
- */
1516
- // TODO: Skipped for migration because:
1517
- // Accessor inputs cannot be migrated as they are too complex.
1518
- set separatorKeyCodes(value) {
1519
- this._separatorKeyCodes = value || [];
1520
- }
1521
- /**
1522
- * The effective set of separators: entries gated by `keyCode` are included only when that
1523
- * code is present in `separatorKeyCodes`; entries without a `keyCode` (no single-keystroke
1524
- * equivalent, e.g. a run of whitespace) are always included.
1525
- * @docs-private
1526
- */
1527
- get separators() {
1528
- return this._separators.filter((separator) => separator.keyCode === undefined || this._separatorKeyCodes.includes(separator.keyCode));
1529
- }
1530
- /** Register input for tag list */
1531
- // TODO: Skipped for migration because:
1532
- // Accessor inputs cannot be migrated as they are too complex.
1533
- set tagList(value) {
1534
- if (value) {
1535
- this._tagList = value;
1536
- this._tagList.registerInput(this);
1537
- }
1538
- }
1539
- /**
1540
- * Whether or not the tagEnd event will be emitted when the input is blurred.
1541
- */
1542
- // TODO: Skipped for migration because:
1543
- // Accessor inputs cannot be migrated as they are too complex.
1544
- get addOnBlur() {
1545
- return this._addOnBlur;
1546
- }
1547
- set addOnBlur(value) {
1548
- this._addOnBlur = coerceBooleanProperty(value);
1549
- }
1550
- /** Whether the input is disabled. */
1551
- // TODO: Skipped for migration because:
1552
- // Accessor inputs cannot be migrated as they are too complex.
1553
- get disabled() {
1554
- return this._disabled || (this._tagList && this._tagList.disabled);
1555
- }
1556
- set disabled(value) {
1557
- this._disabled = coerceBooleanProperty(value);
1558
- }
1559
- /** Whether the input is empty. */
1560
- get empty() {
1561
- return !this.inputElement.value;
1562
- }
1563
- constructor() {
1564
- this.elementRef = inject(ElementRef);
1565
- this.defaultOptions = inject(KBQ_TAGS_DEFAULT_OPTIONS);
1566
- this.trimDirective = inject(KbqTrim, { optional: true, self: true });
1567
- /**
1568
- * The form control instance bound to the input, if any.
1569
- *
1570
- * @deprecated Read only, and unused by the library: validation lives on the `<kbq-tag-list>`
1571
- * control. Binding `[formControl]`/`[ngModel]` to the input itself stays supported — it is what
1572
- * `kbqAutocomplete` drives the input through — only its validators are not consulted.
1573
- * Will be removed in a future major release.
1574
- * @docs-private
1575
- */
1576
- this.ngControl = inject(NgControl, { optional: true, self: true });
1577
- /**
1578
- * The autocomplete trigger attached to the input, if any.
1579
- * @docs-private
1580
- */
1581
- this.autocompleteTrigger = inject(KbqAutocompleteTrigger, { optional: true, self: true });
1582
- /**
1583
- * Whether the control is focused.
1584
- * @docs-private
1585
- */
1586
- this.focused = false;
1587
- /** Whether the control's value was filled in by the browser. */
1588
- this.autofilled = kbqInjectAutofilled();
1589
- this._separatorKeyCodes = this.defaultOptions.separatorKeyCodes;
1590
- this._separators = this.defaultOptions.separators || KBQ_TAG_INPUT_DEFAULT_SEPARATORS;
1591
- /** Emitted when a tag is to be added. */
1592
- this.tagEnd = output({ alias: 'kbqTagInputTokenEnd' });
1593
- /** A value indicating whether allow/prevent tags duplication */
1594
- this.distinct = input(false, ...(ngDevMode ? [{ debugName: "distinct" }] : []));
1595
- /** The input's placeholder text. */
1596
- // TODO: Skipped for migration because:
1597
- // This input overrides a field from a superclass, while the superclass field
1598
- // is not migrated.
1599
- this.placeholder = '';
1600
- /** Unique id for the input. */
1601
- // TODO: Skipped for migration because:
1602
- // This input overrides a field from a superclass, while the superclass field
1603
- // is not migrated.
1604
- this.id = `kbq-tag-list-input-${nextUniqueId++}`;
1605
- this._addOnBlur = true;
1606
- /**
1607
- * Whether the tagEnd event will be emitted when the text pasted.
1608
- * @default true
1609
- */
1610
- this.addOnPaste = input(this.defaultOptions.addOnPaste ?? true, ...(ngDevMode ? [{ debugName: "addOnPaste", alias: 'kbqTagInputAddOnPaste',
1611
- transform: booleanAttribute }] : [{
1612
- alias: 'kbqTagInputAddOnPaste',
1613
- transform: booleanAttribute
1614
- }]));
1615
- this._disabled = false;
1616
- this.inputElement = this.elementRef.nativeElement;
1617
- }
1618
- ngOnChanges() {
1619
- this._tagList.stateChanges.next();
1620
- }
1621
- /** @docs-private */
1622
- onKeydown(event) {
1623
- const isSeparatorKey = this.matchesInputSeparator(event);
1624
- if (!this.inputElement.value) {
1625
- if (isSeparatorKey && event.keyCode !== TAB$1) {
1626
- event.preventDefault();
1627
- }
1628
- this._tagList.keydown(event);
1629
- event.stopPropagation();
1630
- return;
1631
- }
1632
- if (isSeparatorKey) {
1633
- if (event.keyCode === ENTER$1 &&
1634
- this.autocompleteTrigger?.panelOpen &&
1635
- this.autocompleteTrigger?.activeOption) {
1636
- return;
1637
- }
1638
- this.emitTagEnd();
1639
- event.preventDefault();
1640
- }
1641
- }
1642
- /**
1643
- * Checks to see if the blur should emit the (tagEnd) event.
1644
- * @docs-private
1645
- */
1646
- blur(event) {
1647
- this.focused = false;
1648
- // Blur the tag list if it is not focused
1649
- if (!this._tagList.focused) {
1650
- this._tagList.blur();
1651
- }
1652
- // Chromium fires `blur` synchronously when the input becomes disabled, so without this
1653
- // guard disabling a focused tag input would append whatever was typed.
1654
- if (!this.disabled && this.addOnBlur && (this.autocompleteTrigger?.onInputBlur()(event) ?? true)) {
1655
- this.emitTagEnd();
1656
- }
1657
- this._tagList.stateChanges.next();
1658
- }
1659
- /**
1660
- * @deprecated No-op. Validation belongs to the `<kbq-tag-list>` form control, which
1661
- * revalidates itself whenever its value changes. Will be removed in a future major release.
1662
- * @docs-private
1663
- */
1664
- triggerValidation() { }
1665
- /**
1666
- * Checks to see if the (tagEnd) event needs to be emitted.
1667
- * @docs-private
1668
- */
1669
- emitTagEnd() {
1670
- this.addTag(this.trimValue(this.inputElement.value), this.existingTagValues());
1671
- }
1672
- /**
1673
- * Whether the current input value duplicates an existing tag.
1674
- * @docs-private
1675
- */
1676
- get hasDuplicates() {
1677
- return this.tagValues().has(this.trimValue(this.inputElement.value));
1678
- }
1679
- /** @docs-private */
1680
- onInput() {
1681
- // Let tag list know whenever the value changes.
1682
- this._tagList.stateChanges.next();
1683
- }
1684
- /** @docs-private */
1685
- onPaste($event) {
1686
- if (!$event.clipboardData) {
1687
- return;
1688
- }
1689
- const data = $event.clipboardData.getData('text');
1690
- if (!data || !this.addOnPaste()) {
1691
- return;
1692
- }
1693
- const separatorsInString = this.getPasteSeparatorPatterns(data);
1694
- // prettier-ignore
1695
- const dividedString = separatorsInString.length > 0 ?
1696
- [...data.split(new RegExp(`${separatorsInString.join('|')}`))] :
1697
- [data];
1698
- // Built once per paste, then updated as items are accepted, so a batch also dedupes
1699
- // against itself — `tags` is a QueryList that cannot refresh between iterations.
1700
- const existingValues = this.existingTagValues();
1701
- dividedString.forEach((item) => this.addTag(this.trimValue(item), existingValues));
1702
- $event.preventDefault();
1703
- $event.stopPropagation();
1704
- }
1705
- /** @docs-private */
1706
- onFocus() {
1707
- this.focused = true;
1708
- this._tagList.unselectAll();
1709
- this._tagList.stateChanges.next();
1710
- }
1711
- /** Focuses the input. */
1712
- focus() {
1713
- this.inputElement.focus();
1714
- }
1715
- getPasteSeparatorPatterns(value) {
1716
- return this.separators
1717
- .filter((separator) => (!separator.appliesTo || separator.appliesTo.includes('paste')) &&
1718
- value.search(separator.symbol) > -1)
1719
- .map((separator) => separator.symbol.source);
1720
- }
1721
- /**
1722
- * Single path for adding a tag, shared by typed input, blur and paste.
1723
- * `existingValues` is `null` unless `distinct` is on, and is mutated as values are accepted.
1724
- */
1725
- addTag(value, existingValues) {
1726
- if (existingValues) {
1727
- if (existingValues.has(value))
1728
- return;
1729
- existingValues.add(value);
1730
- }
1731
- // An empty value adds nothing, so latching the flag here would make the next
1732
- // programmatic tags update look UI-initiated.
1733
- if (value) {
1734
- this._tagList?.notifyPendingTagChange();
1735
- }
1736
- this.tagEnd.emit({ input: this.inputElement, value });
1737
- }
1738
- /** Values to dedupe against, or `null` when duplicates are allowed. */
1739
- existingTagValues() {
1740
- return this.distinct() ? this.tagValues() : null;
1741
- }
1742
- tagValues() {
1743
- return new Set(this._tagList.tags.map(({ value }) => value));
1744
- }
1745
- trimValue(value) {
1746
- return (this.trimDirective ? this.trimDirective.trim(value) : value);
1747
- }
1748
- /** Checks whether a keydown event matches a separator that applies to typed input. */
1749
- matchesInputSeparator(event) {
1750
- return this.separators.some((separator) => separator.key === event.key &&
1751
- !hasModifierKey(event) &&
1752
- (!separator.appliesTo || separator.appliesTo.includes('input')));
1753
- }
1754
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1755
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqTagInput, isStandalone: true, selector: "input[kbqTagInputFor]", inputs: { separatorKeyCodes: { classPropertyName: "separatorKeyCodes", publicName: "kbqTagInputSeparatorKeyCodes", isSignal: false, isRequired: false, transformFunction: null }, distinct: { classPropertyName: "distinct", publicName: "distinct", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, tagList: { classPropertyName: "tagList", publicName: "kbqTagInputFor", isSignal: false, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "kbqTagInputAddOnBlur", isSignal: false, isRequired: false, transformFunction: null }, addOnPaste: { classPropertyName: "addOnPaste", publicName: "kbqTagInputAddOnPaste", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { tagEnd: "kbqTagInputTokenEnd" }, host: { listeners: { "keydown": "onKeydown($event)", "blur": "blur($event)", "focus": "onFocus()", "input": "onInput()", "paste": "onPaste($event)" }, properties: { "id": "id", "attr.disabled": "disabled || null", "attr.placeholder": "placeholder || null" }, classAttribute: "kbq-tag-input" }, exportAs: ["kbqTagInput", "kbqTagInputFor"], usesOnChanges: true, hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
1756
- }
1757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagInput, decorators: [{
1758
- type: Directive,
1759
- args: [{
1760
- selector: 'input[kbqTagInputFor]',
1761
- host: {
1762
- class: 'kbq-tag-input',
1763
- '[id]': 'id',
1764
- '[attr.disabled]': 'disabled || null',
1765
- '[attr.placeholder]': 'placeholder || null',
1766
- '(keydown)': 'onKeydown($event)',
1767
- '(blur)': 'blur($event)',
1768
- '(focus)': 'onFocus()',
1769
- '(input)': 'onInput()',
1770
- '(paste)': 'onPaste($event)'
1771
- },
1772
- hostDirectives: [KbqFieldSizingContent],
1773
- exportAs: 'kbqTagInput, kbqTagInputFor'
1774
- }]
1775
- }], ctorParameters: () => [], propDecorators: { separatorKeyCodes: [{
1776
- type: Input,
1777
- args: ['kbqTagInputSeparatorKeyCodes']
1778
- }], tagEnd: [{ type: i0.Output, args: ["kbqTagInputTokenEnd"] }], distinct: [{ type: i0.Input, args: [{ isSignal: true, alias: "distinct", required: false }] }], placeholder: [{
1779
- type: Input
1780
- }], id: [{
1781
- type: Input
1782
- }], tagList: [{
1783
- type: Input,
1784
- args: ['kbqTagInputFor']
1785
- }], addOnBlur: [{
1786
- type: Input,
1787
- args: ['kbqTagInputAddOnBlur']
1788
- }], addOnPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputAddOnPaste", required: false }] }], disabled: [{
1789
- type: Input
1790
- }] } });
1936
+ }, hostDirectives: [CdkDropList], exportAs: 'kbqTagList', styles: ["@charset \"UTF-8\";.kbq-tag-list{display:flex;flex-direction:row;min-height:var(--kbq-size-xxl);box-sizing:border-box}.kbq-tag-list:focus-visible{outline:none}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{animation:none;transition:none}}.kbq-tag-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag-input::-ms-clear{display:none;width:0;height:0}.kbq-tag-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag-input::-webkit-search-decoration,.kbq-tag-input::-webkit-search-cancel-button,.kbq-tag-input::-webkit-search-results-button,.kbq-tag-input::-webkit-search-results-decoration{display:none}.kbq-tag-input{padding-top:var(--kbq-tag-size-padding-vertical);padding-bottom:var(--kbq-tag-size-padding-vertical);padding-left:var(--kbq-size-xxs);padding-right:unset;min-width:var(--kbq-size-3xl);max-width:100%;flex-grow:1}.kbq-tag-input.kbq-input{--kbq-input-size-padding-vertical: 0;--kbq-form-field-size-border-radius: 0;padding-left:var(--kbq-size-xxs);min-height:unset!important;width:auto}.kbq-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;box-sizing:border-box;min-width:0;gap:var(--kbq-tag-list-size-content-gap)}.kbq-tags-list__list-container .kbq-tag-input:first-child{padding-left:var(--kbq-size-s)}.kbq-tags-list__cleaner .kbq-cleaner{max-height:24px}.kbq-form-field-type-tag-list .kbq-form-field__container{padding-top:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width));padding-bottom:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width))}body:has(.kbq-tag-list.cdk-drop-list-dragging){cursor:grabbing}\n", ".kbq-tag,.kbq-tag-list,.kbq-tag-input{--kbq-tag-list-size-content-gap: var(--kbq-size-xxs);--kbq-tag-size-padding-horizontal: var(--kbq-size-xxs);--kbq-tag-size-padding-vertical: var(--kbq-size-3xs);--kbq-tag-size-content-gap-horizontal: var(--kbq-size-3xs);--kbq-tag-size-icon-margin-left: var(--kbq-size-3xs);--kbq-tag-size-close-button-margin-right: var(--kbq-size-3xs);--kbq-tag-theme-fade-on-default-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-default-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-default-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-default-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-background: var(--kbq-states-background-theme-fade-hover);--kbq-tag-theme-fade-on-states-hover-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-hover-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-states-focus-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-focus-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-theme-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-theme-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-theme-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-theme-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-theme-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-theme-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-default-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-default-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-default-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-default-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-background: var(--kbq-states-background-contrast-fade-hover);--kbq-tag-contrast-fade-on-states-hover-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-hover-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-focus-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-contrast-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-contrast-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-contrast-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-contrast-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-contrast-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-default-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-default-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-default-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-default-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-tag-error-fade-on-states-hover-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-hover-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-states-focus-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-focus-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-outline: var(--kbq-states-line-focus-error);--kbq-tag-error-fade-on-states-selected-background: var(--kbq-background-error);--kbq-tag-error-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-error-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-error-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-error-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-default-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-default-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-default-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-default-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-background: var(--kbq-states-background-warning-fade-hover);--kbq-tag-warning-fade-states-hover-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-hover-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-states-focus-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-focus-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-warning-fade-states-selected-background: var(--kbq-background-warning);--kbq-tag-warning-fade-states-selected-text: var(--kbq-foreground-contrast);--kbq-tag-warning-fade-states-selected-icon: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-selected-close-button: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-warning-fade-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-warning-fade-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-states-disabled-close-button: var(--kbq-states-icon-disabled)}\n"] }]
1937
+ }], ctorParameters: () => [], propDecorators: { valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], placeholderInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], dropped: [{ type: i0.Output, args: ["dropped"] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], clearPredicate: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearPredicate", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], change: [{ type: i0.Output, args: ["change"] }], cleaner: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqCleaner), { ...{ descendants: false }, isSignal: true }] }], tagsQuery: [{ type: i0.ContentChildren, args: [forwardRef(() => KbqTag), { ...{ descendants: true }, isSignal: true }] }], draggableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], tabIndexInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }] } });
1791
1938
 
1792
1939
  const COMPONENTS = [
1793
1940
  KbqTagEditSubmit,
1794
- KbqTagEditInput
1941
+ KbqTagEditInput,
1942
+ KbqTagPrefix,
1943
+ KbqTagSuffix
1795
1944
  ];
1796
1945
  class KbqTagsModule {
1797
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1798
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqTagsModule, imports: [PlatformModule, KbqTagEditSubmit,
1799
- KbqTagEditInput, KbqTagList,
1946
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1947
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqTagsModule, imports: [PlatformModule, KbqTagEditSubmit,
1948
+ KbqTagEditInput,
1949
+ KbqTagPrefix,
1950
+ KbqTagSuffix, KbqTagList,
1800
1951
  KbqTag,
1801
1952
  KbqTagInput,
1802
1953
  KbqTagTrailingIcon,
@@ -1807,10 +1958,12 @@ class KbqTagsModule {
1807
1958
  KbqTagTrailingIcon,
1808
1959
  KbqTagAvatar,
1809
1960
  KbqTagRemove, KbqTagEditSubmit,
1810
- KbqTagEditInput] }); }
1811
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagsModule, providers: [kbqTagsDefaultOptionsProvider({ separatorKeyCodes: [ENTER$1] })], imports: [PlatformModule] }); }
1961
+ KbqTagEditInput,
1962
+ KbqTagPrefix,
1963
+ KbqTagSuffix] }); }
1964
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagsModule, providers: [kbqTagsDefaultOptionsProvider({ separatorKeyCodes: [ENTER] })], imports: [PlatformModule] }); }
1812
1965
  }
1813
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagsModule, decorators: [{
1966
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagsModule, decorators: [{
1814
1967
  type: NgModule,
1815
1968
  args: [{
1816
1969
  imports: [
@@ -1823,7 +1976,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
1823
1976
  KbqTagAvatar,
1824
1977
  KbqTagRemove
1825
1978
  ],
1826
- providers: [kbqTagsDefaultOptionsProvider({ separatorKeyCodes: [ENTER$1] })],
1979
+ providers: [kbqTagsDefaultOptionsProvider({ separatorKeyCodes: [ENTER] })],
1827
1980
  exports: [
1828
1981
  KbqTagList,
1829
1982
  KbqTag,
@@ -1840,5 +1993,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
1840
1993
  * Generated bundle index. Do not edit.
1841
1994
  */
1842
1995
 
1843
- export { KBQ_TAGS_DEFAULT_OPTIONS, KbqTag, KbqTagAvatar, KbqTagEditChange, KbqTagEditInput, KbqTagEditSubmit, KbqTagInput, KbqTagList, KbqTagListChange, KbqTagRemove, KbqTagSelectionChange, KbqTagTrailingIcon, KbqTagsModule, kbqTagsDefaultOptionsProvider };
1996
+ export { KBQ_TAGS_DEFAULT_OPTIONS, KbqTag, KbqTagAvatar, KbqTagEditChange, KbqTagEditInput, KbqTagEditSubmit, KbqTagInput, KbqTagList, KbqTagListChange, KbqTagPrefix, KbqTagRemove, KbqTagSelectionChange, KbqTagSuffix, KbqTagTrailingIcon, KbqTagsModule, kbqTagsDefaultOptionsProvider };
1844
1997
  //# sourceMappingURL=koobiq-components-tags.mjs.map