@koobiq/components 20.4.2 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (771) hide show
  1. package/accordion/accordion-trigger.scss +3 -10
  2. package/accordion/accordion.scss +4 -6
  3. package/actions-panel/actions-panel-container.scss +45 -1
  4. package/alert/alert.component.scss +3 -2
  5. package/app-switcher/_app-switcher-theme.scss +0 -4
  6. package/app-switcher/app-switcher-dropdown-app.scss +3 -2
  7. package/app-switcher/app-switcher-dropdown-site.scss +2 -1
  8. package/app-switcher/{kbq-app-switcher-list-item.scss → app-switcher-list-item.scss} +18 -4
  9. package/app-switcher/app-switcher-tokens.scss +15 -0
  10. package/app-switcher/app-switcher.scss +14 -4
  11. package/autocomplete/autocomplete.scss +7 -6
  12. package/badge/badge.component.scss +5 -8
  13. package/breadcrumbs/breadcrumbs.scss +25 -10
  14. package/button/_button-base.scss +30 -7
  15. package/button/_button-theme.scss +16 -0
  16. package/button/button-group.scss +7 -0
  17. package/button/button-tokens.scss +0 -2
  18. package/button/button.scss +34 -2
  19. package/button-toggle/_button-toggle-theme.scss +7 -2
  20. package/button-toggle/button-toggle.scss +65 -15
  21. package/checkbox/_checkbox-theme.scss +4 -3
  22. package/checkbox/checkbox.scss +3 -6
  23. package/clamped-text/clamped-text.scss +6 -2
  24. package/code-block/code-block-tokens.scss +0 -224
  25. package/code-block/code-block.scss +20 -9
  26. package/content-panel/content-panel-aside.scss +3 -2
  27. package/content-panel/content-panel-container.scss +37 -0
  28. package/content-panel/content-panel.scss +4 -3
  29. package/core/highlight/_highlight-theme.scss +3 -1
  30. package/core/option/action-container.scss +2 -2
  31. package/core/option/action.scss +2 -1
  32. package/core/option/option.scss +2 -1
  33. package/core/pop-up/_pop-up.scss +0 -37
  34. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +5 -10
  35. package/core/styles/_core.scss +3 -0
  36. package/core/styles/_koobiq-theme.scss +5 -6
  37. package/core/styles/common/_animation.scss +44 -16
  38. package/core/styles/common/_groups-mixins.scss +21 -19
  39. package/core/styles/common/_groups.scss +4 -32
  40. package/core/styles/common/_index.scss +0 -2
  41. package/core/styles/common/_link.scss +117 -0
  42. package/core/styles/common/_list.scss +0 -26
  43. package/core/styles/common/_overlay.scss +8 -10
  44. package/core/styles/common/_rtl.scss +0 -14
  45. package/core/styles/common/_select.scss +33 -15
  46. package/core/styles/common/_squircle.scss +63 -0
  47. package/core/styles/common/_tokens.scss +0 -11
  48. package/core/styles/common/_vendor-prefixes.scss +0 -20
  49. package/core/styles/functions/_timing.scss +0 -22
  50. package/core/styles/theming/_scrollbar-theme.scss +6 -1
  51. package/core/styles/theming/_theming.scss +13 -65
  52. package/core/styles/typography/_index.scss +0 -1
  53. package/core/styles/typography/_typography.scss +0 -143
  54. package/core/styles/visual/_body.scss +1 -6
  55. package/core/styles/visual/_layout.scss +0 -12
  56. package/datepicker/calendar-body.scss +3 -1
  57. package/datepicker/calendar-header.scss +0 -1
  58. package/datepicker/datepicker-content.scss +33 -1
  59. package/datepicker/datepicker-toggle.scss +0 -38
  60. package/dl/dl-tokens.scss +10 -0
  61. package/dl/dl.scss +113 -13
  62. package/dropdown/_dropdown-theme.scss +4 -16
  63. package/dropdown/dropdown-item.scss +4 -10
  64. package/dropdown/dropdown.scss +2 -1
  65. package/empty-state/_empty-state-theme.scss +10 -4
  66. package/empty-state/empty-state-tokens.scss +4 -4
  67. package/empty-state/empty-state.scss +4 -0
  68. package/fesm2022/koobiq-components-accordion.mjs +347 -229
  69. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  70. package/fesm2022/koobiq-components-actions-panel.mjs +302 -187
  71. package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
  72. package/fesm2022/koobiq-components-alert.mjs +39 -39
  73. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-app-switcher.mjs +677 -367
  75. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-autocomplete.mjs +620 -253
  77. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  78. package/fesm2022/koobiq-components-badge.mjs +46 -48
  79. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  80. package/fesm2022/koobiq-components-breadcrumbs.mjs +221 -169
  81. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  82. package/fesm2022/koobiq-components-button-toggle.mjs +565 -196
  83. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  84. package/fesm2022/koobiq-components-button.mjs +332 -116
  85. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-checkbox.mjs +172 -132
  87. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-clamped-text.mjs +165 -158
  89. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  90. package/fesm2022/koobiq-components-code-block.mjs +755 -601
  91. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  92. package/fesm2022/koobiq-components-content-panel.mjs +260 -143
  93. package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
  94. package/fesm2022/koobiq-components-core.mjs +4342 -1595
  95. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  96. package/fesm2022/koobiq-components-datepicker.mjs +1713 -1606
  97. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  98. package/fesm2022/koobiq-components-divider.mjs +73 -36
  99. package/fesm2022/koobiq-components-divider.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-dl.mjs +447 -89
  101. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  102. package/fesm2022/koobiq-components-dropdown.mjs +703 -599
  103. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  104. package/fesm2022/koobiq-components-dynamic-translation.mjs +20 -20
  105. package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
  106. package/fesm2022/koobiq-components-ellipsis-center.mjs +46 -31
  107. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  108. package/fesm2022/koobiq-components-empty-state.mjs +116 -60
  109. package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
  110. package/fesm2022/koobiq-components-file-upload.mjs +550 -290
  111. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  112. package/fesm2022/koobiq-components-filter-bar.mjs +2810 -2538
  113. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  114. package/fesm2022/koobiq-components-flag.mjs +79 -24
  115. package/fesm2022/koobiq-components-flag.mjs.map +1 -1
  116. package/fesm2022/koobiq-components-form-field.mjs +389 -525
  117. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  118. package/fesm2022/koobiq-components-icon.mjs +366 -136
  119. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  120. package/fesm2022/koobiq-components-inline-edit.mjs +429 -212
  121. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  122. package/fesm2022/koobiq-components-input.mjs +601 -459
  123. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  124. package/fesm2022/koobiq-components-link-deprecated.mjs +196 -0
  125. package/fesm2022/koobiq-components-link-deprecated.mjs.map +1 -0
  126. package/fesm2022/koobiq-components-link.mjs +328 -125
  127. package/fesm2022/koobiq-components-link.mjs.map +1 -1
  128. package/fesm2022/koobiq-components-list.mjs +583 -433
  129. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  130. package/fesm2022/koobiq-components-loader-overlay.mjs +167 -68
  131. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  132. package/fesm2022/koobiq-components-markdown.mjs +55 -78
  133. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  134. package/fesm2022/koobiq-components-modal.mjs +853 -475
  135. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  136. package/fesm2022/koobiq-components-navbar.mjs +895 -556
  137. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  138. package/fesm2022/koobiq-components-notification-center.mjs +680 -310
  139. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  140. package/fesm2022/koobiq-components-overflow-items.mjs +46 -64
  141. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  142. package/fesm2022/koobiq-components-popover.mjs +684 -285
  143. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  144. package/fesm2022/koobiq-components-progress-bar.mjs +87 -33
  145. package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
  146. package/fesm2022/koobiq-components-progress-spinner.mjs +52 -43
  147. package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
  148. package/fesm2022/koobiq-components-radio.mjs +450 -231
  149. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  150. package/fesm2022/koobiq-components-resizer.mjs +127 -21
  151. package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
  152. package/fesm2022/koobiq-components-scrollbar-deprecated.mjs +299 -0
  153. package/fesm2022/koobiq-components-scrollbar-deprecated.mjs.map +1 -0
  154. package/fesm2022/koobiq-components-scrollbar.mjs +745 -222
  155. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  156. package/fesm2022/koobiq-components-search-expandable.mjs +288 -126
  157. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  158. package/fesm2022/koobiq-components-select.mjs +883 -693
  159. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  160. package/fesm2022/koobiq-components-sidebar.mjs +207 -88
  161. package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
  162. package/fesm2022/koobiq-components-sidepanel.mjs +689 -296
  163. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  164. package/fesm2022/koobiq-components-skeleton.mjs +815 -41
  165. package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
  166. package/fesm2022/koobiq-components-split-button.mjs +109 -88
  167. package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
  168. package/fesm2022/koobiq-components-splitter-deprecated.mjs +591 -0
  169. package/fesm2022/koobiq-components-splitter-deprecated.mjs.map +1 -0
  170. package/fesm2022/koobiq-components-splitter.mjs +890 -501
  171. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  172. package/fesm2022/koobiq-components-table.mjs +63 -49
  173. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  174. package/fesm2022/koobiq-components-tabs.mjs +1062 -603
  175. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  176. package/fesm2022/koobiq-components-tags.mjs +886 -733
  177. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  178. package/fesm2022/koobiq-components-textarea.mjs +213 -185
  179. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  180. package/fesm2022/koobiq-components-time-range.mjs +299 -147
  181. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  182. package/fesm2022/koobiq-components-timepicker.mjs +233 -245
  183. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  184. package/fesm2022/koobiq-components-timezone.mjs +344 -142
  185. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  186. package/fesm2022/koobiq-components-title.mjs +229 -145
  187. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  188. package/fesm2022/koobiq-components-toast.mjs +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 +719 -488
  197. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  198. package/fesm2022/koobiq-components-tree.mjs +1506 -558
  199. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  200. package/fesm2022/koobiq-components-username.mjs +290 -135
  201. package/fesm2022/koobiq-components-username.mjs.map +1 -1
  202. package/file-upload/dropzone.scss +31 -3
  203. package/file-upload/file-upload-tokens.scss +2 -22
  204. package/file-upload/file-upload.scss +6 -0
  205. package/file-upload/multiple-file-upload.component.scss +14 -12
  206. package/file-upload/single-file-upload.component.scss +3 -2
  207. package/filter-bar/filters.scss +7 -0
  208. package/filter-bar/pipes/base-pipe.scss +3 -3
  209. package/filter-bar/pipes/pipe-date.scss +8 -1
  210. package/flag/flag-tokens.scss +22 -0
  211. package/flag/flag.scss +34 -21
  212. package/form-field/{_fiedset-theme.scss → _fieldset-theme.scss} +1 -5
  213. package/form-field/_form-field-theme.scss +4 -9
  214. package/form-field/cleaner.scss +3 -1
  215. package/form-field/fieldset.scss +3 -4
  216. package/form-field/form-field.scss +26 -21
  217. package/form-field/password-toggle.scss +3 -1
  218. package/icon/_icon-button-theme.scss +7 -0
  219. package/icon/_icon-theme.scss +10 -7
  220. package/icon/icon-button.scss +0 -2
  221. package/icon/icon-tokens.scss +12 -9
  222. package/inline-edit/inline-edit.scss +40 -54
  223. package/input/input.scss +4 -0
  224. package/link/{_link-theme.scss → deprecated/_link-theme.scss} +11 -6
  225. package/link/deprecated/link-tokens.scss +27 -0
  226. package/link/link-tokens.scss +6 -25
  227. package/link/link.scss +137 -0
  228. package/list/list.scss +3 -2
  229. package/loader-overlay/_loader-overlay-theme.scss +19 -10
  230. package/loader-overlay/loader-overlay-tokens.scss +0 -2
  231. package/loader-overlay/loader-overlay.scss +7 -1
  232. package/markdown/_markdown-theme.scss +16 -0
  233. package/markdown/markdown-tokens.scss +5 -0
  234. package/markdown/markdown.scss +2 -1
  235. package/modal/_modal-animation.scss +23 -14
  236. package/modal/modal-tokens.scss +2 -1
  237. package/modal/modal.scss +35 -31
  238. package/navbar/_navbar-item_horizontal.scss +8 -6
  239. package/navbar/_navbar-item_vertical.scss +18 -6
  240. package/navbar/_navbar-theme.scss +9 -1
  241. package/navbar/navbar-brand.scss +8 -6
  242. package/navbar/navbar-divider.scss +1 -1
  243. package/navbar/navbar-item.scss +8 -9
  244. package/navbar/navbar-toggle.scss +3 -3
  245. package/navbar/navbar-tokens.scss +14 -0
  246. package/navbar/navbar.scss +1 -2
  247. package/navbar/vertical-navbar.scss +2 -2
  248. package/notification-center/_notification-center-theme.scss +11 -6
  249. package/notification-center/notification-center-tokens.scss +33 -0
  250. package/notification-center/notification-center.scss +58 -20
  251. package/notification-center/notification-item.scss +15 -6
  252. package/package.json +112 -81
  253. package/popover/popover-tokens.scss +0 -2
  254. package/popover/popover.scss +41 -19
  255. package/prebuilt-themes/theme.css +1 -1
  256. package/progress-bar/_progress-bar-theme.scss +20 -3
  257. package/progress-bar/progress-bar-tokens.scss +3 -0
  258. package/progress-bar/progress-bar.scss +36 -8
  259. package/progress-spinner/progress-spinner.scss +4 -3
  260. package/radio/_radio-theme.scss +21 -4
  261. package/radio/radio-tokens.scss +7 -3
  262. package/radio/radio.scss +55 -8
  263. package/schematics/collection.json +399 -7
  264. package/schematics/migrations/accordion-state-saving-default/README.md +60 -0
  265. package/schematics/migrations/accordion-state-saving-default/data.js +75 -0
  266. package/schematics/migrations/accordion-state-saving-default/index.js +60 -0
  267. package/schematics/migrations/accordion-state-saving-default/schema.json +15 -0
  268. package/schematics/migrations/actions-panel-overlay-container/README.md +35 -0
  269. package/schematics/migrations/actions-panel-overlay-container/data.js +47 -0
  270. package/schematics/migrations/actions-panel-overlay-container/index.js +54 -0
  271. package/schematics/migrations/actions-panel-overlay-container/schema.json +15 -0
  272. package/schematics/migrations/alert-signals/README.md +13 -7
  273. package/schematics/migrations/alert-signals/data.js +3 -0
  274. package/schematics/migrations/alert-signals/index.js +70 -203
  275. package/schematics/migrations/angular-animations-removal/README.md +46 -0
  276. package/schematics/migrations/angular-animations-removal/data.js +150 -0
  277. package/schematics/migrations/angular-animations-removal/index.js +20 -0
  278. package/schematics/migrations/angular-animations-removal/schema.json +15 -0
  279. package/schematics/migrations/app-switcher-signals/README.md +88 -0
  280. package/schematics/migrations/app-switcher-signals/data.js +136 -0
  281. package/schematics/migrations/app-switcher-signals/index.js +365 -0
  282. package/schematics/migrations/app-switcher-signals/schema.json +20 -0
  283. package/schematics/migrations/autocomplete-panel-width-auto/README.md +2 -2
  284. package/schematics/migrations/autocomplete-panel-width-auto/index.js +1 -1
  285. package/schematics/migrations/autocomplete-signals/README.md +92 -0
  286. package/schematics/migrations/autocomplete-signals/data.js +149 -0
  287. package/schematics/migrations/autocomplete-signals/index.js +706 -0
  288. package/schematics/migrations/autocomplete-signals/schema.json +20 -0
  289. package/schematics/migrations/badge-signals/README.md +77 -0
  290. package/schematics/migrations/badge-signals/data.js +109 -0
  291. package/schematics/migrations/badge-signals/index.js +693 -0
  292. package/schematics/migrations/badge-signals/schema.json +20 -0
  293. package/schematics/migrations/button-state-and-styles/README.md +129 -0
  294. package/schematics/migrations/button-state-and-styles/data.js +136 -0
  295. package/schematics/migrations/button-state-and-styles/index.js +220 -0
  296. package/schematics/migrations/button-state-and-styles/schema.json +20 -0
  297. package/schematics/migrations/button-supported-colors/README.md +73 -0
  298. package/schematics/migrations/button-supported-colors/data.js +106 -0
  299. package/schematics/migrations/button-supported-colors/index.js +260 -0
  300. package/schematics/migrations/button-supported-colors/schema.json +20 -0
  301. package/schematics/migrations/button-toggle-signals-and-aria/README.md +137 -0
  302. package/schematics/migrations/button-toggle-signals-and-aria/data.js +200 -0
  303. package/schematics/migrations/button-toggle-signals-and-aria/index.js +496 -0
  304. package/schematics/migrations/button-toggle-signals-and-aria/schema.json +20 -0
  305. package/schematics/migrations/button-truncation/README.md +110 -0
  306. package/schematics/migrations/button-truncation/data.js +88 -0
  307. package/schematics/migrations/button-truncation/index.js +269 -0
  308. package/schematics/migrations/button-truncation/schema.json +20 -0
  309. package/schematics/migrations/checkbox-signals/README.md +76 -0
  310. package/schematics/migrations/checkbox-signals/data.js +114 -0
  311. package/schematics/migrations/checkbox-signals/index.js +634 -0
  312. package/schematics/migrations/checkbox-signals/schema.json +20 -0
  313. package/schematics/migrations/clamped-text-disclosure/README.md +62 -0
  314. package/schematics/migrations/clamped-text-disclosure/data.js +101 -0
  315. package/schematics/migrations/clamped-text-disclosure/index.js +59 -0
  316. package/schematics/migrations/clamped-text-disclosure/schema.json +15 -0
  317. package/schematics/migrations/code-block-signals/README.md +84 -0
  318. package/schematics/migrations/code-block-signals/data.js +121 -0
  319. package/schematics/migrations/code-block-signals/index.js +700 -0
  320. package/schematics/migrations/code-block-signals/schema.json +20 -0
  321. package/schematics/migrations/color-signals/README.md +46 -0
  322. package/schematics/migrations/color-signals/data.js +131 -0
  323. package/schematics/migrations/color-signals/index.js +19 -0
  324. package/schematics/migrations/color-signals/schema.json +20 -0
  325. package/schematics/migrations/core-mixins-removal/README.md +20 -0
  326. package/schematics/migrations/core-mixins-removal/data.js +27 -0
  327. package/schematics/migrations/core-mixins-removal/index.js +17 -0
  328. package/schematics/migrations/core-mixins-removal/schema.json +15 -0
  329. package/schematics/migrations/css-selectors/README.md +2 -2
  330. package/schematics/migrations/css-selectors/index.js +1 -1
  331. package/schematics/migrations/datepicker-signals/README.md +24 -0
  332. package/schematics/migrations/datepicker-signals/data.js +49 -0
  333. package/schematics/migrations/datepicker-signals/index.js +17 -0
  334. package/schematics/migrations/datepicker-signals/schema.json +15 -0
  335. package/schematics/migrations/deprecated-icons/README.md +2 -2
  336. package/schematics/migrations/deprecated-icons/index.js +1 -1
  337. package/schematics/migrations/design-tokens-v4/README.md +75 -0
  338. package/schematics/migrations/design-tokens-v4/index.js +59 -0
  339. package/schematics/migrations/design-tokens-v4/schema.json +15 -0
  340. package/schematics/migrations/divider-signals-and-aria/README.md +47 -0
  341. package/schematics/migrations/divider-signals-and-aria/data.js +62 -0
  342. package/schematics/migrations/divider-signals-and-aria/index.js +211 -0
  343. package/schematics/migrations/divider-signals-and-aria/schema.json +15 -0
  344. package/schematics/migrations/dl-attribute-coercion/README.md +59 -0
  345. package/schematics/migrations/dl-attribute-coercion/data.js +85 -0
  346. package/schematics/migrations/dl-attribute-coercion/index.js +161 -0
  347. package/schematics/migrations/dl-attribute-coercion/schema.json +15 -0
  348. package/schematics/migrations/dl-standalone-names/README.md +49 -0
  349. package/schematics/migrations/dl-standalone-names/data.js +44 -0
  350. package/schematics/migrations/dl-standalone-names/index.js +321 -0
  351. package/schematics/migrations/dl-standalone-names/schema.json +20 -0
  352. package/schematics/migrations/dropdown-demote-overlay/README.md +137 -0
  353. package/schematics/migrations/dropdown-demote-overlay/data.js +84 -0
  354. package/schematics/migrations/dropdown-demote-overlay/index.js +288 -0
  355. package/schematics/migrations/dropdown-demote-overlay/schema.json +20 -0
  356. package/schematics/migrations/dropdown-signals/README.md +83 -0
  357. package/schematics/migrations/dropdown-signals/data.js +152 -0
  358. package/schematics/migrations/dropdown-signals/index.js +19 -0
  359. package/schematics/migrations/dropdown-signals/schema.json +20 -0
  360. package/schematics/migrations/empty-state-error-color/README.md +84 -0
  361. package/schematics/migrations/empty-state-error-color/data.js +85 -0
  362. package/schematics/migrations/empty-state-error-color/index.js +71 -0
  363. package/schematics/migrations/empty-state-error-color/schema.json +15 -0
  364. package/schematics/migrations/empty-state-size-attr/README.md +2 -2
  365. package/schematics/migrations/empty-state-size-attr/index.js +1 -1
  366. package/schematics/migrations/file-upload-cva-and-primitives/README.md +70 -0
  367. package/schematics/migrations/file-upload-cva-and-primitives/data.js +97 -0
  368. package/schematics/migrations/file-upload-cva-and-primitives/index.js +60 -0
  369. package/schematics/migrations/file-upload-cva-and-primitives/schema.json +15 -0
  370. package/schematics/migrations/file-upload-deprecated-outputs/README.md +90 -0
  371. package/schematics/migrations/file-upload-deprecated-outputs/data.js +20 -0
  372. package/schematics/migrations/file-upload-deprecated-outputs/index.js +70 -0
  373. package/schematics/migrations/file-upload-deprecated-outputs/schema.json +20 -0
  374. package/schematics/migrations/filter-bar-rename-action/README.md +183 -0
  375. package/schematics/migrations/filter-bar-rename-action/data.js +151 -0
  376. package/schematics/migrations/filter-bar-rename-action/index.js +177 -0
  377. package/schematics/migrations/filter-bar-rename-action/schema.json +20 -0
  378. package/schematics/migrations/filter-bar-signals/README.md +27 -16
  379. package/schematics/migrations/filter-bar-signals/data.js +1 -2
  380. package/schematics/migrations/filter-bar-signals/index.js +100 -195
  381. package/schematics/migrations/filter-bar-state-saving-default/README.md +53 -0
  382. package/schematics/migrations/filter-bar-state-saving-default/data.js +87 -0
  383. package/schematics/migrations/filter-bar-state-saving-default/index.js +61 -0
  384. package/schematics/migrations/filter-bar-state-saving-default/schema.json +15 -0
  385. package/schematics/migrations/flag-inner-html/README.md +67 -0
  386. package/schematics/migrations/flag-inner-html/data.js +58 -0
  387. package/schematics/migrations/flag-inner-html/index.js +61 -0
  388. package/schematics/migrations/flag-inner-html/schema.json +15 -0
  389. package/schematics/migrations/form-field-signals/README.md +125 -0
  390. package/schematics/migrations/form-field-signals/data.js +288 -0
  391. package/schematics/migrations/form-field-signals/index.js +382 -0
  392. package/schematics/migrations/form-field-signals/schema.json +20 -0
  393. package/schematics/migrations/icon-semantics-and-api/README.md +65 -0
  394. package/schematics/migrations/icon-semantics-and-api/data.js +97 -0
  395. package/schematics/migrations/icon-semantics-and-api/index.js +64 -0
  396. package/schematics/migrations/icon-semantics-and-api/schema.json +15 -0
  397. package/schematics/migrations/icons-replacement/README.md +5 -5
  398. package/schematics/migrations/icons-replacement/index.js +1 -1
  399. package/schematics/migrations/inline-edit-a11y-and-types/README.md +82 -0
  400. package/schematics/migrations/inline-edit-a11y-and-types/data.js +117 -0
  401. package/schematics/migrations/inline-edit-a11y-and-types/index.js +97 -0
  402. package/schematics/migrations/inline-edit-a11y-and-types/schema.json +20 -0
  403. package/schematics/migrations/input-number-surface/README.md +140 -0
  404. package/schematics/migrations/input-number-surface/data.js +135 -0
  405. package/schematics/migrations/input-number-surface/index.js +292 -0
  406. package/schematics/migrations/input-number-surface/schema.json +20 -0
  407. package/schematics/migrations/input-signals/README.md +20 -0
  408. package/schematics/migrations/input-signals/data.js +30 -0
  409. package/schematics/migrations/input-signals/index.js +17 -0
  410. package/schematics/migrations/input-signals/schema.json +15 -0
  411. package/schematics/migrations/link-deprecated-path/README.md +144 -0
  412. package/schematics/migrations/link-deprecated-path/index.js +19 -0
  413. package/schematics/migrations/link-deprecated-path/schema.json +20 -0
  414. package/schematics/migrations/link-signals/README.md +71 -0
  415. package/schematics/migrations/link-signals/data.js +116 -0
  416. package/schematics/migrations/link-signals/index.js +415 -0
  417. package/schematics/migrations/link-signals/schema.json +20 -0
  418. package/schematics/migrations/list-signals/README.md +22 -0
  419. package/schematics/migrations/list-signals/data.js +35 -0
  420. package/schematics/migrations/list-signals/index.js +17 -0
  421. package/schematics/migrations/list-signals/schema.json +15 -0
  422. package/schematics/migrations/list-tree-multiple-input/README.md +105 -0
  423. package/schematics/migrations/list-tree-multiple-input/data.js +74 -0
  424. package/schematics/migrations/list-tree-multiple-input/index.js +221 -0
  425. package/schematics/migrations/list-tree-multiple-input/schema.json +20 -0
  426. package/schematics/migrations/loader-overlay-signals/README.md +62 -0
  427. package/schematics/migrations/loader-overlay-signals/data.js +101 -0
  428. package/schematics/migrations/loader-overlay-signals/index.js +697 -0
  429. package/schematics/migrations/loader-overlay-signals/schema.json +20 -0
  430. package/schematics/migrations/loader-overlay-size-attr/README.md +2 -2
  431. package/schematics/migrations/loader-overlay-size-attr/index.js +1 -1
  432. package/schematics/migrations/locale-configuration-providers/README.md +163 -0
  433. package/schematics/migrations/locale-configuration-providers/data.js +257 -0
  434. package/schematics/migrations/locale-configuration-providers/index.js +294 -0
  435. package/schematics/migrations/locale-configuration-providers/schema.json +20 -0
  436. package/schematics/migrations/mandatory-peer-dependencies/README.md +70 -0
  437. package/schematics/migrations/mandatory-peer-dependencies/index.js +42 -0
  438. package/schematics/migrations/mandatory-peer-dependencies/schema.json +15 -0
  439. package/schematics/migrations/markdown-signals/README.md +58 -0
  440. package/schematics/migrations/markdown-signals/data.js +79 -0
  441. package/schematics/migrations/markdown-signals/index.js +639 -0
  442. package/schematics/migrations/markdown-signals/schema.json +20 -0
  443. package/schematics/migrations/modal-dialog-semantics/README.md +106 -0
  444. package/schematics/migrations/modal-dialog-semantics/data.js +110 -0
  445. package/schematics/migrations/modal-dialog-semantics/index.js +58 -0
  446. package/schematics/migrations/modal-dialog-semantics/schema.json +15 -0
  447. package/schematics/migrations/modal-signals/README.md +88 -0
  448. package/schematics/migrations/modal-signals/data.js +132 -0
  449. package/schematics/migrations/modal-signals/index.js +19 -0
  450. package/schematics/migrations/modal-signals/schema.json +20 -0
  451. package/schematics/migrations/navbar-signals-and-aria/README.md +111 -0
  452. package/schematics/migrations/navbar-signals-and-aria/data.js +198 -0
  453. package/schematics/migrations/navbar-signals-and-aria/index.js +568 -0
  454. package/schematics/migrations/navbar-signals-and-aria/schema.json +20 -0
  455. package/schematics/migrations/new-icons-pack/README.md +10 -10
  456. package/schematics/migrations/new-icons-pack/index.js +1 -1
  457. package/schematics/migrations/notification-center-signals/README.md +67 -0
  458. package/schematics/migrations/notification-center-signals/data.js +66 -0
  459. package/schematics/migrations/notification-center-signals/index.js +61 -0
  460. package/schematics/migrations/notification-center-signals/schema.json +15 -0
  461. package/schematics/migrations/option-signals/README.md +37 -0
  462. package/schematics/migrations/option-signals/data.js +86 -0
  463. package/schematics/migrations/option-signals/index.js +19 -0
  464. package/schematics/migrations/option-signals/schema.json +20 -0
  465. package/schematics/migrations/popover-leave-delay/README.md +51 -0
  466. package/schematics/migrations/popover-leave-delay/data.js +61 -0
  467. package/schematics/migrations/popover-leave-delay/index.js +54 -0
  468. package/schematics/migrations/popover-leave-delay/schema.json +15 -0
  469. package/schematics/migrations/progress-bar-percentage-and-aria/README.md +54 -0
  470. package/schematics/migrations/progress-bar-percentage-and-aria/data.js +76 -0
  471. package/schematics/migrations/progress-bar-percentage-and-aria/index.js +58 -0
  472. package/schematics/migrations/progress-bar-percentage-and-aria/schema.json +15 -0
  473. package/schematics/migrations/progress-spinner-signals/README.md +72 -0
  474. package/schematics/migrations/progress-spinner-signals/data.js +83 -0
  475. package/schematics/migrations/progress-spinner-signals/index.js +694 -0
  476. package/schematics/migrations/progress-spinner-signals/schema.json +20 -0
  477. package/schematics/migrations/query-list-signals/README.md +32 -0
  478. package/schematics/migrations/query-list-signals/data.js +70 -0
  479. package/schematics/migrations/query-list-signals/index.js +17 -0
  480. package/schematics/migrations/query-list-signals/schema.json +15 -0
  481. package/schematics/migrations/radio-signals-and-aria/README.md +82 -0
  482. package/schematics/migrations/radio-signals-and-aria/data.js +163 -0
  483. package/schematics/migrations/radio-signals-and-aria/index.js +39 -0
  484. package/schematics/migrations/radio-signals-and-aria/schema.json +20 -0
  485. package/schematics/migrations/read-state-dwell-handlers/README.md +125 -0
  486. package/schematics/migrations/read-state-dwell-handlers/data.js +45 -0
  487. package/schematics/migrations/read-state-dwell-handlers/index.js +215 -0
  488. package/schematics/migrations/read-state-dwell-handlers/schema.json +20 -0
  489. package/schematics/migrations/scrollbar-deprecated-path/README.md +128 -0
  490. package/schematics/migrations/scrollbar-deprecated-path/index.js +20 -0
  491. package/schematics/migrations/scrollbar-deprecated-path/schema.json +20 -0
  492. package/schematics/migrations/select-signal-inputs/README.md +61 -0
  493. package/schematics/migrations/select-signal-inputs/data.js +99 -0
  494. package/schematics/migrations/select-signal-inputs/index.js +57 -0
  495. package/schematics/migrations/select-signal-inputs/schema.json +15 -0
  496. package/schematics/migrations/sidepanel-non-modal-behavior/README.md +57 -0
  497. package/schematics/migrations/sidepanel-non-modal-behavior/data.js +111 -0
  498. package/schematics/migrations/sidepanel-non-modal-behavior/index.js +57 -0
  499. package/schematics/migrations/sidepanel-non-modal-behavior/schema.json +15 -0
  500. package/schematics/migrations/signal-inputs-subclasses/README.md +28 -0
  501. package/schematics/migrations/signal-inputs-subclasses/data.js +69 -0
  502. package/schematics/migrations/signal-inputs-subclasses/index.js +17 -0
  503. package/schematics/migrations/signal-inputs-subclasses/schema.json +15 -0
  504. package/schematics/migrations/split-button-optional-disabled/README.md +47 -0
  505. package/schematics/migrations/split-button-optional-disabled/data.js +53 -0
  506. package/schematics/migrations/split-button-optional-disabled/index.js +57 -0
  507. package/schematics/migrations/split-button-optional-disabled/schema.json +15 -0
  508. package/schematics/migrations/splitter-deprecated-path/README.md +136 -0
  509. package/schematics/migrations/splitter-deprecated-path/index.js +20 -0
  510. package/schematics/migrations/splitter-deprecated-path/schema.json +20 -0
  511. package/schematics/migrations/state-saving-default/README.md +67 -0
  512. package/schematics/migrations/state-saving-default/data.js +88 -0
  513. package/schematics/migrations/state-saving-default/index.js +62 -0
  514. package/schematics/migrations/state-saving-default/schema.json +15 -0
  515. package/schematics/migrations/table-cell-content/README.md +55 -0
  516. package/schematics/migrations/table-cell-content/data.js +66 -0
  517. package/schematics/migrations/table-cell-content/index.js +66 -0
  518. package/schematics/migrations/table-cell-content/schema.json +15 -0
  519. package/schematics/migrations/tabs-signals-and-aria/README.md +93 -0
  520. package/schematics/migrations/tabs-signals-and-aria/data.js +139 -0
  521. package/schematics/migrations/tabs-signals-and-aria/index.js +65 -0
  522. package/schematics/migrations/tabs-signals-and-aria/schema.json +15 -0
  523. package/schematics/migrations/tag-list-cleaner/README.md +58 -0
  524. package/schematics/migrations/tag-list-cleaner/data.js +42 -0
  525. package/schematics/migrations/tag-list-cleaner/index.js +196 -0
  526. package/schematics/migrations/tag-list-cleaner/schema.json +20 -0
  527. package/schematics/migrations/tag-slots/README.md +41 -0
  528. package/schematics/migrations/tag-slots/index.js +190 -0
  529. package/schematics/migrations/tag-slots/schema.json +20 -0
  530. package/schematics/migrations/tags-signals/README.md +85 -0
  531. package/schematics/migrations/tags-signals/data.js +103 -0
  532. package/schematics/migrations/tags-signals/index.js +673 -0
  533. package/schematics/migrations/tags-signals/schema.json +20 -0
  534. package/schematics/migrations/textarea-signals/README.md +72 -0
  535. package/schematics/migrations/textarea-signals/data.js +121 -0
  536. package/schematics/migrations/textarea-signals/index.js +379 -0
  537. package/schematics/migrations/textarea-signals/schema.json +20 -0
  538. package/schematics/migrations/time-range-title-for/README.md +164 -0
  539. package/schematics/migrations/time-range-title-for/data.js +139 -0
  540. package/schematics/migrations/time-range-title-for/index.js +163 -0
  541. package/schematics/migrations/time-range-title-for/schema.json +20 -0
  542. package/schematics/migrations/timepicker-signals/README.md +78 -0
  543. package/schematics/migrations/timepicker-signals/data.js +82 -0
  544. package/schematics/migrations/timepicker-signals/index.js +709 -0
  545. package/schematics/migrations/timepicker-signals/schema.json +20 -0
  546. package/schematics/migrations/timezone-grouping-utils/README.md +73 -0
  547. package/schematics/migrations/timezone-grouping-utils/data.js +101 -0
  548. package/schematics/migrations/timezone-grouping-utils/index.js +64 -0
  549. package/schematics/migrations/timezone-grouping-utils/schema.json +15 -0
  550. package/schematics/migrations/title-encapsulation/README.md +49 -0
  551. package/schematics/migrations/title-encapsulation/data.js +69 -0
  552. package/schematics/migrations/title-encapsulation/index.js +57 -0
  553. package/schematics/migrations/title-encapsulation/schema.json +15 -0
  554. package/schematics/migrations/toast-stack-and-defaults/README.md +102 -0
  555. package/schematics/migrations/toast-stack-and-defaults/data.js +79 -0
  556. package/schematics/migrations/toast-stack-and-defaults/index.js +53 -0
  557. package/schematics/migrations/toast-stack-and-defaults/schema.json +15 -0
  558. package/schematics/migrations/tooltip-pointer-events-and-types/README.md +53 -0
  559. package/schematics/migrations/tooltip-pointer-events-and-types/data.js +89 -0
  560. package/schematics/migrations/tooltip-pointer-events-and-types/index.js +60 -0
  561. package/schematics/migrations/tooltip-pointer-events-and-types/schema.json +15 -0
  562. package/schematics/migrations/top-bar-container-selectors/README.md +111 -0
  563. package/schematics/migrations/top-bar-container-selectors/data.js +56 -0
  564. package/schematics/migrations/top-bar-container-selectors/index.js +84 -0
  565. package/schematics/migrations/top-bar-container-selectors/schema.json +20 -0
  566. package/schematics/migrations/tree-select-signals/README.md +61 -0
  567. package/schematics/migrations/tree-select-signals/data.js +106 -0
  568. package/schematics/migrations/tree-select-signals/index.js +58 -0
  569. package/schematics/migrations/tree-select-signals/schema.json +15 -0
  570. package/schematics/migrations/tree-signals/README.md +82 -0
  571. package/schematics/migrations/tree-signals/data.js +123 -0
  572. package/schematics/migrations/tree-signals/index.js +54 -0
  573. package/schematics/migrations/tree-signals/schema.json +15 -0
  574. package/schematics/migrations/tree-state-saving-default/README.md +66 -0
  575. package/schematics/migrations/tree-state-saving-default/data.js +78 -0
  576. package/schematics/migrations/tree-state-saving-default/index.js +60 -0
  577. package/schematics/migrations/tree-state-saving-default/schema.json +15 -0
  578. package/schematics/migrations/username-pipe-injection/README.md +59 -0
  579. package/schematics/migrations/username-pipe-injection/data.js +78 -0
  580. package/schematics/migrations/username-pipe-injection/index.js +58 -0
  581. package/schematics/migrations/username-pipe-injection/schema.json +15 -0
  582. package/schematics/migrations/v20-upgrade/README.md +36 -16
  583. package/schematics/migrations/v20-upgrade/data.js +124 -77
  584. package/schematics/migrations/v20-upgrade/index.js +6 -213
  585. package/schematics/migrations/v21-upgrade/README.md +271 -0
  586. package/schematics/migrations/v21-upgrade/data.js +1371 -0
  587. package/schematics/migrations/v21-upgrade/index.js +94 -0
  588. package/schematics/migrations/v21-upgrade/schema.json +20 -0
  589. package/schematics/migrations/zoneless-change-detection/README.md +30 -0
  590. package/schematics/migrations/zoneless-change-detection/data.js +29 -0
  591. package/schematics/migrations/zoneless-change-detection/index.js +20 -0
  592. package/schematics/migrations/zoneless-change-detection/schema.json +15 -0
  593. package/schematics/migrations.json +392 -2
  594. package/schematics/ng-add/index.js +515 -14
  595. package/schematics/ng-add/schema.json +15 -0
  596. package/schematics/utils/deprecated-path-migration.js +61 -0
  597. package/schematics/utils/package-config.js +9 -105
  598. package/scrollbar/{_scrollbar-component-theme.scss → deprecated/_scrollbar-component-theme.scss} +1 -1
  599. package/scrollbar/{scrollbar.component.scss → deprecated/scrollbar.component.scss} +1 -1
  600. package/scrollbar/native-scrollbar.scss +68 -0
  601. package/scrollbar/scrollbar-tokens.scss +13 -22
  602. package/scrollbar/scrollbar-track.scss +94 -0
  603. package/scrollbar/scrollbar-viewport.scss +33 -0
  604. package/scrollbar/scrollbar.scss +24 -0
  605. package/search-expandable/search-expandable-tokens.scss +4 -0
  606. package/search-expandable/search-expandable.scss +4 -2
  607. package/select/_select-theme.scss +3 -16
  608. package/select/select.scss +0 -6
  609. package/sidebar/sidebar.scss +20 -0
  610. package/sidepanel/_sidepanel-theme.scss +1 -1
  611. package/sidepanel/sidepanel-tokens.scss +7 -1
  612. package/sidepanel/sidepanel.scss +41 -5
  613. package/skeleton/skeleton-presets.scss +350 -0
  614. package/skeleton/skeleton-tokens.scss +127 -0
  615. package/skeleton/skeleton.scss +53 -45
  616. package/split-button/_split-button-theme.scss +4 -4
  617. package/split-button/split-button.scss +2 -6
  618. package/splitter/{_splitter-theme.scss → deprecated/_splitter-theme.scss} +1 -1
  619. package/splitter/deprecated/splitter.scss +51 -0
  620. package/splitter/splitter-tokens.scss +19 -0
  621. package/splitter/splitter.scss +148 -28
  622. package/table/_table-theme.scss +13 -12
  623. package/table/table-tokens.scss +8 -0
  624. package/table/table.scss +47 -22
  625. package/tabs/_tabs-common.scss +14 -14
  626. package/tabs/_tabs-theme.scss +4 -5
  627. package/tabs/tab-body.scss +49 -1
  628. package/tabs/tab-header.scss +2 -1
  629. package/tags/tag-list.scss +4 -0
  630. package/tags/tag.scss +19 -1
  631. package/time-range/time-range.scss +9 -0
  632. package/timezone/timezone-option.component.scss +4 -7
  633. package/timezone/timezone-select.component.scss +3 -0
  634. package/toast/_toast-theme.scss +1 -4
  635. package/toast/toast-container.component.scss +19 -13
  636. package/toast/toast-tokens.scss +12 -6
  637. package/toast/toast.component.scss +42 -19
  638. package/toggle/_toggle-theme.scss +4 -10
  639. package/toggle/toggle.scss +67 -26
  640. package/tooltip/_tooltip-theme.scss +7 -1
  641. package/tooltip/tooltip-tokens.scss +1 -2
  642. package/tooltip/tooltip.scss +55 -9
  643. package/top-bar/top-bar-tokens.scss +13 -2
  644. package/top-bar/top-bar.scss +24 -19
  645. package/tree/_tree-theme.scss +0 -1
  646. package/tree/toggle.scss +5 -9
  647. package/tree/tree-option.scss +2 -4
  648. package/tree/tree-tokens.scss +2 -1
  649. package/tree/tree.scss +3 -5
  650. package/tree-select/_tree-select-theme.scss +4 -15
  651. package/tree-select/tree-select-tokens.scss +16 -0
  652. package/tree-select/tree-select.scss +0 -6
  653. package/{accordion/index.d.ts → types/koobiq-components-accordion.d.ts} +102 -84
  654. package/{actions-panel/index.d.ts → types/koobiq-components-actions-panel.d.ts} +44 -59
  655. package/{alert/index.d.ts → types/koobiq-components-alert.d.ts} +8 -3
  656. package/types/koobiq-components-app-switcher.d.ts +406 -0
  657. package/types/koobiq-components-autocomplete.d.ts +443 -0
  658. package/{badge/index.d.ts → types/koobiq-components-badge.d.ts} +25 -20
  659. package/{breadcrumbs/index.d.ts → types/koobiq-components-breadcrumbs.d.ts} +97 -46
  660. package/types/koobiq-components-button-toggle.d.ts +340 -0
  661. package/types/koobiq-components-button.d.ts +296 -0
  662. package/types/koobiq-components-checkbox.d.ts +172 -0
  663. package/types/koobiq-components-clamped-text.d.ts +184 -0
  664. package/{code-block/index.d.ts → types/koobiq-components-code-block.d.ts} +114 -79
  665. package/{content-panel/index.d.ts → types/koobiq-components-content-panel.d.ts} +81 -25
  666. package/{core/index.d.ts → types/koobiq-components-core.d.ts} +2827 -865
  667. package/{datepicker/index.d.ts → types/koobiq-components-datepicker.d.ts} +161 -116
  668. package/types/koobiq-components-divider.d.ts +43 -0
  669. package/types/koobiq-components-dl.d.ts +235 -0
  670. package/{dropdown/index.d.ts → types/koobiq-components-dropdown.d.ts} +245 -239
  671. package/types/koobiq-components-ellipsis-center.d.ts +85 -0
  672. package/types/koobiq-components-empty-state.d.ts +106 -0
  673. package/{file-upload/index.d.ts → types/koobiq-components-file-upload.d.ts} +214 -107
  674. package/{filter-bar/index.d.ts → types/koobiq-components-filter-bar.d.ts} +410 -495
  675. package/types/koobiq-components-flag.d.ts +68 -0
  676. package/{form-field/index.d.ts → types/koobiq-components-form-field.d.ts} +167 -191
  677. package/types/koobiq-components-icon.d.ts +333 -0
  678. package/{inline-edit/index.d.ts → types/koobiq-components-inline-edit.d.ts} +109 -46
  679. package/types/koobiq-components-input.d.ts +477 -0
  680. package/types/koobiq-components-link-deprecated.d.ts +101 -0
  681. package/types/koobiq-components-link.d.ts +176 -0
  682. package/{list/index.d.ts → types/koobiq-components-list.d.ts} +162 -99
  683. package/types/koobiq-components-loader-overlay.d.ts +101 -0
  684. package/{markdown/index.d.ts → types/koobiq-components-markdown.d.ts} +16 -24
  685. package/types/koobiq-components-modal.d.ts +666 -0
  686. package/types/koobiq-components-navbar.d.ts +569 -0
  687. package/types/koobiq-components-notification-center.d.ts +500 -0
  688. package/{overflow-items/index.d.ts → types/koobiq-components-overflow-items.d.ts} +8 -22
  689. package/types/koobiq-components-popover.d.ts +468 -0
  690. package/types/koobiq-components-progress-bar.d.ts +67 -0
  691. package/{progress-spinner/index.d.ts → types/koobiq-components-progress-spinner.d.ts} +33 -10
  692. package/types/koobiq-components-radio.d.ts +294 -0
  693. package/{resizer/index.d.ts → types/koobiq-components-resizer.d.ts} +37 -2
  694. package/{scrollbar/index.d.ts → types/koobiq-components-scrollbar-deprecated.d.ts} +18 -1
  695. package/types/koobiq-components-scrollbar.d.ts +154 -0
  696. package/types/koobiq-components-search-expandable.d.ts +164 -0
  697. package/{select/index.d.ts → types/koobiq-components-select.d.ts} +360 -167
  698. package/types/koobiq-components-sidebar.d.ts +152 -0
  699. package/types/koobiq-components-sidepanel.d.ts +436 -0
  700. package/types/koobiq-components-skeleton.d.ts +234 -0
  701. package/types/koobiq-components-split-button.d.ts +65 -0
  702. package/{splitter/index.d.ts → types/koobiq-components-splitter-deprecated.d.ts} +44 -1
  703. package/types/koobiq-components-splitter.d.ts +406 -0
  704. package/types/koobiq-components-table.d.ts +44 -0
  705. package/types/koobiq-components-tabs.d.ts +888 -0
  706. package/{tags/index.d.ts → types/koobiq-components-tags.d.ts} +249 -133
  707. package/types/koobiq-components-textarea.d.ts +178 -0
  708. package/{time-range/index.d.ts → types/koobiq-components-time-range.d.ts} +135 -62
  709. package/types/koobiq-components-timepicker.d.ts +223 -0
  710. package/types/koobiq-components-timezone.d.ts +266 -0
  711. package/types/koobiq-components-title.d.ts +184 -0
  712. package/types/koobiq-components-toast.d.ts +289 -0
  713. package/types/koobiq-components-toggle.d.ts +121 -0
  714. package/types/koobiq-components-tooltip.d.ts +610 -0
  715. package/types/koobiq-components-top-bar.d.ts +61 -0
  716. package/types/koobiq-components-tree-select.d.ts +667 -0
  717. package/types/koobiq-components-tree.d.ts +1290 -0
  718. package/types/koobiq-components-username.d.ts +340 -0
  719. package/username/_username-theme.scss +35 -0
  720. package/username/username.scss +10 -34
  721. package/app-switcher/index.d.ts +0 -276
  722. package/autocomplete/index.d.ts +0 -286
  723. package/button/index.d.ts +0 -153
  724. package/button-toggle/index.d.ts +0 -162
  725. package/checkbox/index.d.ts +0 -163
  726. package/clamped-text/index.d.ts +0 -146
  727. package/core/styles/_tokens.scss +0 -7
  728. package/core/styles/common/_clearfix.scss +0 -13
  729. package/core/styles/common/_popup.scss +0 -6
  730. package/core/styles/functions/_index.scss +0 -3
  731. package/core/styles/functions/_number.scss +0 -60
  732. package/core/styles/functions/_string.scss +0 -18
  733. package/core/styles/theming/scrollbar-tokens.scss +0 -25
  734. package/core/styles/typography/_typography-utils.scss +0 -84
  735. package/divider/index.d.ts +0 -20
  736. package/dl/index.d.ts +0 -45
  737. package/ellipsis-center/index.d.ts +0 -71
  738. package/empty-state/index.d.ts +0 -45
  739. package/flag/index.d.ts +0 -44
  740. package/icon/index.d.ts +0 -200
  741. package/input/index.d.ts +0 -354
  742. package/link/index.d.ts +0 -56
  743. package/loader-overlay/index.d.ts +0 -57
  744. package/modal/index.d.ts +0 -339
  745. package/navbar/index.d.ts +0 -372
  746. package/notification-center/index.d.ts +0 -323
  747. package/popover/index.d.ts +0 -182
  748. package/prebuilt-themes/dark-theme.css +0 -1
  749. package/prebuilt-themes/light-theme.css +0 -1
  750. package/progress-bar/index.d.ts +0 -31
  751. package/radio/index.d.ts +0 -203
  752. package/search-expandable/index.d.ts +0 -101
  753. package/sidebar/index.d.ts +0 -94
  754. package/sidepanel/index.d.ts +0 -272
  755. package/skeleton/index.d.ts +0 -26
  756. package/split-button/index.d.ts +0 -46
  757. package/table/index.d.ts +0 -25
  758. package/tabs/index.d.ts +0 -677
  759. package/textarea/index.d.ts +0 -138
  760. package/timepicker/index.d.ts +0 -197
  761. package/timezone/index.d.ts +0 -125
  762. package/title/index.d.ts +0 -139
  763. package/toast/index.d.ts +0 -178
  764. package/toggle/index.d.ts +0 -104
  765. package/tooltip/index.d.ts +0 -335
  766. package/top-bar/index.d.ts +0 -33
  767. package/tree/index.d.ts +0 -802
  768. package/tree-select/index.d.ts +0 -475
  769. package/username/index.d.ts +0 -194
  770. /package/{dynamic-translation/index.d.ts → types/koobiq-components-dynamic-translation.d.ts} +0 -0
  771. /package/{index.d.ts → types/koobiq-components.d.ts} +0 -0
@@ -1,41 +1,100 @@
1
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
1
+ import { _IdGenerator, A11yModule } from '@angular/cdk/a11y';
2
2
  import { getSupportedInputTypes } from '@angular/cdk/platform';
3
3
  import * as i0 from '@angular/core';
4
- import { forwardRef, inject, ElementRef, Renderer2, EventEmitter, input, booleanAttribute, HostAttributeToken, Input, Directive, InjectionToken, NgModule } from '@angular/core';
4
+ import { InjectionToken, forwardRef, inject, ElementRef, Renderer2, NgZone, DestroyRef, input, booleanAttribute, signal, computed, effect, untracked, Directive, linkedSignal, NgModule } from '@angular/core';
5
5
  import { NG_VALUE_ACCESSOR, NgControl, NgForm, FormGroupDirective, NG_VALIDATORS, Validators, FormsModule } from '@angular/forms';
6
- import { ruRUFormattersData, KBQ_DEFAULT_PRECISION_SEPARATOR, KBQ_LOCALE_SERVICE, V, X, Z, NUMPAD_MINUS, DASH, FF_MINUS, DELETE, BACKSPACE, TAB, ESCAPE, ENTER, LEFT_ARROW, RIGHT_ARROW, HOME, END, normalizeNumber, isSelectAll, isCopy, isFunctionKey, isNumberKey, isNumpadKey, UP_ARROW, DOWN_ARROW, checkAndNormalizeLocalizedNumber, formatNumberWithLocale, ErrorStateMatcher, kbqInjectAutofilled } from '@koobiq/components/core';
6
+ import * as i1 from '@koobiq/components/core';
7
+ import { ruRUFormattersData, kbqLocaleConfigurationOverrideProvider, KBQ_DEFAULT_LOCALE_ID, KBQ_DEFAULT_PRECISION_SEPARATOR, normalizeNumber, KBQ_LOCALE_SERVICE, KbqLocaleOverridesDirective, V, X, Z, NUMPAD_MINUS, DASH, FF_MINUS, DELETE, BACKSPACE, TAB, ESCAPE, ENTER, LEFT_ARROW, RIGHT_ARROW, HOME, END, isSelectAll, isCopy, isFunctionKey, isNumberKey, isNumpadKey, UP_ARROW, DOWN_ARROW, checkAndNormalizeLocalizedNumber, formatNumberWithLocale, ErrorStateMatcher, KbqErrorStateTracker, kbqInjectAutofilled } from '@koobiq/components/core';
7
8
  import { KbqFormFieldControl, KbqFormFieldModule } from '@koobiq/components/form-field';
9
+ import { coerceNumberProperty } from '@angular/cdk/coercion';
8
10
  import { Subject } from 'rxjs';
9
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
- import { A11yModule } from '@angular/cdk/a11y';
11
11
  import { KbqIconModule } from '@koobiq/components/icon';
12
12
 
13
13
  function getKbqInputUnsupportedTypeError(inputType) {
14
14
  return Error(`Input type "${inputType}" isn't supported by kbqInput.`);
15
15
  }
16
+ /**
17
+ * Logged when `kbqNumberInput` sits on a native number field, which the directive resets to `text`.
18
+ */
19
+ const KBQ_NUMBER_INPUT_UNSUPPORTED_TYPE_MESSAGE = 'Input type "number" isn\'t supported by kbqNumberInput: the native value sanitizer rejects the ' +
20
+ 'formatted value, blanking the field. The type has been reset to "text".';
16
21
 
22
+ /**
23
+ * @deprecated Use {@link KBQ_INPUT_DEFAULT_LOCALE_CONFIGURATION}, which carries the whole `input`
24
+ * locale section rather than just its `number` slice. Will be removed in 22.0.0.
25
+ */
17
26
  const KBQ_INPUT_NUMBER_DEFAULT_CONFIGURATION = ruRUFormattersData.input.number;
27
+ /**
28
+ * Default configuration of `KbqNumberInput`: the whole `input` locale section, of which the number input
29
+ * reads `number`.
30
+ */
31
+ const KBQ_INPUT_DEFAULT_LOCALE_CONFIGURATION = ruRUFormattersData.input;
32
+ /** Injection token for providing the default configuration of `KbqNumberInput`. */
33
+ const KBQ_INPUT_LOCALE_CONFIGURATION = new InjectionToken('KbqInputLocaleConfiguration', { factory: () => KBQ_INPUT_DEFAULT_LOCALE_CONFIGURATION });
34
+ /**
35
+ * Utility provider for `KBQ_INPUT_LOCALE_CONFIGURATION`. Only the values you pass are overridden; the rest
36
+ * keep following the active locale.
37
+ */
38
+ const kbqInputLocaleConfigurationProvider = (configuration) => kbqLocaleConfigurationOverrideProvider('input', configuration);
39
+ /**
40
+ * Default of `bigStep`.
41
+ *
42
+ * @docs-private
43
+ */
18
44
  const BIG_STEP = 10;
45
+ /**
46
+ * Default of `step`.
47
+ *
48
+ * @docs-private
49
+ */
19
50
  const SMALL_STEP = 1;
20
- function normalizeSplitter(value) {
21
- return value ? value.replace(/,/g, KBQ_DEFAULT_PRECISION_SEPARATOR) : value;
51
+ /**
52
+ * The locale id handed to `Intl.NumberFormat`, which is not always the active one.
53
+ *
54
+ * `es-LA` is not a real BCP-47 tag — `LA` is the region code for Laos — so what `Intl` makes of it is
55
+ * up to the ICU data of whatever engine is running: today's Node resolves it to plain `es`, another
56
+ * build may fall back somewhere else entirely. Pinning it to a tag every ICU build carries is a
57
+ * deliberate workaround, not a leftover: it takes that variance out of the rendered number. Remove it
58
+ * only when the locale is renamed to a real tag such as `es-419`.
59
+ */
60
+ function resolveIntlLocale(localeId) {
61
+ return !localeId || localeId === 'es-LA' ? KBQ_DEFAULT_LOCALE_ID : localeId;
22
62
  }
63
+ /**
64
+ * Transform for the numeric inputs: coerces the static attribute form (`min="3"`) and anything a
65
+ * binding produces, falling back to `fallback` for a value that is not a number.
66
+ */
67
+ const numberAttribute = (fallback) => (value) => coerceNumberProperty(value, fallback);
68
+ /** @docs-private */
23
69
  function isFloat(value) {
24
70
  return /^-?\d+\.\d+$/.test(value);
25
71
  }
26
- function isInt(value) {
27
- return /^-?\d+$/.test(value);
28
- }
29
- function isDigit(value) {
30
- return isFloat(value) || isInt(value);
72
+ /**
73
+ * Number of digits after the decimal point. Exponent-aware, so `1e-7` reports `7` rather than the
74
+ * `0` that reading `'1e-7'.split('.')` would give.
75
+ */
76
+ function getFractionDigits(value) {
77
+ const [mantissa, negativeExponent] = value.toString().split(/e-/i);
78
+ const digits = mantissa.split(KBQ_DEFAULT_PRECISION_SEPARATOR)[1]?.length ?? 0;
79
+ return negativeExponent ? digits + Number(negativeExponent) : digits;
31
80
  }
81
+ /**
82
+ * Decimal scale of `value`: `10 ** <number of fraction digits>`.
83
+ *
84
+ * @docs-private
85
+ */
32
86
  function getPrecision(value) {
33
- const arr = value.toString().split(KBQ_DEFAULT_PRECISION_SEPARATOR);
34
- return arr.length === 1 ? 1 : Math.pow(10, arr[1].length);
87
+ return Math.pow(10, getFractionDigits(value));
35
88
  }
89
+ /**
90
+ * Adds two decimal numbers without IEEE-754 drift: both operands are rounded into integer space at
91
+ * the larger of the two scales, added there, and scaled back.
92
+ *
93
+ * @docs-private
94
+ */
36
95
  function add(value1, value2) {
37
96
  const precision = Math.max(getPrecision(value1), getPrecision(value2));
38
- return (value1 * precision + value2 * precision) / precision;
97
+ return (Math.round(value1 * precision) + Math.round(value2 * precision)) / precision;
39
98
  }
40
99
  const KBQ_NUMBER_INPUT_VALUE_ACCESSOR = {
41
100
  provide: NG_VALUE_ACCESSOR,
@@ -43,38 +102,13 @@ const KBQ_NUMBER_INPUT_VALUE_ACCESSOR = {
43
102
  multi: true
44
103
  };
45
104
  class KbqNumberInput {
46
- // TODO: Skipped for migration because:
47
- // Accessor inputs cannot be migrated as they are too complex.
105
+ /** The numeric value of the field, bound with `[value]` or written by a form control. */
48
106
  get value() {
49
- return this._value;
50
- }
51
- set value(value) {
52
- const oldValue = this.value;
53
- this._value = value;
54
- if (oldValue !== value) {
55
- this.setViewValue(this.formatNumber(value));
56
- this.valueChange.emit(value);
57
- }
107
+ return this.valueState() ?? null;
58
108
  }
59
- // TODO: Skipped for migration because:
60
- // Accessor inputs cannot be migrated as they are too complex.
109
+ /** Whether the field is disabled, bound with `[disabled]` or set by a form control. */
61
110
  get disabled() {
62
- return this._disabled;
63
- }
64
- set disabled(value) {
65
- const newValue = coerceBooleanProperty(value);
66
- const element = this.nativeElement;
67
- if (this._disabled !== newValue) {
68
- this._disabled = newValue;
69
- this.disabledChange.emit(newValue);
70
- }
71
- // We need to null check the `blur` method, because it's undefined during SSR.
72
- if (newValue && element.blur) {
73
- // Normally, native input elements automatically blur if they turn disabled. This behavior
74
- // is problematic, because it would mean that it triggers another change detection cycle,
75
- // which then causes a changed after checked error if the input element was focused before.
76
- element.blur();
77
- }
111
+ return this.disabledState();
78
112
  }
79
113
  get nativeElement() {
80
114
  return this.elementRef.nativeElement;
@@ -82,8 +116,19 @@ class KbqNumberInput {
82
116
  get viewValue() {
83
117
  return this.nativeElement.value;
84
118
  }
85
- get ngControl() {
86
- return this.control;
119
+ /**
120
+ * Locale-aware numeric read of the field: parsed straight from `nativeElement.value`, so `"1 234,5"`
121
+ * reads back as `1234.5` where the native `valueAsNumber` of a `type="text"` input reports `NaN`.
122
+ * Computed on every read rather than cached off the committed model, so it never lags behind a
123
+ * keystroke the way `value` can while `onInput`'s reformat is still pending in its `setTimeout(0)` —
124
+ * safe to read from a consumer's own `(input)` handler. An in-progress `"-"` reads as `null`, same as
125
+ * an empty field, rather than the last committed number.
126
+ */
127
+ get valueAsNumber() {
128
+ if (this.viewValue === '' || this.viewValue === '-')
129
+ return null;
130
+ const parsed = Number(normalizeNumber(this.viewValue, this.config));
131
+ return Number.isNaN(parsed) ? null : parsed;
87
132
  }
88
133
  get fractionSeparator() {
89
134
  return this.config.fractionSeparator;
@@ -91,31 +136,69 @@ class KbqNumberInput {
91
136
  get groupSeparator() {
92
137
  return this.config.groupSeparator;
93
138
  }
139
+ get config() {
140
+ return this.localeConfiguration().number;
141
+ }
94
142
  constructor() {
95
143
  this.elementRef = inject(ElementRef);
96
144
  this.renderer = inject(Renderer2);
145
+ this.ngZone = inject(NgZone);
146
+ this.destroyRef = inject(DestroyRef);
97
147
  this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
98
148
  /** Emits when the value changes (either due to user input or programmatic change). */
99
- this.valueChange = new EventEmitter();
149
+ this.valueChange = new Subject();
100
150
  /** Emits when the disabled state has changed */
101
- this.disabledChange = new EventEmitter();
151
+ this.disabledChange = new Subject();
152
+ /** Emits whenever the focused or disabled state of the directive changes. */
102
153
  this.stateChanges = new Subject();
103
154
  /**
104
- * Implemented as part of KbqFormFieldControl.
155
+ * Discriminator read by `kbq-stepper` to find the control it drives.
156
+ *
105
157
  * @docs-private
106
158
  */
107
159
  this.controlType = 'input-number';
108
160
  /**
109
161
  * Allows input and pasting of integers only.
110
162
  */
111
- this.integer = input(false, ...(ngDevMode ? [{ debugName: "integer", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
112
- this.withThousandSeparator = input(true, ...(ngDevMode ? [{ debugName: "withThousandSeparator", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
163
+ this.integer = input(false, { ...(ngDevMode ? { debugName: "integer" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
164
+ /** Step applied when `Shift` is held. */
165
+ this.bigStep = input(BIG_STEP, { ...(ngDevMode ? { debugName: "bigStep" } : /* istanbul ignore next */ {}), transform: numberAttribute(BIG_STEP) });
166
+ /** Step applied by the arrow keys and by `kbq-stepper`. */
167
+ this.step = input(SMALL_STEP, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute(SMALL_STEP) });
168
+ /** Lower bound the value is clamped to when stepping. */
169
+ this.min = input(-Infinity, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute(-Infinity) });
170
+ /** Upper bound the value is clamped to when stepping. */
171
+ this.max = input(Infinity, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute(Infinity) });
172
+ this.withThousandSeparator = input(true, { ...(ngDevMode ? { debugName: "withThousandSeparator" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
113
173
  /**
114
- * Include thousand separator from custom index. For example, it will be useful in tables.
174
+ * Adds the thousand separator only from this power of ten. For example, `4` keeps `1234`
175
+ * un-grouped and groups `12345`. Defaults to the active locale's own value.
115
176
  */
116
- this.startFormattingFrom = input(...(ngDevMode ? [undefined, { debugName: "startFormattingFrom" }] : []));
117
- this._disabled = false;
177
+ this.startFormattingFrom = input(...(ngDevMode ? [undefined, { debugName: "startFormattingFrom" }] : /* istanbul ignore next */ []));
178
+ /** @docs-private */
179
+ this.valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), alias: 'value' });
180
+ this.valueState = signal(undefined, ...(ngDevMode ? [{ debugName: "valueState" }] : /* istanbul ignore next */ []));
181
+ /** @docs-private */
182
+ this.disabledInput = input(undefined, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
183
+ transform: booleanAttribute });
184
+ this.disabledState = signal(false, ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
118
185
  this.focused = false;
186
+ /**
187
+ * An unbounded end reports no `aria-value*`: `Infinity` is not a valid ARIA attribute value.
188
+ * A `computed()` rather than a getter so the value is cached between checks — the host binding
189
+ * itself lives in the declaring view and repaints either way.
190
+ */
191
+ this.ariaValueMin = computed(() => (Number.isFinite(this.min()) ? this.min() : null), ...(ngDevMode ? [{ debugName: "ariaValueMin" }] : /* istanbul ignore next */ []));
192
+ /** The upper bound, reported the way `ariaValueMin` reports the lower one. */
193
+ this.ariaValueMax = computed(() => (Number.isFinite(this.max()) ? this.max() : null), ...(ngDevMode ? [{ debugName: "ariaValueMax" }] : /* istanbul ignore next */ []));
194
+ this.localeConfiguration = inject(KbqLocaleOverridesDirective, { self: true }).read('input', KBQ_INPUT_LOCALE_CONFIGURATION);
195
+ /** Pending `onInput` reformats by timer handle: cancelled on destroy, run at once before a step. */
196
+ this.pendingReformats = new Map();
197
+ /**
198
+ * Called when the control is blurred. Needed to properly implement `ControlValueAccessor`.
199
+ *
200
+ * @docs-private
201
+ */
119
202
  this.onTouched = () => { };
120
203
  this.isCtrlV = (event) => {
121
204
  return event.keyCode === V && (event.ctrlKey || event.metaKey);
@@ -131,35 +214,37 @@ class KbqNumberInput {
131
214
  [this.fractionSeparator, KBQ_DEFAULT_PRECISION_SEPARATOR].includes(event.key));
132
215
  };
133
216
  this.cvaOnChange = () => { };
134
- this.updateLocaleParams = () => {
135
- this.config = this.localeService.getParams('input').number;
136
- this.setViewValue(this.formatNumber(this.value));
137
- };
138
- const step = inject(new HostAttributeToken('step'), { optional: true });
139
- const bigStep = inject(new HostAttributeToken('big-step'), { optional: true });
140
- const min = inject(new HostAttributeToken('min'), { optional: true });
141
- const max = inject(new HostAttributeToken('max'), { optional: true });
142
- const localeService = this.localeService;
143
- this.step = isDigit(step) ? parseFloat(step) : SMALL_STEP;
144
- this.bigStep = isDigit(bigStep) ? parseFloat(bigStep) : BIG_STEP;
145
- this.min = isDigit(min) ? parseFloat(min) : -Infinity;
146
- this.max = isDigit(max) ? parseFloat(max) : Infinity;
147
- if ('valueAsNumber' in this.nativeElement) {
148
- Object.defineProperty(Object.getPrototypeOf(this.nativeElement), 'valueAsNumber', {
149
- get() {
150
- const res = parseFloat(normalizeSplitter(this.value));
151
- return isNaN(res) ? null : res;
152
- }
153
- });
154
- }
155
- this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams);
156
- if (!localeService) {
157
- this.initDefaultParams();
158
- }
217
+ // The inputs stay `undefined` until a template binds them, so an unbound one does not override what a
218
+ // form control wrote through `writeValue` / `setDisabledState`. Once bound, `undefined` clears the value.
219
+ let bound = false;
220
+ effect(() => {
221
+ const value = this.valueInput();
222
+ if (!bound && value === undefined)
223
+ return;
224
+ bound = true;
225
+ untracked(() => this.setValue(value ?? null));
226
+ });
227
+ effect(() => {
228
+ const disabled = this.disabledInput();
229
+ if (disabled !== undefined)
230
+ untracked(() => this.setDisabled(disabled));
231
+ });
232
+ // Re-render the value in the separators of the new locale. `untracked` keeps the configuration the
233
+ // only dependency: formatting also reads the `withThousandSeparator` input, which must not rewrite
234
+ // what the user is typing on its own.
235
+ effect(() => {
236
+ this.localeConfiguration();
237
+ untracked(() => this.setViewValue(this.formatNumber(this.value)));
238
+ });
239
+ this.destroyRef.onDestroy(() => {
240
+ this.pendingReformats.forEach((_, handle) => clearTimeout(handle));
241
+ this.pendingReformats.clear();
242
+ });
159
243
  }
160
244
  ngOnDestroy() {
161
245
  this.valueChange.complete();
162
246
  this.disabledChange.complete();
247
+ this.stateChanges.complete();
163
248
  }
164
249
  onContainerClick() {
165
250
  this.focus();
@@ -169,7 +254,7 @@ class KbqNumberInput {
169
254
  }
170
255
  // Implemented as part of ControlValueAccessor.
171
256
  writeValue(value) {
172
- this.value = value;
257
+ this.setValue(value);
173
258
  }
174
259
  // Implemented as part of ControlValueAccessor.
175
260
  registerOnChange(fn) {
@@ -181,7 +266,7 @@ class KbqNumberInput {
181
266
  }
182
267
  // Implemented as part of ControlValueAccessor.
183
268
  setDisabledState(isDisabled) {
184
- this.disabled = isDisabled;
269
+ this.setDisabled(isDisabled);
185
270
  }
186
271
  focusChanged(isFocused) {
187
272
  if (isFocused !== this.focused) {
@@ -200,11 +285,11 @@ class KbqNumberInput {
200
285
  // should parse normalized fractionSeparator
201
286
  const viewValueToBeChecked = normalizeNumber(this.viewValue, this.config);
202
287
  const shouldSkipForIntegerMode = this.integer() && this.isPeriod(event);
203
- const isMinusAllowed = minuses.includes(keyCode) && (this.viewValue.includes(event.key) || this.min >= 0);
288
+ const shouldBlockMinus = minuses.includes(keyCode) && (this.viewValue.includes(event.key) || this.min() >= 0);
204
289
  const isSignAndFractionSepAlreadyExists = this.isPeriod(event) &&
205
290
  [this.fractionSeparator, KBQ_DEFAULT_PRECISION_SEPARATOR].includes(event.key) &&
206
291
  viewValueToBeChecked.indexOf(KBQ_DEFAULT_PRECISION_SEPARATOR) !== -1;
207
- if (shouldSkipForIntegerMode || isMinusAllowed || isSignAndFractionSepAlreadyExists) {
292
+ if (shouldSkipForIntegerMode || shouldBlockMinus || isSignAndFractionSepAlreadyExists) {
208
293
  event.preventDefault();
209
294
  return;
210
295
  }
@@ -225,7 +310,7 @@ class KbqNumberInput {
225
310
  if (event.shiftKey || isLetter) {
226
311
  event.preventDefault();
227
312
  // process steps
228
- const step = event.shiftKey ? this.bigStep : this.step;
313
+ const step = event.shiftKey ? this.bigStep() : this.step();
229
314
  if (keyCode === UP_ARROW) {
230
315
  this.stepUp(step);
231
316
  }
@@ -237,7 +322,11 @@ class KbqNumberInput {
237
322
  onInput(event) {
238
323
  const currentValueLength = this.formatNumber(this.value)?.length || 0;
239
324
  const previousSelectionStart = this.nativeElement.selectionStart || 0;
240
- setTimeout(() => {
325
+ // Deferred so the browser has applied the keystroke to the native value before it is reformatted.
326
+ // The handle is tracked and cleared on destroy: a directive torn down between the keystroke and the
327
+ // timeout must not write to a detached node nor push a change into a control the view no longer owns.
328
+ const reformat = (correctCaret) => {
329
+ this.pendingReformats.delete(handle);
241
330
  const fromPaste = event.inputType === 'insertFromPaste';
242
331
  let formattedValue;
243
332
  if (fromPaste) {
@@ -246,28 +335,20 @@ class KbqNumberInput {
246
335
  else {
247
336
  /*this.viewValue is raw and should be reformatted to localized number */
248
337
  formattedValue = this.formatViewValue();
249
- if (this.withThousandSeparator()) {
250
- const offsetWhenSeparatorAdded = 2;
251
- Promise.resolve().then(() => {
252
- if (this.value &&
253
- Math.abs(this.value) >= 1000 &&
254
- Math.abs(this.viewValue.length - currentValueLength) === offsetWhenSeparatorAdded) {
255
- // move selection to the left/right if separator was added/removed
256
- const cursorPosition = Math.max(0, previousSelectionStart + Math.sign(this.viewValue.length - currentValueLength));
257
- this.renderer.setProperty(this.nativeElement, 'selectionStart', cursorPosition);
258
- this.renderer.setProperty(this.nativeElement, 'selectionEnd', cursorPosition);
259
- }
260
- });
338
+ if (correctCaret && this.withThousandSeparator()) {
339
+ this.correctCaretForSeparator(currentValueLength, previousSelectionStart);
261
340
  }
262
341
  }
263
342
  this.setViewValue(formattedValue, !fromPaste);
264
343
  if (this.viewValue !== '-') {
265
344
  this.viewToModelUpdate(formattedValue);
266
345
  }
267
- });
346
+ };
347
+ const handle = setTimeout(() => reformat(true));
348
+ this.pendingReformats.set(handle, reformat);
268
349
  }
269
350
  onPaste(event) {
270
- this.valueFromPaste = checkAndNormalizeLocalizedNumber(event.clipboardData?.getData('text'), this.localeService?.id);
351
+ this.valueFromPaste = checkAndNormalizeLocalizedNumber(event.clipboardData?.getData('text'), this.localeService?.localeId());
271
352
  if (this.valueFromPaste === null || isNaN(this.valueFromPaste)) {
272
353
  event.preventDefault();
273
354
  }
@@ -280,22 +361,48 @@ class KbqNumberInput {
280
361
  }
281
362
  stepUp(step) {
282
363
  this.nativeElement.focus();
283
- const res = Math.max(Math.min(add(this.value || 0, step), this.max), this.min);
364
+ this.commitPendingReformats();
365
+ const res = Math.max(Math.min(add(this.value || 0, step), this.max()), this.min());
284
366
  this.setViewValue(this.formatNumber(res));
285
- this._value = res;
367
+ this.valueState.set(res);
286
368
  this.cvaOnChange(res);
287
- this.valueChange.emit(res);
369
+ this.valueChange.next(res);
288
370
  }
289
371
  stepDown(step) {
290
372
  this.nativeElement.focus();
291
- const res = Math.min(Math.max(add(this.value || 0, -step), this.min), this.max);
373
+ this.commitPendingReformats();
374
+ const res = Math.min(Math.max(add(this.value || 0, -step), this.min()), this.max());
292
375
  this.setViewValue(this.formatNumber(res));
293
- this._value = res;
376
+ this.valueState.set(res);
294
377
  this.cvaOnChange(res);
295
- this.valueChange.emit(res);
378
+ this.valueChange.next(res);
296
379
  }
297
- initDefaultParams() {
298
- this.config = KBQ_INPUT_NUMBER_DEFAULT_CONFIGURATION;
380
+ /**
381
+ * Commits a keystroke whose reformat is still pending, so a step pressed right after typing starts from
382
+ * the typed value rather than the last committed one. The caret correction is skipped: the step rewrites
383
+ * the value it would apply to.
384
+ */
385
+ commitPendingReformats() {
386
+ this.pendingReformats.forEach((reformat, handle) => {
387
+ clearTimeout(handle);
388
+ reformat(false);
389
+ });
390
+ }
391
+ /**
392
+ * Moves the caret one position when a group separator was inserted or removed by the reformat, so it
393
+ * stays next to the same digit. Runs outside the zone: it only writes the selection, which no view or
394
+ * model reads back, and each keystroke would otherwise cost an extra application-wide check.
395
+ */
396
+ correctCaretForSeparator(previousValueLength, previousSelectionStart) {
397
+ const offsetWhenSeparatorAdded = 2;
398
+ this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
399
+ const lengthDelta = this.viewValue.length - previousValueLength;
400
+ if (this.value && Math.abs(this.value) >= 1000 && Math.abs(lengthDelta) === offsetWhenSeparatorAdded) {
401
+ const cursorPosition = Math.max(0, previousSelectionStart + Math.sign(lengthDelta));
402
+ this.renderer.setProperty(this.nativeElement, 'selectionStart', cursorPosition);
403
+ this.renderer.setProperty(this.nativeElement, 'selectionEnd', cursorPosition);
404
+ }
405
+ }));
299
406
  }
300
407
  setViewValue(value, savePosition = false) {
301
408
  const cursorPosition = this.nativeElement.selectionStart;
@@ -305,14 +412,37 @@ class KbqNumberInput {
305
412
  this.renderer.setProperty(this.nativeElement, 'selectionEnd', cursorPosition);
306
413
  }
307
414
  }
415
+ /** Writes a value from outside the field: reformats it and reports the change. */
416
+ setValue(value) {
417
+ const oldValue = this.valueState();
418
+ this.valueState.set(value);
419
+ if (oldValue !== value) {
420
+ this.setViewValue(this.formatNumber(value));
421
+ this.valueChange.next(value);
422
+ }
423
+ }
424
+ setDisabled(disabled) {
425
+ if (this.disabledState() !== disabled) {
426
+ this.disabledState.set(disabled);
427
+ this.disabledChange.next(disabled);
428
+ this.stateChanges.next();
429
+ }
430
+ // We need to null check the `blur` method, because it's undefined during SSR.
431
+ if (disabled && this.nativeElement.blur) {
432
+ // Normally, native input elements automatically blur if they turn disabled. This behavior
433
+ // is problematic, because it would mean that it triggers another change detection cycle,
434
+ // which then causes a changed after checked error if the input element was focused before.
435
+ this.nativeElement.blur();
436
+ }
437
+ }
308
438
  viewToModelUpdate(newValue) {
309
439
  const normalizedValue = newValue === null ? null : +normalizeNumber(newValue, this.config);
310
440
  if (normalizedValue !== this.value) {
311
- this._value = normalizedValue;
441
+ this.valueState.set(normalizedValue);
442
+ // `cvaOnChange` routes through `FormControl.setValue`, which re-runs the validators itself.
312
443
  this.cvaOnChange(normalizedValue);
313
- this.valueChange.emit(normalizedValue);
444
+ this.valueChange.next(normalizedValue);
314
445
  }
315
- this.ngControl?.updateValueAndValidity({ emitEvent: false });
316
446
  }
317
447
  formatViewValue() {
318
448
  // we just need to skip the minus sign and not do any formatting
@@ -340,11 +470,11 @@ class KbqNumberInput {
340
470
  useGrouping: this.withThousandSeparator(),
341
471
  maximumFractionDigits: 20
342
472
  };
343
- if (this.withThousandSeparator() && this.config.startFormattingFrom) {
344
- formatOptions.useGrouping = intPart >= Math.pow(10, this.config.startFormattingFrom);
473
+ const startFormattingFrom = this.startFormattingFrom() ?? this.config.startFormattingFrom;
474
+ if (this.withThousandSeparator() && startFormattingFrom != null) {
475
+ formatOptions.useGrouping = intPart >= Math.pow(10, startFormattingFrom);
345
476
  }
346
- const localeId = !this.localeService || this.localeService.id === 'es-LA' ? 'ru-RU' : this.localeService.id;
347
- const formatter = new Intl.NumberFormat(localeId, formatOptions);
477
+ const formatter = new Intl.NumberFormat(resolveIntlLocale(this.localeService?.localeId()), formatOptions);
348
478
  const formattedIntPart = formatNumberWithLocale(intPart, formatter, this.config);
349
479
  if (fractionPart === undefined) {
350
480
  return formattedIntPart;
@@ -355,39 +485,38 @@ class KbqNumberInput {
355
485
  }
356
486
  return `${formattedIntPart}${this.fractionSeparator}${formattedFractionPart}`;
357
487
  }
358
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqNumberInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
359
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqNumberInput, isStandalone: true, selector: "input[kbqNumberInput]", inputs: { integer: { classPropertyName: "integer", publicName: "integer", isSignal: true, isRequired: false, transformFunction: null }, bigStep: { classPropertyName: "bigStep", publicName: "bigStep", isSignal: false, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: false, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: false, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: false, isRequired: false, transformFunction: null }, withThousandSeparator: { classPropertyName: "withThousandSeparator", publicName: "withThousandSeparator", isSignal: true, isRequired: false, transformFunction: null }, startFormattingFrom: { classPropertyName: "startFormattingFrom", publicName: "startFormattingFrom", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "focusChanged(false)", "focus": "focusChanged(true)", "paste": "onPaste($event)", "keydown": "onKeyDown($event)", "input": "onInput($event)" } }, providers: [KBQ_NUMBER_INPUT_VALUE_ACCESSOR], exportAs: ["kbqNumericalInput"], ngImport: i0 }); }
488
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqNumberInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
489
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqNumberInput, isStandalone: true, selector: "input[kbqNumberInput]", inputs: { integer: { classPropertyName: "integer", publicName: "integer", isSignal: true, isRequired: false, transformFunction: null }, bigStep: { classPropertyName: "bigStep", publicName: "bigStep", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, withThousandSeparator: { classPropertyName: "withThousandSeparator", publicName: "withThousandSeparator", isSignal: true, isRequired: false, transformFunction: null }, startFormattingFrom: { classPropertyName: "startFormattingFrom", publicName: "startFormattingFrom", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "spinbutton" }, listeners: { "blur": "focusChanged(false)", "focus": "focusChanged(true)", "paste": "onPaste($event)", "keydown": "onKeyDown($event)", "input": "onInput($any($event))" }, properties: { "attr.inputmode": "integer() ? 'numeric' : 'decimal'", "attr.aria-valuenow": "value", "attr.aria-valuetext": "viewValue || null", "attr.aria-valuemin": "ariaValueMin()", "attr.aria-valuemax": "ariaValueMax()" } }, providers: [KBQ_NUMBER_INPUT_VALUE_ACCESSOR], exportAs: ["kbqNumberInput", "kbqNumericalInput"], hostDirectives: [{ directive: i1.KbqLocaleOverridesDirective, inputs: ["kbqLocaleOverrides", "localeOverrides"] }], ngImport: i0 }); }
360
490
  }
361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqNumberInput, decorators: [{
491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqNumberInput, decorators: [{
362
492
  type: Directive,
363
493
  args: [{
364
494
  selector: `input[kbqNumberInput]`,
365
495
  providers: [KBQ_NUMBER_INPUT_VALUE_ACCESSOR],
366
496
  host: {
497
+ role: 'spinbutton',
498
+ '[attr.inputmode]': "integer() ? 'numeric' : 'decimal'",
499
+ '[attr.aria-valuenow]': 'value',
500
+ // The formatted, locale-correct string, so the grouped value is announced rather than the raw number.
501
+ '[attr.aria-valuetext]': 'viewValue || null',
502
+ '[attr.aria-valuemin]': 'ariaValueMin()',
503
+ '[attr.aria-valuemax]': 'ariaValueMax()',
367
504
  '(blur)': 'focusChanged(false)',
368
505
  '(focus)': 'focusChanged(true)',
369
506
  '(paste)': 'onPaste($event)',
370
507
  '(keydown)': 'onKeyDown($event)',
371
- '(input)': 'onInput($event)'
508
+ '(input)': 'onInput($any($event))'
372
509
  },
373
- exportAs: 'kbqNumericalInput'
510
+ hostDirectives: [
511
+ { directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }
512
+ ],
513
+ exportAs: 'kbqNumberInput, kbqNumericalInput'
374
514
  }]
375
- }], ctorParameters: () => [], propDecorators: { integer: [{ type: i0.Input, args: [{ isSignal: true, alias: "integer", required: false }] }], bigStep: [{
376
- type: Input
377
- }], step: [{
378
- type: Input
379
- }], min: [{
380
- type: Input
381
- }], max: [{
382
- type: Input
383
- }], withThousandSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "withThousandSeparator", required: false }] }], startFormattingFrom: [{ type: i0.Input, args: [{ isSignal: true, alias: "startFormattingFrom", required: false }] }], value: [{
384
- type: Input
385
- }], disabled: [{
386
- type: Input
387
- }] } });
515
+ }], ctorParameters: () => [], propDecorators: { integer: [{ type: i0.Input, args: [{ isSignal: true, alias: "integer", required: false }] }], bigStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "bigStep", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], withThousandSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "withThousandSeparator", required: false }] }], startFormattingFrom: [{ type: i0.Input, args: [{ isSignal: true, alias: "startFormattingFrom", required: false }] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
388
516
 
389
517
  const KBQ_INPUT_VALUE_ACCESSOR = new InjectionToken('KBQ_INPUT_VALUE_ACCESSOR');
390
518
 
519
+ const isObject$1 = (value) => typeof value === 'object' && value !== null;
391
520
  const KBQ_INPUT_INVALID_TYPES = [
392
521
  'button',
393
522
  'checkbox',
@@ -399,83 +528,10 @@ const KBQ_INPUT_INVALID_TYPES = [
399
528
  'reset',
400
529
  'submit'
401
530
  ];
402
- let nextUniqueId$1 = 0;
403
531
  class KbqInput {
404
- /**
405
- * Implemented as part of KbqFormFieldControl.
406
- * @docs-private
407
- */
408
- // TODO: Skipped for migration because:
409
- // Accessor inputs cannot be migrated as they are too complex.
410
- get disabled() {
411
- if (this.ngControl && this.ngControl.disabled !== null) {
412
- return this.ngControl.disabled;
413
- }
414
- return this._disabled;
415
- }
416
- set disabled(value) {
417
- this._disabled = coerceBooleanProperty(value);
418
- // Browsers may not fire the blur event if the input is disabled too quickly.
419
- // Reset from here to ensure that the element doesn't become stuck.
420
- if (this.focused) {
421
- this.focused = false;
422
- this.stateChanges.next();
423
- }
424
- }
425
- /**
426
- * Implemented as part of KbqFormFieldControl.
427
- * @docs-private
428
- */
429
- // TODO: Skipped for migration because:
430
- // Accessor inputs cannot be migrated as they are too complex.
431
- get id() {
432
- return this._id;
433
- }
434
- set id(value) {
435
- this._id = value || this.uid;
436
- }
437
- /**
438
- * Implemented as part of KbqFormFieldControl.
439
- * @docs-private
440
- */
441
- // TODO: Skipped for migration because:
442
- // Accessor inputs cannot be migrated as they are too complex.
443
- get required() {
444
- return this._required;
445
- }
446
- set required(value) {
447
- this._required = coerceBooleanProperty(value);
448
- }
449
532
  /** Input type of the element. */
450
- // TODO: Skipped for migration because:
451
- // Accessor inputs cannot be migrated as they are too complex.
452
533
  get type() {
453
- return this._type;
454
- }
455
- set type(value) {
456
- this._type = value || 'text';
457
- this.validateType();
458
- // When using Angular inputs, developers are no longer able to set the properties on the native
459
- // input element. To ensure that bindings for `type` work, we need to sync the setter
460
- // with the native property. Textarea elements don't support the type property or attribute.
461
- if (getSupportedInputTypes().has(this._type)) {
462
- this.elementRef.nativeElement.type = this._type;
463
- }
464
- }
465
- /**
466
- * Implemented as part of KbqFormFieldControl.
467
- * @docs-private
468
- */
469
- // TODO: Skipped for migration because:
470
- // Accessor inputs cannot be migrated as they are too complex.
471
- get value() {
472
- return this.inputValueAccessor.value;
473
- }
474
- set value(value) {
475
- if (value !== this.value) {
476
- this.inputValueAccessor.value = value;
477
- this.stateChanges.next();
478
- }
534
+ return this.resolvedType();
479
535
  }
480
536
  constructor() {
481
537
  this.elementRef = inject(ElementRef);
@@ -484,29 +540,39 @@ class KbqInput {
484
540
  this.parentForm = inject(NgForm, { optional: true });
485
541
  this.parentFormGroup = inject(FormGroupDirective, { optional: true });
486
542
  this.defaultErrorStateMatcher = inject(ErrorStateMatcher);
543
+ this.errorStateTracker = new KbqErrorStateTracker(this.defaultErrorStateMatcher, this.ngControl, this.parentFormGroup, this.parentForm);
487
544
  /** Whether the component is in an error state. */
488
- this.errorState = false;
545
+ this.errorState = this.errorStateTracker.errorState;
546
+ /** An object used to control when error messages are shown. */
547
+ this.errorStateMatcher = input(...(ngDevMode ? [undefined, { debugName: "errorStateMatcher" }] : /* istanbul ignore next */ []));
548
+ this.focusedValue = signal(false, ...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
489
549
  /**
490
550
  * Implemented as part of KbqFormFieldControl.
551
+ *
491
552
  * @docs-private
492
553
  */
493
- this.focused = false;
554
+ this.focused = this.focusedValue.asReadonly();
494
555
  /**
495
556
  * Implemented as part of KbqFormFieldControl.
557
+ *
496
558
  * @docs-private
497
559
  */
498
560
  this.autofilled = kbqInjectAutofilled();
499
561
  /**
500
562
  * Implemented as part of KbqFormFieldControl.
563
+ *
501
564
  * @docs-private
502
565
  */
503
- this.stateChanges = new Subject();
566
+ this.controlType = this.numberInput ? 'input-number' : 'input';
567
+ /** @docs-private */
568
+ this.placeholderInput = input(undefined, { ...(ngDevMode ? { debugName: "placeholderInput" } : /* istanbul ignore next */ {}), alias: 'placeholder' });
504
569
  /**
505
- * Implemented as part of KbqFormFieldControl.
570
+ * Implemented as part of KbqFormFieldControl. Writable, so that a select search can supply one.
571
+ *
506
572
  * @docs-private
507
573
  */
508
- this.controlType = this.numberInput ? 'input-number' : 'input';
509
- this.uid = `kbq-input-${nextUniqueId$1++}`;
574
+ this.placeholder = linkedSignal(() => this.placeholderInput(), ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
575
+ this.uid = inject(_IdGenerator).getId('kbq-input-');
510
576
  this.neverEmptyInputTypes = [
511
577
  'date',
512
578
  'datetime',
@@ -515,21 +581,104 @@ class KbqInput {
515
581
  'time',
516
582
  'week'
517
583
  ].filter((t) => getSupportedInputTypes().has(t));
518
- this._disabled = false;
519
- this._required = false;
520
- this._type = 'text';
584
+ /** @docs-private */
585
+ this.disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
586
+ transform: booleanAttribute });
587
+ /** `disabled` of the bound form control, which takes precedence over the input. */
588
+ this.formDisabled = signal(null, ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
589
+ /**
590
+ * Implemented as part of KbqFormFieldControl.
591
+ *
592
+ * @docs-private
593
+ */
594
+ this.disabled = computed(() => this.formDisabled() ?? this.disabledInput(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
595
+ /** @docs-private */
596
+ this.idInput = input(undefined, { ...(ngDevMode ? { debugName: "idInput" } : /* istanbul ignore next */ {}), alias: 'id' });
597
+ /**
598
+ * Implemented as part of KbqFormFieldControl.
599
+ *
600
+ * @docs-private
601
+ */
602
+ this.id = computed(() => this.idInput() || this.uid, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
603
+ /**
604
+ * Implemented as part of KbqFormFieldControl.
605
+ *
606
+ * @docs-private
607
+ */
608
+ this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
609
+ /** @docs-private */
610
+ this.typeInput = input(undefined, { ...(ngDevMode ? { debugName: "typeInput" } : /* istanbul ignore next */ {}), alias: 'type' });
611
+ // A native number field runs the value sanitization algorithm on assignment and drops anything that
612
+ // is not a valid floating-point number — which is every value `kbqNumberInput` renders once a group
613
+ // separator or a comma fraction separator is in it. It also reports `selectionStart` as `null`,
614
+ // disabling caret preservation. Reset rather than throw, so an existing consumer keeps working.
615
+ this.resolvedType = computed(() => {
616
+ const type = this.typeInput() || 'text';
617
+ return this.numberInput && type === 'number' ? 'text' : type;
618
+ }, ...(ngDevMode ? [{ debugName: "resolvedType" }] : /* istanbul ignore next */ []));
619
+ /** @docs-private */
620
+ this.valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), alias: 'value' });
621
+ this.emptyValue = signal(true, ...(ngDevMode ? [{ debugName: "emptyValue" }] : /* istanbul ignore next */ []));
622
+ /**
623
+ * Implemented as part of KbqFormFieldControl.
624
+ *
625
+ * @docs-private
626
+ */
627
+ this.empty = this.emptyValue.asReadonly();
521
628
  const inputValueAccessor = inject(KBQ_INPUT_VALUE_ACCESSOR, { optional: true, self: true });
522
629
  // If no input value accessor was explicitly specified, use the element as the input value accessor.
523
630
  this.inputValueAccessor = inputValueAccessor || this.elementRef.nativeElement;
524
- this.previousNativeValue = this.value;
525
- // Force setter to be called in case id was not specified.
526
- this.id = this.id;
527
- }
528
- ngOnChanges() {
529
- this.stateChanges.next();
530
- }
531
- ngOnDestroy() {
532
- this.stateChanges.complete();
631
+ // A static `type` is on the element before any directive runs, while the effect below runs after a reactive
632
+ // form has written its value from `ngOnChanges`: a number field would sanitize that value away by then.
633
+ if (this.numberInput && this.elementRef.nativeElement.type === 'number') {
634
+ this.elementRef.nativeElement.type = 'text';
635
+ }
636
+ // Read once: a custom accessor may build a new value on every read.
637
+ const initialValue = this.inputValueAccessor.value;
638
+ this.value = signal(initialValue, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
639
+ this.syncedValue = initialValue;
640
+ this.syncedText = this.elementRef.nativeElement.value;
641
+ // A binding of `type` no longer reaches the element on its own: the directive takes the input. Textarea
642
+ // elements don't support the type property or attribute.
643
+ effect(() => {
644
+ const type = this.resolvedType();
645
+ untracked(() => {
646
+ this.validateType();
647
+ if (getSupportedInputTypes().has(type)) {
648
+ this.elementRef.nativeElement.type = type;
649
+ }
650
+ });
651
+ });
652
+ // A bound value replaces the current one whenever the binding changes. The number input takes the same
653
+ // binding and renders it in the locale format, so it owns the element's value.
654
+ effect(() => {
655
+ const value = this.valueInput();
656
+ if (value !== undefined && !this.numberInput) {
657
+ untracked(() => this.value.set(value));
658
+ }
659
+ });
660
+ // A value set in code is written to the element on the next change detection. The one the element last agreed
661
+ // on is not written back: the element may have changed since, as when the number input renders a bound value.
662
+ effect(() => {
663
+ const value = this.value();
664
+ untracked(() => {
665
+ if (value !== this.syncedValue) {
666
+ if (this.inputValueAccessor.value !== value) {
667
+ this.inputValueAccessor.value = value;
668
+ }
669
+ this.syncedValue = value;
670
+ this.syncedText = this.elementRef.nativeElement.value;
671
+ }
672
+ this.dirtyCheckNativeValue();
673
+ });
674
+ });
675
+ // Browsers may not fire the blur event if the input is disabled too quickly.
676
+ // Reset from here to ensure that the element doesn't become stuck.
677
+ effect(() => {
678
+ if (this.disabled()) {
679
+ untracked(() => this.focusedValue.set(false));
680
+ }
681
+ });
533
682
  }
534
683
  ngDoCheck() {
535
684
  if (this.ngControl) {
@@ -537,6 +686,7 @@ class KbqInput {
537
686
  // error triggers that we can't subscribe to (e.g. parent form submissions). This means
538
687
  // that whatever logic is in here has to be super lean or we risk destroying the performance.
539
688
  this.updateErrorState();
689
+ this.formDisabled.set(this.ngControl.disabled);
540
690
  }
541
691
  // We need to dirty-check the native element's value, because there are some cases where
542
692
  // we won't be notified when it changes (e.g. the consumer isn't using forms or they're
@@ -544,15 +694,8 @@ class KbqInput {
544
694
  this.dirtyCheckNativeValue();
545
695
  }
546
696
  updateErrorState() {
547
- const oldState = this.errorState;
548
- const parent = this.parentFormGroup || this.parentForm;
549
- const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;
550
- const control = this.ngControl ? this.ngControl.control : null;
551
- const newState = matcher.isErrorState(control, parent);
552
- if (newState !== oldState) {
553
- this.errorState = newState;
554
- this.stateChanges.next();
555
- }
697
+ this.errorStateTracker.errorStateMatcher = this.errorStateMatcher();
698
+ this.errorStateTracker.updateErrorState();
556
699
  }
557
700
  /** Focuses the input. */
558
701
  focus() {
@@ -563,42 +706,48 @@ class KbqInput {
563
706
  }
564
707
  /** Callback for the cases where the focused state of the input changes. */
565
708
  focusChanged(isFocused) {
566
- if (this.focused !== isFocused) {
567
- this.focused = isFocused;
568
- this.stateChanges.next();
569
- }
709
+ this.focusedValue.set(isFocused);
570
710
  }
571
711
  /**
572
712
  * Implemented as part of KbqFormFieldControl.
713
+ *
573
714
  * @docs-private
574
715
  */
575
- get empty() {
576
- return !this.isNeverEmpty() && !this.elementRef.nativeElement.value && !this.isBadInput();
716
+ onContainerClick() {
717
+ this.focus();
577
718
  }
578
719
  /**
579
- * Implemented as part of KbqFormFieldControl.
720
+ * Reads the native value back, since it changes without notice: through the forms API, which writes the
721
+ * element directly, or by the user typing into an input that no form listens to.
722
+ *
580
723
  * @docs-private
581
724
  */
582
- onContainerClick() {
583
- this.focus();
584
- }
585
- /** Does some manual dirty checking on the native input `value` property. */
586
725
  dirtyCheckNativeValue() {
587
- const newValue = this.value;
588
- if (this.previousNativeValue !== newValue) {
589
- this.previousNativeValue = newValue;
590
- this.stateChanges.next();
726
+ const nativeValue = this.inputValueAccessor.value;
727
+ const text = this.elementRef.nativeElement.value;
728
+ // Only a change of the element itself: a value set in code and not yet written must not be overwritten. An
729
+ // object counts as changed only with the text, as a custom accessor may build a new one on every read.
730
+ if (nativeValue !== this.syncedValue && (!isObject$1(nativeValue) || text !== this.syncedText)) {
731
+ this.syncedValue = nativeValue;
732
+ this.syncedText = text;
733
+ this.value.set(nativeValue);
591
734
  }
735
+ this.emptyValue.set(this.isEmpty());
592
736
  }
593
737
  /** Make sure the input is a supported type. */
594
738
  validateType() {
595
- if (KBQ_INPUT_INVALID_TYPES.indexOf(this._type) > -1) {
596
- throw getKbqInputUnsupportedTypeError(this._type);
739
+ const type = this.typeInput() || 'text';
740
+ if (KBQ_INPUT_INVALID_TYPES.indexOf(type) > -1) {
741
+ throw getKbqInputUnsupportedTypeError(type);
742
+ }
743
+ if (this.numberInput && type === 'number' && (typeof ngDevMode === 'undefined' || ngDevMode)) {
744
+ // eslint-disable-next-line no-console
745
+ console.warn(KBQ_NUMBER_INPUT_UNSUPPORTED_TYPE_MESSAGE);
597
746
  }
598
747
  }
599
748
  /** Checks whether the input type is one of the types that are never empty. */
600
749
  isNeverEmpty() {
601
- return this.neverEmptyInputTypes.indexOf(this._type) > -1;
750
+ return this.neverEmptyInputTypes.indexOf(this.type) > -1;
602
751
  }
603
752
  /** Checks whether the input is invalid based on the native validation. */
604
753
  isBadInput() {
@@ -606,15 +755,18 @@ class KbqInput {
606
755
  const validity = this.elementRef.nativeElement.validity;
607
756
  return validity?.badInput;
608
757
  }
609
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
610
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqInput, isStandalone: true, selector: "input[kbqInput],input[kbqNumberInput]", inputs: { errorStateMatcher: "errorStateMatcher", placeholder: "placeholder", disabled: "disabled", id: "id", required: "required", type: "type", value: "value" }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)" }, properties: { "attr.id": "id", "attr.placeholder": "placeholder", "attr.disabled": "disabled || null", "required": "required" }, classAttribute: "kbq-input" }, providers: [
758
+ isEmpty() {
759
+ return !this.isNeverEmpty() && !this.elementRef.nativeElement.value && !this.isBadInput();
760
+ }
761
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
762
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqInput, isStandalone: true, selector: "input[kbqInput],input[kbqNumberInput]", inputs: { errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", 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 }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, typeInput: { classPropertyName: "typeInput", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)", "input": "dirtyCheckNativeValue()" }, properties: { "attr.id": "id()", "attr.placeholder": "placeholder()", "attr.disabled": "disabled() || null", "attr.aria-invalid": "errorState()", "required": "required()" }, classAttribute: "kbq-input" }, providers: [
611
763
  {
612
764
  provide: KbqFormFieldControl,
613
765
  useExisting: KbqInput
614
766
  }
615
- ], exportAs: ["kbqInput"], usesOnChanges: true, ngImport: i0 }); }
767
+ ], exportAs: ["kbqInput"], ngImport: i0 }); }
616
768
  }
617
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqInput, decorators: [{
769
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqInput, decorators: [{
618
770
  type: Directive,
619
771
  args: [{
620
772
  selector: `input[kbqInput],input[kbqNumberInput]`,
@@ -628,55 +780,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
628
780
  class: 'kbq-input',
629
781
  // Native input properties that are overwritten by Angular inputs need to be synced with
630
782
  // the native input element. Otherwise property bindings for those don't work.
631
- '[attr.id]': 'id',
632
- '[attr.placeholder]': 'placeholder',
633
- '[attr.disabled]': 'disabled || null',
634
- '[required]': 'required',
783
+ '[attr.id]': 'id()',
784
+ '[attr.placeholder]': 'placeholder()',
785
+ '[attr.disabled]': 'disabled() || null',
786
+ '[attr.aria-invalid]': 'errorState()',
787
+ '[required]': 'required()',
635
788
  '(blur)': 'onBlur()',
636
- '(focus)': 'focusChanged(true)'
789
+ '(focus)': 'focusChanged(true)',
790
+ '(input)': 'dirtyCheckNativeValue()'
637
791
  },
638
792
  exportAs: 'kbqInput'
639
793
  }]
640
- }], ctorParameters: () => [], propDecorators: { errorStateMatcher: [{
641
- type: Input
642
- }], placeholder: [{
643
- type: Input
644
- }], disabled: [{
645
- type: Input
646
- }], id: [{
647
- type: Input
648
- }], required: [{
649
- type: Input
650
- }], type: [{
651
- type: Input
652
- }], value: [{
653
- type: Input
654
- }] } });
794
+ }], ctorParameters: () => [], propDecorators: { errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], placeholderInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], idInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], typeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
655
795
  class KbqInputMono {
656
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqInputMono, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
657
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqInputMono, isStandalone: true, selector: "input[kbqInputMonospace]", host: { classAttribute: "kbq-input_monospace" }, exportAs: ["KbqInputMonospace"], ngImport: i0 }); }
796
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqInputMono, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
797
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqInputMono, isStandalone: true, selector: "input[kbqInputMonospace]", host: { classAttribute: "kbq-input_monospace" }, exportAs: ["kbqInputMonospace", "KbqInputMonospace"], ngImport: i0 }); }
658
798
  }
659
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqInputMono, decorators: [{
799
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqInputMono, decorators: [{
660
800
  type: Directive,
661
801
  args: [{
662
802
  selector: 'input[kbqInputMonospace]',
663
803
  host: { class: 'kbq-input_monospace' },
664
- exportAs: 'KbqInputMonospace'
804
+ exportAs: 'kbqInputMonospace, KbqInputMonospace'
665
805
  }]
666
806
  }] });
667
807
 
668
- const MIN_VALIDATOR = {
808
+ /**
809
+ * Transform for the validator bounds. `coerceNumberProperty`, not `parseInt`: the bound value may be a
810
+ * fractional number or the string form of a static `min="0.5"` attribute, and `parseInt` would truncate
811
+ * both to `0`. A non-numeric bound becomes `NaN`, which installs no validator and writes no attribute.
812
+ */
813
+ const bound = (value) => coerceNumberProperty(value, NaN);
814
+ const KBQ_MIN_VALIDATOR = {
669
815
  provide: NG_VALIDATORS,
670
- useExisting: forwardRef(() => MinValidator),
816
+ useExisting: forwardRef(() => KbqMinValidator),
671
817
  multi: true
672
818
  };
673
819
  /**
674
- * A directive which installs the MinValidator for any `formControlName`,
820
+ * A directive which installs the `KbqMinValidator` for any `formControlName`,
675
821
  * `formControl`, or control with `ngModel` that also has a `min` attribute.
676
822
  */
677
- class MinValidator {
823
+ class KbqMinValidator {
678
824
  constructor() {
679
- this.min = input(undefined, ...(ngDevMode ? [{ debugName: "min" }] : []));
825
+ /** Lower bound installed as `Validators.min`. A non-numeric bound reads back as `NaN`. */
826
+ this.min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: bound });
827
+ /** `min()` unless it is `NaN`, which has no DOM representation. */
828
+ this.coercedMin = computed(() => (Number.isNaN(this.min()) ? null : this.min()), ...(ngDevMode ? [{ debugName: "coercedMin" }] : /* istanbul ignore next */ []));
680
829
  }
681
830
  ngOnChanges(changes) {
682
831
  if ('min' in changes) {
@@ -693,33 +842,41 @@ class MinValidator {
693
842
  this.onChange = fn;
694
843
  }
695
844
  createValidator() {
696
- this.validator = Validators.min(parseInt(this.min(), 10));
845
+ const min = this.min();
846
+ this.validator = Number.isNaN(min) ? Validators.nullValidator : Validators.min(min);
697
847
  }
698
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: MinValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
699
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: MinValidator, isStandalone: true, selector: "[min][formControlName],[min][formControl],[min][ngModel]", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.min": "min() ? min() : null" } }, providers: [MIN_VALIDATOR], usesOnChanges: true, ngImport: i0 }); }
848
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqMinValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
849
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqMinValidator, isStandalone: true, selector: "[min][formControlName],[min][formControl],[min][ngModel]", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.min": "coercedMin() ?? null" } }, providers: [KBQ_MIN_VALIDATOR], usesOnChanges: true, ngImport: i0 }); }
700
850
  }
701
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: MinValidator, decorators: [{
851
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqMinValidator, decorators: [{
702
852
  type: Directive,
703
853
  args: [{
704
854
  selector: '[min][formControlName],[min][formControl],[min][ngModel]',
705
- providers: [MIN_VALIDATOR],
855
+ providers: [KBQ_MIN_VALIDATOR],
706
856
  host: {
707
- '[attr.min]': 'min() ? min() : null'
857
+ // Coerced rather than the raw `min()`, so a non-numeric bound (e.g. `"5px"`) is dropped from the
858
+ // DOM exactly like it is from the installed validator, instead of writing a bogus `min` attribute.
859
+ // `?? null` rather than a falsy check: a bound `[min]="0"` is the most common lower bound and must
860
+ // still reach the DOM.
861
+ '[attr.min]': 'coercedMin() ?? null'
708
862
  }
709
863
  }]
710
864
  }], propDecorators: { min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }] } });
711
- const MAX_VALIDATOR = {
865
+ const KBQ_MAX_VALIDATOR = {
712
866
  provide: NG_VALIDATORS,
713
- useExisting: forwardRef(() => MaxValidator),
867
+ useExisting: forwardRef(() => KbqMaxValidator),
714
868
  multi: true
715
869
  };
716
870
  /**
717
- * A directive which installs the MaxValidator for any `formControlName`,
718
- * `formControl`, or control with `ngModel` that also has a `min` attribute.
871
+ * A directive which installs the `KbqMaxValidator` for any `formControlName`,
872
+ * `formControl`, or control with `ngModel` that also has a `max` attribute.
719
873
  */
720
- class MaxValidator {
874
+ class KbqMaxValidator {
721
875
  constructor() {
722
- this.max = input(undefined, ...(ngDevMode ? [{ debugName: "max" }] : []));
876
+ /** Upper bound installed as `Validators.max`. A non-numeric bound reads back as `NaN`. */
877
+ this.max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: bound });
878
+ /** `max()` unless it is `NaN`, which has no DOM representation. */
879
+ this.coercedMax = computed(() => (Number.isNaN(this.max()) ? null : this.max()), ...(ngDevMode ? [{ debugName: "coercedMax" }] : /* istanbul ignore next */ []));
723
880
  }
724
881
  ngOnChanges(changes) {
725
882
  if ('max' in changes) {
@@ -736,139 +893,143 @@ class MaxValidator {
736
893
  this.onChange = fn;
737
894
  }
738
895
  createValidator() {
739
- this.validator = Validators.max(parseInt(this.max(), 10));
896
+ const max = this.max();
897
+ this.validator = Number.isNaN(max) ? Validators.nullValidator : Validators.max(max);
740
898
  }
741
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: MaxValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
742
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: MaxValidator, isStandalone: true, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.max": "max() ? max() : null" } }, providers: [MAX_VALIDATOR], usesOnChanges: true, ngImport: i0 }); }
899
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqMaxValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
900
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqMaxValidator, isStandalone: true, selector: "[max][formControlName],[max][formControl],[max][ngModel]", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.max": "coercedMax() ?? null" } }, providers: [KBQ_MAX_VALIDATOR], usesOnChanges: true, ngImport: i0 }); }
743
901
  }
744
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: MaxValidator, decorators: [{
902
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqMaxValidator, decorators: [{
745
903
  type: Directive,
746
904
  args: [{
747
905
  selector: '[max][formControlName],[max][formControl],[max][ngModel]',
748
- providers: [MAX_VALIDATOR],
906
+ providers: [KBQ_MAX_VALIDATOR],
749
907
  host: {
750
- '[attr.max]': 'max() ? max() : null'
908
+ // See `KbqMinValidator`'s `[attr.min]` for why this is coerced rather than the raw `max()`.
909
+ '[attr.max]': 'coercedMax() ?? null'
751
910
  }
752
911
  }]
753
912
  }], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }] } });
754
913
 
755
- let nextUniqueId = 0;
914
+ const isObject = (value) => typeof value === 'object' && value !== null;
756
915
  class KbqInputPassword {
757
- /**
758
- * Implemented as part of KbqFormFieldControl.
759
- * @docs-private
760
- */
761
- // TODO: Skipped for migration because:
762
- // Accessor inputs cannot be migrated as they are too complex.
763
- get disabled() {
764
- if (this.ngControl && this.ngControl.disabled !== null) {
765
- return this.ngControl.disabled;
766
- }
767
- return this._disabled;
768
- }
769
- set disabled(value) {
770
- this._disabled = coerceBooleanProperty(value);
771
- // Browsers may not fire the blur event if the input is disabled too quickly.
772
- // Reset from here to ensure that the element doesn't become stuck.
773
- if (this.focused) {
774
- this.focused = false;
775
- this.stateChanges.next(null);
776
- }
777
- }
778
- /**
779
- * Implemented as part of KbqFormFieldControl.
780
- * @docs-private
781
- */
782
- // TODO: Skipped for migration because:
783
- // Accessor inputs cannot be migrated as they are too complex.
784
- get id() {
785
- return this._id;
786
- }
787
- set id(value) {
788
- this._id = value || this.uid;
789
- }
790
- /**
791
- * Implemented as part of KbqFormFieldControl.
792
- * @docs-private
793
- */
794
- // TODO: Skipped for migration because:
795
- // Accessor inputs cannot be migrated as they are too complex.
796
- get required() {
797
- return this._required;
798
- }
799
- set required(value) {
800
- this._required = coerceBooleanProperty(value);
801
- }
802
- // this.elementRef.nativeElement.type = this._type;
803
- /**
804
- * Implemented as part of KbqFormFieldControl.
805
- * @docs-private
806
- */
807
- // TODO: Skipped for migration because:
808
- // Accessor inputs cannot be migrated as they are too complex.
809
- get value() {
810
- return this._inputValueAccessor.value;
811
- }
812
- set value(value) {
813
- if (value === this.value) {
814
- return;
815
- }
816
- this._inputValueAccessor.value = value;
817
- this.stateChanges.next(null);
818
- }
819
- /**
820
- * Implemented as part of KbqFormFieldControl.
821
- * @docs-private
822
- */
823
- get empty() {
824
- return !this.elementRef.nativeElement.value && !this.isBadInput();
825
- }
826
916
  constructor() {
827
917
  this.elementRef = inject(ElementRef);
828
918
  this.ngControl = inject(NgControl, { optional: true, self: true });
829
919
  this.parentForm = inject(NgForm, { optional: true });
830
920
  this.parentFormGroup = inject(FormGroupDirective, { optional: true });
831
921
  this.defaultErrorStateMatcher = inject(ErrorStateMatcher);
922
+ this.errorStateTracker = new KbqErrorStateTracker(this.defaultErrorStateMatcher, this.ngControl, this.parentFormGroup, this.parentForm);
832
923
  /** Whether the component is in an error state. */
833
- this.errorState = false;
924
+ this.errorState = this.errorStateTracker.errorState;
925
+ /** An object used to control when error messages are shown. */
926
+ this.errorStateMatcher = input(...(ngDevMode ? [undefined, { debugName: "errorStateMatcher" }] : /* istanbul ignore next */ []));
927
+ this.focusedValue = signal(false, ...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
834
928
  /**
835
929
  * Implemented as part of KbqFormFieldControl.
930
+ *
836
931
  * @docs-private
837
932
  */
838
- this.focused = false;
933
+ this.focused = this.focusedValue.asReadonly();
839
934
  /**
840
935
  * Implemented as part of KbqFormFieldControl.
936
+ *
841
937
  * @docs-private
842
938
  */
843
939
  this.autofilled = kbqInjectAutofilled();
844
940
  /**
845
941
  * Implemented as part of KbqFormFieldControl.
942
+ *
846
943
  * @docs-private
847
944
  */
848
- this.stateChanges = new Subject();
849
- this.checkRule = new Subject();
945
+ this.controlType = 'input-password';
946
+ this.elementTypeValue = signal('password', ...(ngDevMode ? [{ debugName: "elementTypeValue" }] : /* istanbul ignore next */ []));
947
+ /** Type of the native input: `password` while the password is hidden, `text` while it is shown. */
948
+ this.elementType = this.elementTypeValue.asReadonly();
949
+ /** @docs-private */
950
+ this.placeholderInput = input(undefined, { ...(ngDevMode ? { debugName: "placeholderInput" } : /* istanbul ignore next */ {}), alias: 'placeholder' });
850
951
  /**
851
952
  * Implemented as part of KbqFormFieldControl.
953
+ *
852
954
  * @docs-private
853
955
  */
854
- this.controlType = 'input-password';
855
- this.elementType = 'password';
856
- this.uid = `kbq-input-${nextUniqueId++}`;
857
- this._disabled = false;
858
- this._required = false;
956
+ this.placeholder = linkedSignal(() => this.placeholderInput(), ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
957
+ // Own namespace: sharing `kbq-input-` with `KbqInput` produced duplicate ids on any page holding both
958
+ // controls, and the form field's `<label for>` then resolved to the wrong control.
959
+ this.uid = inject(_IdGenerator).getId('kbq-input-password-');
960
+ /** @docs-private */
961
+ this.disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
962
+ transform: booleanAttribute });
963
+ /** `disabled` of the bound form control, which takes precedence over the input. */
964
+ this.formDisabled = signal(null, ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
965
+ /**
966
+ * Implemented as part of KbqFormFieldControl.
967
+ *
968
+ * @docs-private
969
+ */
970
+ this.disabled = computed(() => this.formDisabled() ?? this.disabledInput(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
971
+ /** @docs-private */
972
+ this.idInput = input(undefined, { ...(ngDevMode ? { debugName: "idInput" } : /* istanbul ignore next */ {}), alias: 'id' });
973
+ /**
974
+ * Implemented as part of KbqFormFieldControl.
975
+ *
976
+ * @docs-private
977
+ */
978
+ this.id = computed(() => this.idInput() || this.uid, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
979
+ /**
980
+ * Implemented as part of KbqFormFieldControl.
981
+ *
982
+ * @docs-private
983
+ */
984
+ this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
985
+ /** @docs-private */
986
+ this.valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), alias: 'value' });
987
+ this.emptyValue = signal(true, ...(ngDevMode ? [{ debugName: "emptyValue" }] : /* istanbul ignore next */ []));
988
+ /**
989
+ * Implemented as part of KbqFormFieldControl.
990
+ *
991
+ * @docs-private
992
+ */
993
+ this.empty = this.emptyValue.asReadonly();
859
994
  const inputValueAccessor = inject(KBQ_INPUT_VALUE_ACCESSOR, { optional: true, self: true });
860
995
  // If no input value accessor was explicitly specified, use the element as the input value
861
996
  // accessor.
862
- this._inputValueAccessor = inputValueAccessor || this.elementRef.nativeElement;
863
- this.previousNativeValue = this.value;
864
- // Force setter to be called in case id was not specified.
865
- this.id = this.id;
866
- }
867
- ngOnChanges() {
868
- this.stateChanges.next(null);
869
- }
870
- ngOnDestroy() {
871
- this.stateChanges.complete();
997
+ this.inputValueAccessor = inputValueAccessor || this.elementRef.nativeElement;
998
+ // Read once: a custom accessor may build a new value on every read.
999
+ const initialValue = this.inputValueAccessor.value;
1000
+ this.value = signal(initialValue, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
1001
+ this.syncedValue = initialValue;
1002
+ this.syncedText = this.elementRef.nativeElement.value;
1003
+ // A bound value replaces the current one whenever the binding changes.
1004
+ effect(() => {
1005
+ const value = this.valueInput();
1006
+ if (value !== undefined) {
1007
+ untracked(() => this.value.set(value));
1008
+ }
1009
+ });
1010
+ // A value set in code is written to the element on the next change detection. The one the element last agreed
1011
+ // on is not written back: a custom accessor that builds a new value on every read would be written on every
1012
+ // keystroke.
1013
+ effect(() => {
1014
+ const value = this.value();
1015
+ untracked(() => {
1016
+ if (value !== this.syncedValue) {
1017
+ if (this.inputValueAccessor.value !== value) {
1018
+ this.inputValueAccessor.value = value;
1019
+ }
1020
+ this.syncedValue = value;
1021
+ this.syncedText = this.elementRef.nativeElement.value;
1022
+ }
1023
+ this.emptyValue.set(this.isEmpty());
1024
+ });
1025
+ });
1026
+ // Browsers may not fire the blur event if the input is disabled too quickly.
1027
+ // Reset from here to ensure that the element doesn't become stuck.
1028
+ effect(() => {
1029
+ if (this.disabled()) {
1030
+ untracked(() => this.focusedValue.set(false));
1031
+ }
1032
+ });
872
1033
  }
873
1034
  ngDoCheck() {
874
1035
  if (this.ngControl) {
@@ -876,6 +1037,7 @@ class KbqInputPassword {
876
1037
  // error triggers that we can't subscribe to (e.g. parent form submissions). This means
877
1038
  // that whatever logic is in here has to be super lean or we risk destroying the performance.
878
1039
  this.updateErrorState();
1040
+ this.formDisabled.set(this.ngControl.disabled);
879
1041
  }
880
1042
  // We need to dirty-check the native element's value, because there are some cases where
881
1043
  // we won't be notified when it changes (e.g. the consumer isn't using forms or they're
@@ -883,23 +1045,12 @@ class KbqInputPassword {
883
1045
  this.dirtyCheckNativeValue();
884
1046
  }
885
1047
  updateErrorState() {
886
- const oldState = this.errorState;
887
- const parent = this.parentFormGroup || this.parentForm;
888
- const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;
889
- const control = this.ngControl ? this.ngControl.control : null;
890
- const newState = matcher.isErrorState(control, parent);
891
- if (newState !== oldState) {
892
- this.errorState = newState;
893
- this.stateChanges.next(null);
894
- }
895
- }
896
- checkRules() {
897
- this.checkRule.next();
1048
+ this.errorStateTracker.errorStateMatcher = this.errorStateMatcher();
1049
+ this.errorStateTracker.updateErrorState();
898
1050
  }
899
1051
  /** Toggles the native input type between password and text. */
900
1052
  toggleType() {
901
- this.elementType = this.elementType === 'password' ? 'text' : 'password';
902
- this.stateChanges.next(null);
1053
+ this.elementTypeValue.update((type) => (type === 'password' ? 'text' : 'password'));
903
1054
  }
904
1055
  /** Focuses the input. */
905
1056
  focus() {
@@ -910,49 +1061,51 @@ class KbqInputPassword {
910
1061
  }
911
1062
  /** Callback for the cases where the focused state of the input changes. */
912
1063
  focusChanged(isFocused) {
913
- if (isFocused === this.focused) {
914
- return;
915
- }
916
- this.focused = isFocused;
917
- this.stateChanges.next({ focused: this.focused });
918
- }
919
- onInput() {
920
- // This is a noop function and is used to let Angular know whenever the value changes.
921
- // Angular will run a new change detection each time the `input` event has been dispatched.
922
- // It's necessary that Angular recognizes the value change, because when floatingLabel
923
- // is set to false and Angular forms aren't used, the placeholder won't recognize the
924
- // value changes and will not disappear.
925
- // Listening to the input event wouldn't be necessary when the input is using the
926
- // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.
1064
+ this.focusedValue.set(isFocused);
927
1065
  }
928
1066
  /**
929
1067
  * Implemented as part of KbqFormFieldControl.
1068
+ *
930
1069
  * @docs-private
931
1070
  */
932
1071
  onContainerClick() {
933
1072
  this.focus();
934
1073
  }
935
- /** Does some manual dirty checking on the native input `value` property. */
1074
+ /**
1075
+ * Reads the native value back, since it changes without notice: through the forms API, which writes the
1076
+ * element directly, or by the user typing into an input that no form listens to.
1077
+ *
1078
+ * @docs-private
1079
+ */
936
1080
  dirtyCheckNativeValue() {
937
- if (this.previousNativeValue !== this.value) {
938
- this.previousNativeValue = this.value;
939
- this.stateChanges.next(null);
1081
+ const nativeValue = this.inputValueAccessor.value;
1082
+ const text = this.elementRef.nativeElement.value;
1083
+ // Only a change of the element itself: a value set in code and not yet written must not be overwritten. An
1084
+ // object counts as changed only with the text, as a custom accessor may build a new one on every read.
1085
+ if (nativeValue !== this.syncedValue && (!isObject(nativeValue) || text !== this.syncedText)) {
1086
+ this.syncedValue = nativeValue;
1087
+ this.syncedText = text;
1088
+ this.value.set(nativeValue);
940
1089
  }
1090
+ this.emptyValue.set(this.isEmpty());
941
1091
  }
942
1092
  /** Checks whether the input is invalid based on the native validation. */
943
1093
  isBadInput() {
944
1094
  // The `validity` property won't be present on platform-server.
945
1095
  return this.elementRef.nativeElement.validity?.badInput;
946
1096
  }
947
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqInputPassword, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
948
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqInputPassword, isStandalone: true, selector: "input[kbqInputPassword]", inputs: { errorStateMatcher: "errorStateMatcher", placeholder: "placeholder", disabled: "disabled", id: "id", required: "required", value: "value" }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)", "input": "onInput()" }, properties: { "attr.id": "id", "attr.type": "elementType", "attr.placeholder": "placeholder", "attr.disabled": "disabled || null", "required": "required" }, classAttribute: "kbq-input kbq-input-password" }, providers: [
1097
+ isEmpty() {
1098
+ return !this.elementRef.nativeElement.value && !this.isBadInput();
1099
+ }
1100
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqInputPassword, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1101
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqInputPassword, isStandalone: true, selector: "input[kbqInputPassword]", inputs: { errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", 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 }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)", "input": "dirtyCheckNativeValue()" }, properties: { "attr.id": "id()", "attr.type": "elementType()", "attr.placeholder": "placeholder()", "attr.disabled": "disabled() || null", "attr.aria-invalid": "errorState()", "required": "required()" }, classAttribute: "kbq-input kbq-input-password" }, providers: [
949
1102
  {
950
1103
  provide: KbqFormFieldControl,
951
1104
  useExisting: KbqInputPassword
952
1105
  }
953
- ], exportAs: ["kbqInputPassword"], usesOnChanges: true, ngImport: i0 }); }
1106
+ ], exportAs: ["kbqInputPassword"], ngImport: i0 }); }
954
1107
  }
955
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqInputPassword, decorators: [{
1108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqInputPassword, decorators: [{
956
1109
  type: Directive,
957
1110
  args: [{
958
1111
  selector: `input[kbqInputPassword]`,
@@ -966,53 +1119,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
966
1119
  class: 'kbq-input kbq-input-password',
967
1120
  // Native input properties that are overwritten by Angular inputs need to be synced with
968
1121
  // the native input element. Otherwise property bindings for those don't work.
969
- '[attr.id]': 'id',
970
- '[attr.type]': 'elementType',
971
- '[attr.placeholder]': 'placeholder',
972
- '[attr.disabled]': 'disabled || null',
973
- '[required]': 'required',
1122
+ '[attr.id]': 'id()',
1123
+ '[attr.type]': 'elementType()',
1124
+ '[attr.placeholder]': 'placeholder()',
1125
+ '[attr.disabled]': 'disabled() || null',
1126
+ '[attr.aria-invalid]': 'errorState()',
1127
+ '[required]': 'required()',
974
1128
  '(blur)': 'onBlur()',
975
1129
  '(focus)': 'focusChanged(true)',
976
- '(input)': 'onInput()'
1130
+ '(input)': 'dirtyCheckNativeValue()'
977
1131
  },
978
1132
  exportAs: 'kbqInputPassword'
979
1133
  }]
980
- }], ctorParameters: () => [], propDecorators: { errorStateMatcher: [{
981
- type: Input
982
- }], placeholder: [{
983
- type: Input
984
- }], disabled: [{
985
- type: Input
986
- }], id: [{
987
- type: Input
988
- }], required: [{
989
- type: Input
990
- }], value: [{
991
- type: Input
992
- }] } });
1134
+ }], ctorParameters: () => [], propDecorators: { errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], placeholderInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], idInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
993
1135
 
994
1136
  class KbqInputModule {
995
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
996
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqInputModule, imports: [A11yModule,
1137
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1138
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqInputModule, imports: [A11yModule,
997
1139
  FormsModule,
998
1140
  KbqIconModule,
999
1141
  KbqInput,
1000
1142
  KbqNumberInput,
1001
1143
  KbqInputPassword,
1002
1144
  KbqInputMono,
1003
- MinValidator,
1004
- MaxValidator], exports: [KbqInput,
1145
+ KbqMinValidator,
1146
+ KbqMaxValidator], exports: [KbqInput,
1005
1147
  KbqNumberInput,
1006
1148
  KbqInputPassword,
1007
1149
  KbqInputMono,
1008
- MinValidator,
1009
- MaxValidator,
1150
+ KbqMinValidator,
1151
+ KbqMaxValidator,
1010
1152
  KbqFormFieldModule] }); }
1011
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqInputModule, imports: [A11yModule,
1153
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqInputModule, imports: [A11yModule,
1012
1154
  FormsModule,
1013
1155
  KbqIconModule, KbqFormFieldModule] }); }
1014
1156
  }
1015
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqInputModule, decorators: [{
1157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqInputModule, decorators: [{
1016
1158
  type: NgModule,
1017
1159
  args: [{
1018
1160
  imports: [
@@ -1023,16 +1165,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
1023
1165
  KbqNumberInput,
1024
1166
  KbqInputPassword,
1025
1167
  KbqInputMono,
1026
- MinValidator,
1027
- MaxValidator
1168
+ KbqMinValidator,
1169
+ KbqMaxValidator
1028
1170
  ],
1029
1171
  exports: [
1030
1172
  KbqInput,
1031
1173
  KbqNumberInput,
1032
1174
  KbqInputPassword,
1033
1175
  KbqInputMono,
1034
- MinValidator,
1035
- MaxValidator,
1176
+ KbqMinValidator,
1177
+ KbqMaxValidator,
1036
1178
  KbqFormFieldModule
1037
1179
  ]
1038
1180
  }]
@@ -1042,5 +1184,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
1042
1184
  * Generated bundle index. Do not edit.
1043
1185
  */
1044
1186
 
1045
- export { BIG_STEP, KBQ_INPUT_NUMBER_DEFAULT_CONFIGURATION, KBQ_INPUT_VALUE_ACCESSOR, KBQ_NUMBER_INPUT_VALUE_ACCESSOR, KbqInput, KbqInputModule, KbqInputMono, KbqInputPassword, KbqNumberInput, MAX_VALIDATOR, MIN_VALIDATOR, MaxValidator, MinValidator, SMALL_STEP, add, getPrecision, isDigit, isFloat, isInt, normalizeSplitter };
1187
+ export { BIG_STEP, KBQ_INPUT_DEFAULT_LOCALE_CONFIGURATION, KBQ_INPUT_LOCALE_CONFIGURATION, KBQ_INPUT_NUMBER_DEFAULT_CONFIGURATION, KBQ_INPUT_VALUE_ACCESSOR, KBQ_MAX_VALIDATOR, KBQ_MIN_VALIDATOR, KBQ_NUMBER_INPUT_VALUE_ACCESSOR, KbqInput, KbqInputModule, KbqInputMono, KbqInputPassword, KbqMaxValidator, KbqMinValidator, KbqNumberInput, SMALL_STEP, add, getPrecision, isFloat, kbqInputLocaleConfigurationProvider };
1046
1188
  //# sourceMappingURL=koobiq-components-input.mjs.map