@koobiq/components 16.0.0-beta.1 → 16.0.0-beta.10

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 (475) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -2
  3. package/autocomplete/_autocomplete-theme.scss +3 -10
  4. package/autocomplete/autocomplete-origin.directive.d.ts +1 -1
  5. package/autocomplete/autocomplete-trigger.directive.d.ts +6 -16
  6. package/autocomplete/autocomplete.component.d.ts +1 -1
  7. package/autocomplete/autocomplete.scss +0 -8
  8. package/badge/README.md +0 -0
  9. package/{core/styles/theming/_badges-theme.scss → badge/_badge-theme.scss} +14 -13
  10. package/badge/badge.component.d.ts +44 -0
  11. package/badge/badge.component.scss +83 -0
  12. package/badge/badge.module.d.ts +10 -0
  13. package/badge/index.d.ts +1 -0
  14. package/badge/public-api.d.ts +2 -0
  15. package/button/_button-base.scss +1 -1
  16. package/button/_button-theme.scss +35 -27
  17. package/button/button.scss +5 -2
  18. package/button-toggle/_button-toggle-theme.scss +26 -45
  19. package/button-toggle/button-toggle.component.d.ts +2 -2
  20. package/button-toggle/button-toggle.scss +40 -87
  21. package/card/_card-theme.scss +1 -1
  22. package/checkbox/README.md +1 -1
  23. package/checkbox/_checkbox-theme.scss +10 -2
  24. package/checkbox/checkbox.d.ts +2 -2
  25. package/code-block/README.md +14 -14
  26. package/code-block/_code-block-theme.scss +8 -0
  27. package/code-block/code-block.component.d.ts +1 -1
  28. package/core/animation/index.d.ts +1 -1
  29. package/core/animation/select-animations.d.ts +1 -1
  30. package/core/common-behaviors/color.d.ts +1 -1
  31. package/core/common-behaviors/common-module.d.ts +1 -1
  32. package/core/formatters/index.d.ts +1 -1
  33. package/core/formatters/number/formatter.d.ts +56 -1
  34. package/core/forms/_forms-theme.scss +4 -4
  35. package/core/forms/_forms.scss +1 -3
  36. package/core/forms/forms.directive.d.ts +2 -2
  37. package/core/locales/en-US.d.ts +19 -1
  38. package/core/locales/es-LA.d.ts +27 -0
  39. package/core/locales/fa-IR.d.ts +28 -0
  40. package/core/locales/locale-service.d.ts +148 -3
  41. package/core/locales/pt-BR.d.ts +27 -0
  42. package/core/locales/ru-RU.d.ts +20 -1
  43. package/core/locales/zh-CN.d.ts +26 -0
  44. package/core/option/_optgroup-theme.scss +1 -1
  45. package/core/option/_option-action-theme.scss +1 -1
  46. package/core/option/_option-theme.scss +37 -14
  47. package/core/option/action.d.ts +1 -1
  48. package/core/option/action.scss +4 -5
  49. package/core/option/optgroup.d.ts +1 -1
  50. package/core/option/option.d.ts +37 -8
  51. package/core/option/option.scss +5 -50
  52. package/core/overlay/overlay-position-map.d.ts +7 -1
  53. package/core/pop-up/constants.d.ts +2 -1
  54. package/core/public-api.d.ts +1 -0
  55. package/core/select/constants.d.ts +2 -2
  56. package/core/services/theme.service.d.ts +23 -0
  57. package/core/styles/_koobiq-theme.scss +12 -1
  58. package/core/styles/_tokens.kbq.import.scss +4 -4
  59. package/core/styles/_tokens.scss +4 -4
  60. package/core/styles/_variables.scss +1 -0
  61. package/core/styles/common/_animation.scss +10 -6
  62. package/core/styles/common/_list.scss +123 -0
  63. package/core/styles/common/_overlay.scss +1 -1
  64. package/core/styles/common/_select.scss +232 -0
  65. package/core/styles/theming/_components-theming.scss +685 -92
  66. package/core/styles/theming/_theming.scss +201 -30
  67. package/core/styles/typography/_typography.scss +175 -5
  68. package/datepicker/_datepicker-theme.scss +43 -57
  69. package/datepicker/calendar-body.component.d.ts +1 -1
  70. package/datepicker/calendar-body.scss +11 -26
  71. package/datepicker/calendar-header.component.d.ts +9 -3
  72. package/datepicker/calendar-header.scss +7 -31
  73. package/datepicker/calendar.component.d.ts +4 -5
  74. package/datepicker/calendar.scss +20 -25
  75. package/datepicker/datepicker-animations.d.ts +2 -2
  76. package/datepicker/datepicker-content.scss +17 -10
  77. package/datepicker/datepicker-input.directive.d.ts +4 -4
  78. package/datepicker/datepicker-input.scss +1 -1
  79. package/datepicker/datepicker-toggle.component.d.ts +3 -3
  80. package/datepicker/datepicker.component.d.ts +2 -2
  81. package/datepicker/month-view.component.d.ts +5 -6
  82. package/dl/_dl-theme.scss +2 -56
  83. package/dl/dl.component.d.ts +1 -2
  84. package/dl/dl.scss +10 -47
  85. package/dropdown/_dropdown-theme.scss +29 -37
  86. package/dropdown/dropdown-animations.d.ts +1 -1
  87. package/dropdown/dropdown-content.directive.d.ts +1 -1
  88. package/dropdown/dropdown-item.component.d.ts +1 -1
  89. package/dropdown/dropdown-item.scss +18 -40
  90. package/dropdown/dropdown-trigger.directive.d.ts +2 -2
  91. package/dropdown/dropdown.component.d.ts +1 -1
  92. package/dropdown/dropdown.scss +16 -39
  93. package/dropdown/dropdown.types.d.ts +1 -1
  94. package/esm2022/alert/alert.component.mjs +3 -3
  95. package/esm2022/autocomplete/autocomplete-origin.directive.mjs +4 -4
  96. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +34 -31
  97. package/esm2022/autocomplete/autocomplete.component.mjs +4 -4
  98. package/esm2022/badge/badge.component.mjs +122 -0
  99. package/esm2022/badge/badge.module.mjs +40 -0
  100. package/esm2022/badge/index.mjs +2 -0
  101. package/esm2022/badge/koobiq-components-badge.mjs +5 -0
  102. package/esm2022/badge/public-api.mjs +3 -0
  103. package/esm2022/button/button.component.mjs +4 -3
  104. package/esm2022/button-toggle/button-toggle.component.mjs +15 -15
  105. package/esm2022/checkbox/checkbox.mjs +4 -4
  106. package/esm2022/code-block/actionbar.component.mjs +3 -3
  107. package/esm2022/code-block/code-block.component.mjs +4 -4
  108. package/esm2022/core/animation/index.mjs +2 -2
  109. package/esm2022/core/animation/select-animations.mjs +4 -4
  110. package/esm2022/core/common-behaviors/color.mjs +1 -1
  111. package/esm2022/core/common-behaviors/common-module.mjs +2 -2
  112. package/esm2022/core/formatters/index.mjs +10 -2
  113. package/esm2022/core/formatters/number/formatter.mjs +224 -3
  114. package/esm2022/core/forms/forms.directive.mjs +5 -5
  115. package/esm2022/core/locales/en-US.mjs +22 -4
  116. package/esm2022/core/locales/es-LA.mjs +31 -2
  117. package/esm2022/core/locales/fa-IR.mjs +30 -2
  118. package/esm2022/core/locales/locale-service.mjs +4 -4
  119. package/esm2022/core/locales/pt-BR.mjs +29 -2
  120. package/esm2022/core/locales/ru-RU.mjs +23 -2
  121. package/esm2022/core/locales/zh-CN.mjs +28 -2
  122. package/esm2022/core/option/action.mjs +8 -7
  123. package/esm2022/core/option/optgroup.mjs +3 -3
  124. package/esm2022/core/option/option.mjs +47 -10
  125. package/esm2022/core/overlay/overlay-position-map.mjs +8 -1
  126. package/esm2022/core/pop-up/constants.mjs +2 -1
  127. package/esm2022/core/pop-up/pop-up-trigger.mjs +12 -3
  128. package/esm2022/core/public-api.mjs +2 -1
  129. package/esm2022/core/select/constants.mjs +3 -3
  130. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  131. package/esm2022/core/services/theme.service.mjs +60 -0
  132. package/esm2022/core/version.mjs +2 -2
  133. package/esm2022/datepicker/calendar-body.component.mjs +7 -5
  134. package/esm2022/datepicker/calendar-header.component.mjs +9 -8
  135. package/esm2022/datepicker/calendar.component.mjs +8 -17
  136. package/esm2022/datepicker/datepicker-animations.mjs +3 -3
  137. package/esm2022/datepicker/datepicker-input.directive.mjs +29 -20
  138. package/esm2022/datepicker/datepicker-toggle.component.mjs +6 -6
  139. package/esm2022/datepicker/datepicker.component.mjs +12 -12
  140. package/esm2022/datepicker/month-view.component.mjs +9 -18
  141. package/esm2022/dl/dl.component.mjs +3 -7
  142. package/esm2022/dropdown/dropdown-animations.mjs +4 -4
  143. package/esm2022/dropdown/dropdown-content.directive.mjs +3 -3
  144. package/esm2022/dropdown/dropdown-errors.mjs +6 -6
  145. package/esm2022/dropdown/dropdown-item.component.mjs +7 -6
  146. package/esm2022/dropdown/dropdown-trigger.directive.mjs +10 -9
  147. package/esm2022/dropdown/dropdown.component.mjs +9 -9
  148. package/esm2022/dropdown/dropdown.types.mjs +1 -1
  149. package/esm2022/file-upload/file-drop.mjs +43 -6
  150. package/esm2022/file-upload/file-upload.mjs +1 -1
  151. package/esm2022/file-upload/multiple-file-upload.component.mjs +13 -9
  152. package/esm2022/file-upload/single-file-upload.component.mjs +16 -13
  153. package/esm2022/form-field/cleaner.mjs +3 -3
  154. package/esm2022/form-field/form-field.mjs +12 -15
  155. package/esm2022/form-field/hint.mjs +16 -6
  156. package/esm2022/form-field/password-hint.mjs +25 -16
  157. package/esm2022/form-field/password-toggle.mjs +29 -12
  158. package/esm2022/form-field/prefix.mjs +3 -3
  159. package/esm2022/form-field/suffix.mjs +3 -3
  160. package/esm2022/form-field/validate.directive.mjs +15 -9
  161. package/esm2022/icon/icon-button.component.mjs +68 -0
  162. package/esm2022/icon/icon-item.component.mjs +27 -0
  163. package/esm2022/icon/icon.component.mjs +5 -90
  164. package/esm2022/icon/icon.module.mjs +4 -2
  165. package/esm2022/icon/public-api.mjs +3 -1
  166. package/esm2022/input/input-errors.mjs +2 -2
  167. package/esm2022/input/input-number.mjs +260 -44
  168. package/esm2022/input/input-password.mjs +5 -5
  169. package/esm2022/input/input.mjs +7 -7
  170. package/esm2022/link/link.component.mjs +14 -13
  171. package/esm2022/list/list-selection.component.mjs +23 -10
  172. package/esm2022/list/list.component.mjs +2 -2
  173. package/esm2022/list/list.module.mjs +8 -4
  174. package/esm2022/loader-overlay/loader-overlay.component.mjs +20 -19
  175. package/esm2022/modal/modal-control.service.mjs +5 -5
  176. package/esm2022/modal/modal-ref.class.mjs +1 -1
  177. package/esm2022/modal/modal.component.mjs +129 -134
  178. package/esm2022/modal/modal.module.mjs +13 -7
  179. package/esm2022/modal/modal.service.mjs +23 -23
  180. package/esm2022/modal/modal.type.mjs +1 -3
  181. package/esm2022/navbar/navbar-item.component.mjs +19 -18
  182. package/esm2022/navbar/navbar.component.mjs +18 -9
  183. package/esm2022/navbar/vertical-navbar.animation.mjs +2 -2
  184. package/esm2022/navbar/vertical-navbar.component.mjs +9 -6
  185. package/esm2022/popover/popover-animations.mjs +2 -2
  186. package/esm2022/popover/popover-confirm.component.mjs +9 -11
  187. package/esm2022/popover/popover.component.mjs +24 -24
  188. package/esm2022/progress-spinner/progress-spinner.component.mjs +1 -1
  189. package/esm2022/radio/radio.component.mjs +11 -8
  190. package/esm2022/risk-level/index.mjs +2 -0
  191. package/esm2022/risk-level/koobiq-components-risk-level.mjs +5 -0
  192. package/esm2022/risk-level/public-api.mjs +3 -0
  193. package/esm2022/risk-level/risk-level.component.mjs +40 -0
  194. package/esm2022/risk-level/risk-level.module.mjs +28 -0
  195. package/esm2022/select/select-option.directive.mjs +15 -3
  196. package/esm2022/select/select.component.mjs +47 -29
  197. package/esm2022/sidebar/sidebar-animations.mjs +2 -2
  198. package/esm2022/sidebar/sidebar.component.mjs +9 -9
  199. package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
  200. package/esm2022/sidepanel/sidepanel-directives.mjs +8 -10
  201. package/esm2022/sidepanel/sidepanel.module.mjs +10 -4
  202. package/esm2022/splitter/splitter.component.mjs +3 -3
  203. package/esm2022/table/table.component.mjs +3 -3
  204. package/esm2022/tabs/paginated-tab-header.mjs +11 -2
  205. package/esm2022/tabs/tab-body.component.mjs +7 -7
  206. package/esm2022/tabs/tab-content.directive.mjs +3 -3
  207. package/esm2022/tabs/tab-group.component.mjs +16 -21
  208. package/esm2022/tabs/tab-header.component.mjs +2 -2
  209. package/esm2022/tabs/tab-label-wrapper.directive.mjs +4 -3
  210. package/esm2022/tabs/tab-label.directive.mjs +3 -3
  211. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +21 -10
  212. package/esm2022/tabs/tab.component.mjs +14 -5
  213. package/esm2022/tabs/tabs-animations.mjs +2 -2
  214. package/esm2022/tabs/tabs.module.mjs +2 -6
  215. package/esm2022/tags/tag-default-options.mjs +1 -1
  216. package/esm2022/tags/tag-input.mjs +17 -15
  217. package/esm2022/tags/tag-list.component.mjs +15 -10
  218. package/esm2022/tags/tag.component.mjs +16 -16
  219. package/esm2022/textarea/textarea.component.mjs +4 -4
  220. package/esm2022/timepicker/timepicker.directive.mjs +10 -10
  221. package/esm2022/timezone/timezone-option.component.mjs +4 -4
  222. package/esm2022/timezone/timezone-select.component.mjs +5 -5
  223. package/esm2022/title/title.directive.mjs +6 -6
  224. package/esm2022/toast/toast-animations.mjs +2 -1
  225. package/esm2022/toast/toast-container.component.mjs +22 -8
  226. package/esm2022/toast/toast.component.mjs +30 -13
  227. package/esm2022/toast/toast.module.mjs +23 -8
  228. package/esm2022/toast/toast.service.mjs +2 -1
  229. package/esm2022/toast/toast.type.mjs +6 -1
  230. package/esm2022/toggle/toggle.component.mjs +4 -4
  231. package/esm2022/tooltip/tooltip.animations.mjs +2 -2
  232. package/esm2022/tooltip/tooltip.component.mjs +29 -28
  233. package/esm2022/tree/control/base-tree-control.mjs +1 -1
  234. package/esm2022/tree/control/flat-tree-control.mjs +4 -4
  235. package/esm2022/tree/control/tree-control.mjs +1 -1
  236. package/esm2022/tree/node.mjs +5 -5
  237. package/esm2022/tree/outlet.mjs +3 -3
  238. package/esm2022/tree/padding.directive.mjs +9 -9
  239. package/esm2022/tree/toggle.mjs +11 -12
  240. package/esm2022/tree/tree-base.mjs +3 -3
  241. package/esm2022/tree/tree-option.component.mjs +12 -10
  242. package/esm2022/tree/tree-selection.component.mjs +8 -6
  243. package/esm2022/tree/tree.mjs +3 -3
  244. package/esm2022/tree/tree.module.mjs +13 -4
  245. package/esm2022/tree-select/tree-select.component.mjs +28 -23
  246. package/fesm2022/koobiq-components-alert.mjs +2 -2
  247. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  248. package/fesm2022/koobiq-components-autocomplete.mjs +40 -37
  249. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  250. package/fesm2022/koobiq-components-badge.mjs +166 -0
  251. package/fesm2022/koobiq-components-badge.mjs.map +1 -0
  252. package/fesm2022/koobiq-components-button-toggle.mjs +14 -14
  253. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  254. package/fesm2022/koobiq-components-button.mjs +3 -2
  255. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  256. package/fesm2022/koobiq-components-checkbox.mjs +3 -3
  257. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  258. package/fesm2022/koobiq-components-code-block.mjs +5 -5
  259. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  260. package/fesm2022/koobiq-components-core.mjs +535 -46
  261. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  262. package/fesm2022/koobiq-components-datepicker.mjs +73 -79
  263. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  264. package/fesm2022/koobiq-components-dl.mjs +2 -6
  265. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  266. package/fesm2022/koobiq-components-dropdown.mjs +33 -31
  267. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  268. package/fesm2022/koobiq-components-file-upload.mjs +65 -21
  269. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  270. package/fesm2022/koobiq-components-form-field.mjs +96 -59
  271. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  272. package/fesm2022/koobiq-components-icon.mjs +10 -8
  273. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  274. package/fesm2022/koobiq-components-input.mjs +269 -55
  275. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  276. package/fesm2022/koobiq-components-link.mjs +13 -12
  277. package/fesm2022/koobiq-components-link.mjs.map +1 -1
  278. package/fesm2022/koobiq-components-list.mjs +31 -14
  279. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  280. package/fesm2022/koobiq-components-loader-overlay.mjs +19 -18
  281. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  282. package/fesm2022/koobiq-components-modal.mjs +164 -167
  283. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  284. package/fesm2022/koobiq-components-navbar.mjs +42 -33
  285. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  286. package/fesm2022/koobiq-components-popover.mjs +32 -33
  287. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  288. package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
  289. package/fesm2022/koobiq-components-radio.mjs +10 -7
  290. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  291. package/fesm2022/koobiq-components-risk-level.mjs +72 -0
  292. package/fesm2022/koobiq-components-risk-level.mjs.map +1 -0
  293. package/fesm2022/koobiq-components-select.mjs +60 -30
  294. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  295. package/fesm2022/koobiq-components-sidebar.mjs +8 -8
  296. package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
  297. package/fesm2022/koobiq-components-sidepanel.mjs +19 -14
  298. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  299. package/fesm2022/koobiq-components-splitter.mjs +2 -2
  300. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  301. package/fesm2022/koobiq-components-table.mjs +2 -2
  302. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  303. package/fesm2022/koobiq-components-tabs.mjs +74 -53
  304. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  305. package/fesm2022/koobiq-components-tags.mjs +45 -38
  306. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  307. package/fesm2022/koobiq-components-textarea.mjs +3 -3
  308. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  309. package/fesm2022/koobiq-components-timepicker.mjs +9 -9
  310. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  311. package/fesm2022/koobiq-components-timezone.mjs +7 -7
  312. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  313. package/fesm2022/koobiq-components-title.mjs +5 -5
  314. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  315. package/fesm2022/koobiq-components-toast.mjs +71 -22
  316. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  317. package/fesm2022/koobiq-components-toggle.mjs +3 -3
  318. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  319. package/fesm2022/koobiq-components-tooltip.mjs +29 -28
  320. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  321. package/fesm2022/koobiq-components-tree-select.mjs +27 -22
  322. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  323. package/fesm2022/koobiq-components-tree.mjs +67 -54
  324. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  325. package/file-upload/_file-upload-theme.scss +54 -40
  326. package/file-upload/file-drop.d.ts +3 -2
  327. package/file-upload/file-upload.d.ts +4 -1
  328. package/file-upload/file-upload.scss +2 -9
  329. package/file-upload/multiple-file-upload.component.d.ts +6 -5
  330. package/file-upload/multiple-file-upload.component.scss +170 -59
  331. package/file-upload/single-file-upload.component.d.ts +6 -5
  332. package/file-upload/single-file-upload.component.scss +42 -22
  333. package/form-field/_form-field-theme.scss +3 -6
  334. package/form-field/_hint-theme.scss +6 -2
  335. package/form-field/cleaner.d.ts +1 -1
  336. package/form-field/form-field.d.ts +3 -4
  337. package/form-field/form-field.scss +2 -2
  338. package/form-field/hint.d.ts +4 -1
  339. package/form-field/hint.scss +9 -1
  340. package/form-field/password-hint.d.ts +7 -3
  341. package/form-field/password-hint.scss +6 -0
  342. package/form-field/password-toggle.d.ts +13 -7
  343. package/form-field/prefix.d.ts +1 -1
  344. package/form-field/suffix.d.ts +1 -1
  345. package/form-field/validate.directive.d.ts +1 -1
  346. package/icon/_icon-button-theme.scss +129 -0
  347. package/icon/_icon-item-theme.scss +41 -0
  348. package/icon/_icon-theme.scss +1 -232
  349. package/icon/icon-button.component.d.ts +22 -0
  350. package/icon/icon-button.scss +33 -0
  351. package/icon/icon-item.component.d.ts +10 -0
  352. package/icon/icon-item.scss +18 -0
  353. package/icon/icon.component.d.ts +1 -25
  354. package/icon/icon.module.d.ts +6 -4
  355. package/icon/icon.scss +0 -41
  356. package/icon/public-api.d.ts +2 -0
  357. package/input/_input-theme.scss +2 -1
  358. package/input/input-number.d.ts +61 -10
  359. package/input/input-password.d.ts +1 -1
  360. package/input/input.d.ts +2 -2
  361. package/input/input.scss +3 -1
  362. package/link/_link-theme.scss +101 -92
  363. package/link/link.component.d.ts +4 -4
  364. package/list/_list-theme.scss +36 -17
  365. package/list/list-selection.component.d.ts +6 -2
  366. package/list/list.module.d.ts +1 -1
  367. package/list/list.scss +6 -19
  368. package/loader-overlay/_loader-overlay-theme.scss +43 -11
  369. package/loader-overlay/loader-overlay.component.d.ts +6 -5
  370. package/loader-overlay/loader-overlay.scss +56 -22
  371. package/markdown/_markdown-theme.scss +2 -2
  372. package/modal/README.md +5 -5
  373. package/modal/_modal-confirm.scss +5 -37
  374. package/modal/_modal-theme.scss +14 -52
  375. package/modal/modal-ref.class.d.ts +2 -2
  376. package/modal/modal.component.d.ts +53 -52
  377. package/modal/modal.module.d.ts +2 -1
  378. package/modal/modal.scss +50 -31
  379. package/modal/modal.type.d.ts +35 -36
  380. package/navbar/_navbar-theme.scss +2 -2
  381. package/navbar/navbar-item.component.d.ts +4 -3
  382. package/navbar/navbar.component.d.ts +5 -2
  383. package/navbar/vertical-navbar.component.d.ts +4 -2
  384. package/package.json +48 -38
  385. package/popover/README.md +14 -14
  386. package/popover/_popover-theme.scss +15 -78
  387. package/popover/popover-animations.d.ts +1 -1
  388. package/popover/popover-confirm.component.d.ts +1 -3
  389. package/popover/popover.component.d.ts +3 -3
  390. package/popover/popover.scss +60 -50
  391. package/prebuilt-themes/dark-theme.css +1 -1
  392. package/prebuilt-themes/light-theme.css +1 -1
  393. package/progress-spinner/progress-spinner.component.d.ts +2 -2
  394. package/radio/_radio-theme.scss +17 -4
  395. package/radio/radio.component.d.ts +2 -2
  396. package/radio/radio.scss +13 -0
  397. package/risk-level/README.md +0 -0
  398. package/risk-level/_risk-level-theme.scss +88 -0
  399. package/risk-level/index.d.ts +1 -0
  400. package/risk-level/public-api.d.ts +2 -0
  401. package/risk-level/risk-level.component.d.ts +18 -0
  402. package/risk-level/risk-level.component.scss +26 -0
  403. package/risk-level/risk-level.module.d.ts +10 -0
  404. package/select/_select-theme.scss +12 -4
  405. package/select/select-option.directive.d.ts +2 -0
  406. package/select/select.component.d.ts +15 -12
  407. package/select/select.scss +6 -190
  408. package/sidebar/sidebar-animations.d.ts +1 -1
  409. package/sidebar/sidebar.component.d.ts +3 -3
  410. package/sidepanel/_sidepanel-theme.scss +11 -41
  411. package/sidepanel/sidepanel-directives.d.ts +0 -2
  412. package/sidepanel/sidepanel.scss +33 -35
  413. package/splitter/_splitter-theme.scss +1 -0
  414. package/splitter/splitter.component.d.ts +1 -1
  415. package/table/_table-theme.scss +1 -1
  416. package/table/table.component.d.ts +1 -1
  417. package/tabs/_tabs-common.scss +28 -147
  418. package/tabs/_tabs-theme.scss +81 -175
  419. package/tabs/paginated-tab-header.d.ts +1 -0
  420. package/tabs/tab-body.component.d.ts +1 -1
  421. package/tabs/tab-content.directive.d.ts +1 -1
  422. package/tabs/tab-group.component.d.ts +5 -8
  423. package/tabs/tab-group.scss +10 -10
  424. package/tabs/tab-header.scss +2 -24
  425. package/tabs/tab-label-wrapper.directive.d.ts +1 -1
  426. package/tabs/tab-label.directive.d.ts +1 -1
  427. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +4 -2
  428. package/tabs/tab-nav-bar/tab-nav-bar.scss +9 -16
  429. package/tabs/tab.component.d.ts +1 -1
  430. package/tabs/tabs-animations.d.ts +1 -1
  431. package/tabs/tabs.module.d.ts +1 -1
  432. package/tags/_tag-theme.scss +1 -25
  433. package/tags/tag-default-options.d.ts +4 -0
  434. package/tags/tag-input.d.ts +2 -2
  435. package/tags/tag-list.component.d.ts +3 -2
  436. package/tags/tag-list.scss +26 -16
  437. package/tags/tag.component.d.ts +6 -6
  438. package/textarea/textarea.component.d.ts +1 -1
  439. package/timepicker/timepicker.directive.d.ts +2 -2
  440. package/timezone/timezone-option.component.d.ts +1 -1
  441. package/timezone/timezone-select.component.d.ts +1 -1
  442. package/title/title.directive.d.ts +1 -1
  443. package/toast/_toast-theme.scss +21 -33
  444. package/toast/toast-animations.d.ts +1 -0
  445. package/toast/toast-container.component.d.ts +7 -3
  446. package/toast/toast-container.component.scss +2 -1
  447. package/toast/toast.component.d.ts +6 -1
  448. package/toast/toast.component.scss +41 -34
  449. package/toast/toast.module.d.ts +1 -1
  450. package/toast/toast.service.d.ts +2 -0
  451. package/toast/toast.type.d.ts +8 -5
  452. package/toggle/_toggle-theme.scss +9 -1
  453. package/toggle/toggle.component.d.ts +1 -1
  454. package/toggle/toggle.scss +5 -2
  455. package/tooltip/tooltip.animations.d.ts +1 -1
  456. package/tooltip/tooltip.component.d.ts +5 -5
  457. package/tree/_tree-theme.scss +46 -34
  458. package/tree/control/base-tree-control.d.ts +1 -1
  459. package/tree/control/tree-control.d.ts +1 -1
  460. package/tree/node.d.ts +1 -1
  461. package/tree/outlet.d.ts +1 -1
  462. package/tree/padding.directive.d.ts +1 -1
  463. package/tree/toggle.d.ts +3 -3
  464. package/tree/tree-base.d.ts +1 -1
  465. package/tree/tree-option.component.d.ts +1 -2
  466. package/tree/tree-option.scss +40 -27
  467. package/tree/tree-selection.component.d.ts +1 -1
  468. package/tree/tree.d.ts +1 -1
  469. package/tree/tree.module.d.ts +2 -1
  470. package/tree-select/_tree-select-theme.scss +13 -3
  471. package/tree-select/tree-select.component.d.ts +6 -4
  472. package/tree-select/tree-select.scss +5 -194
  473. package/core/styles/theming/_badges.scss +0 -57
  474. package/core/styles/theming/prebuilt/light-theme.scss +0 -20
  475. package/list/_list-base.scss +0 -54
@@ -1,20 +1,20 @@
1
1
  import { A11yModule } from '@angular/cdk/a11y';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Directive, Optional, Self, Attribute, Input, InjectionToken, Inject, forwardRef, NgModule } from '@angular/core';
4
+ import { forwardRef, EventEmitter, Directive, Attribute, Optional, Inject, Input, InjectionToken, Self, NgModule } from '@angular/core';
5
5
  import * as i1 from '@angular/forms';
6
- import { NG_VALIDATORS, Validators, FormsModule } from '@angular/forms';
6
+ import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, FormsModule } from '@angular/forms';
7
7
  import * as i3 from '@koobiq/components/core';
8
- import { mixinErrorState, KbqCommonModule } from '@koobiq/components/core';
8
+ import { KBQ_LOCALE_SERVICE, mixinErrorState, KbqCommonModule } from '@koobiq/components/core';
9
9
  import { KbqIconModule } from '@koobiq/components/icon';
10
10
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
11
11
  import { getSupportedInputTypes } from '@angular/cdk/platform';
12
12
  import { KbqFormFieldControl } from '@koobiq/components/form-field';
13
- import { Subject } from 'rxjs';
14
- import { A, C, V, X, Z, F1, F12, ZERO, NINE, NUMPAD_ZERO, NUMPAD_NINE, NUMPAD_MINUS, DASH, FF_MINUS, DELETE, BACKSPACE, TAB, ESCAPE, ENTER, LEFT_ARROW, RIGHT_ARROW, HOME, END, UP_ARROW, DOWN_ARROW } from '@koobiq/cdk/keycodes';
13
+ import { Subject, Subscription } from 'rxjs';
14
+ import { A, C, V, X, Z, NUMPAD_MINUS, DASH, FF_MINUS, DELETE, BACKSPACE, TAB, ESCAPE, ENTER, LEFT_ARROW, RIGHT_ARROW, HOME, END, isFunctionKey, isNumberKey, isNumpadKey, UP_ARROW, DOWN_ARROW } from '@koobiq/cdk/keycodes';
15
15
 
16
16
  function getKbqInputUnsupportedTypeError(inputType) {
17
- return Error(`Input type "${inputType}" isn't supported by mcInput.`);
17
+ return Error(`Input type "${inputType}" isn't supported by kbqInput.`);
18
18
  }
19
19
 
20
20
  const BIG_STEP = 10;
@@ -42,19 +42,76 @@ function add(value1, value2) {
42
42
  const precision = Math.max(getPrecision(value1), getPrecision(value2));
43
43
  return (value1 * precision + value2 * precision) / precision;
44
44
  }
45
+ const KBQ_NUMBER_INPUT_VALUE_ACCESSOR = {
46
+ provide: NG_VALUE_ACCESSOR,
47
+ useExisting: forwardRef(() => KbqNumberInput),
48
+ multi: true
49
+ };
45
50
  class KbqNumberInput {
51
+ get value() {
52
+ return this._value;
53
+ }
54
+ set value(value) {
55
+ const oldValue = this.value;
56
+ this._value = value;
57
+ if (oldValue !== value) {
58
+ this.setViewValue(this.formatNumber(value));
59
+ this.valueChange.emit(value);
60
+ }
61
+ }
62
+ get disabled() {
63
+ return this._disabled;
64
+ }
65
+ set disabled(value) {
66
+ const newValue = coerceBooleanProperty(value);
67
+ const element = this.nativeElement;
68
+ if (this._disabled !== newValue) {
69
+ this._disabled = newValue;
70
+ this.disabledChange.emit(newValue);
71
+ }
72
+ // We need to null check the `blur` method, because it's undefined during SSR.
73
+ if (newValue && element.blur) {
74
+ // Normally, native input elements automatically blur if they turn disabled. This behavior
75
+ // is problematic, because it would mean that it triggers another change detection cycle,
76
+ // which then causes a changed after checked error if the input element was focused before.
77
+ element.blur();
78
+ }
79
+ }
46
80
  get nativeElement() {
47
81
  return this.elementRef.nativeElement;
48
82
  }
49
- constructor(elementRef, ngControl, step, bigStep, min, max) {
83
+ get viewValue() {
84
+ return this.nativeElement.value;
85
+ }
86
+ get ngControl() {
87
+ return this.control;
88
+ }
89
+ constructor(elementRef, renderer, step, bigStep, min, max, localeService) {
50
90
  this.elementRef = elementRef;
51
- this.ngControl = ngControl;
52
- this.focused = false;
91
+ this.renderer = renderer;
92
+ this.localeService = localeService;
93
+ /** Emits when the value changes (either due to user input or programmatic change). */
94
+ this.valueChange = new EventEmitter();
95
+ /** Emits when the disabled state has changed */
96
+ this.disabledChange = new EventEmitter();
53
97
  this.stateChanges = new Subject();
98
+ this.withThousandSeparator = true;
99
+ this._disabled = false;
100
+ this.focused = false;
101
+ this.localeSubscription = Subscription.EMPTY;
102
+ // tslint:disable-next-line:no-empty
103
+ this.onTouched = () => { };
104
+ // tslint:disable-next-line:no-empty
105
+ this.cvaOnChange = () => { };
106
+ this.updateLocaleParams = (id) => {
107
+ this.numberLocaleConfig = this.localeService.locales[id].input.number;
108
+ this.setViewValue(this.formatNumber(this.value));
109
+ };
54
110
  this.step = isDigit(step) ? parseFloat(step) : SMALL_STEP;
55
111
  this.bigStep = isDigit(bigStep) ? parseFloat(bigStep) : BIG_STEP;
56
112
  this.min = isDigit(min) ? parseFloat(min) : -Infinity;
57
113
  this.max = isDigit(max) ? parseFloat(max) : Infinity;
114
+ setTimeout(() => this.nativeElement.type = 'text', 0);
58
115
  if ('valueAsNumber' in this.nativeElement) {
59
116
  Object.defineProperty(Object.getPrototypeOf(this.nativeElement), 'valueAsNumber', {
60
117
  // tslint:disable-next-line:no-reserved-keywords
@@ -64,6 +121,38 @@ class KbqNumberInput {
64
121
  }
65
122
  });
66
123
  }
124
+ this.allNumberLocaleConfigs = this.localeService.locales.items
125
+ .map((localeItem) => {
126
+ return { id: localeItem.id, config: this.localeService.locales[localeItem.id].input.number };
127
+ });
128
+ this.localeSubscription = this.localeService.changes.subscribe(this.updateLocaleParams);
129
+ }
130
+ ngOnDestroy() {
131
+ this.localeSubscription.unsubscribe();
132
+ this.valueChange.complete();
133
+ this.disabledChange.complete();
134
+ }
135
+ onContainerClick() {
136
+ this.focus();
137
+ }
138
+ focus() {
139
+ this.nativeElement.focus();
140
+ }
141
+ // Implemented as part of ControlValueAccessor.
142
+ writeValue(value) {
143
+ this.value = value;
144
+ }
145
+ // Implemented as part of ControlValueAccessor.
146
+ registerOnChange(fn) {
147
+ this.cvaOnChange = fn;
148
+ }
149
+ // Implemented as part of ControlValueAccessor.
150
+ registerOnTouched(fn) {
151
+ this.onTouched = fn;
152
+ }
153
+ // Implemented as part of ControlValueAccessor.
154
+ setDisabledState(isDisabled) {
155
+ this.disabled = isDisabled;
67
156
  }
68
157
  focusChanged(isFocused) {
69
158
  if (isFocused !== this.focused) {
@@ -79,32 +168,39 @@ class KbqNumberInput {
79
168
  const isCtrlV = (e) => e.keyCode === V && (e.ctrlKey || e.metaKey);
80
169
  const isCtrlX = (e) => e.keyCode === X && (e.ctrlKey || e.metaKey);
81
170
  const isCtrlZ = (e) => e.keyCode === Z && (e.ctrlKey || e.metaKey);
82
- const isFKey = (e) => e.keyCode >= F1 && e.keyCode <= F12;
83
- const isNumber = (e) => (e.keyCode >= ZERO && e.keyCode <= NINE) ||
84
- (e.keyCode >= NUMPAD_ZERO && e.keyCode <= NUMPAD_NINE);
85
- const isPeriod = (e) => e.key === '.' || e.key === ',';
171
+ const isPeriod = (e) => this.numberLocaleConfig.groupSeparator.includes(e.key)
172
+ || [this.numberLocaleConfig.fractionSeparator, '.'].includes(e.key);
86
173
  const minuses = [NUMPAD_MINUS, DASH, FF_MINUS];
87
174
  const serviceKeys = [DELETE, BACKSPACE, TAB, ESCAPE, ENTER];
88
175
  const arrows = [LEFT_ARROW, RIGHT_ARROW];
89
176
  const allowedKeys = [HOME, END].concat(arrows).concat(serviceKeys).concat(minuses);
90
177
  if (minuses.includes(keyCode) &&
91
- (this.nativeElement.valueAsNumber || this.min >= 0 || this.nativeElement.validity?.badInput)) {
178
+ (this.viewValue.includes(event.key) || this.min >= 0)) {
92
179
  event.preventDefault();
93
180
  return;
94
181
  }
182
+ if (isPeriod(event)) {
183
+ if (event.key === this.numberLocaleConfig.fractionSeparator &&
184
+ this.viewValue.indexOf(this.numberLocaleConfig.fractionSeparator) !== -1) {
185
+ event.preventDefault();
186
+ return;
187
+ }
188
+ }
95
189
  if (allowedKeys.indexOf(keyCode) !== -1 ||
96
- isCtrlA(event) ||
97
- isCtrlC(event) ||
98
- isCtrlV(event) ||
99
- isCtrlX(event) ||
100
- isCtrlZ(event) ||
101
- isFKey(event) ||
102
- isPeriod(event)) {
190
+ [
191
+ isCtrlA,
192
+ isCtrlC,
193
+ isCtrlV,
194
+ isCtrlX,
195
+ isCtrlZ,
196
+ isFunctionKey,
197
+ isPeriod
198
+ ].some((fn) => fn(event))) {
103
199
  // let it happen, don't do anything
104
200
  return;
105
201
  }
106
202
  // Ensure that it is not a number and stop the keypress
107
- if (event.shiftKey || !isNumber(event)) {
203
+ if (event.shiftKey || !isNumberKey(event) && !isNumpadKey(event)) {
108
204
  event.preventDefault();
109
205
  // process steps
110
206
  const step = event.shiftKey ? this.bigStep : this.step;
@@ -116,48 +212,153 @@ class KbqNumberInput {
116
212
  }
117
213
  }
118
214
  }
215
+ onInput(event) {
216
+ const currentValueLength = this.formatNumber(this.value)?.length || 0;
217
+ setTimeout(() => {
218
+ const fromPaste = event.inputType === 'insertFromPaste';
219
+ let formattedValue;
220
+ if (fromPaste) {
221
+ formattedValue = this.formatNumber(this.valueFromPaste);
222
+ }
223
+ else {
224
+ /*this.viewValue is raw and should be reformatted to localized number */
225
+ formattedValue = this.formatViewValue();
226
+ const offsetWhenSeparatorAdded = 2;
227
+ Promise.resolve().then(() => {
228
+ if (Math.abs(this.viewValue.length - currentValueLength) === offsetWhenSeparatorAdded) {
229
+ const cursorPosition = Math.max(0, (this.nativeElement.selectionStart || 0) + Math.sign(this.viewValue.length - currentValueLength));
230
+ this.renderer.setProperty(this.nativeElement, 'selectionStart', cursorPosition);
231
+ this.renderer.setProperty(this.nativeElement, 'selectionEnd', cursorPosition);
232
+ }
233
+ });
234
+ }
235
+ this.setViewValue(formattedValue, !fromPaste);
236
+ this.viewToModelUpdate(formattedValue);
237
+ });
238
+ }
119
239
  onPaste(event) {
120
- if (!isDigit(normalizeSplitter(event.clipboardData.getData('text')))) {
240
+ this.valueFromPaste = this.checkAndNormalizeLocalizedNumber(event.clipboardData?.getData('text'));
241
+ if (this.valueFromPaste === null) {
121
242
  event.preventDefault();
122
243
  }
123
244
  }
124
245
  stepUp(step) {
125
- this.elementRef.nativeElement.focus();
126
- const res = Math.max(Math.min(add(this.nativeElement.valueAsNumber || 0, step), this.max), this.min);
127
- this.nativeElement.value = res.toString();
128
- this.viewToModelUpdate(this.nativeElement.valueAsNumber);
246
+ this.nativeElement.focus();
247
+ const res = Math.max(Math.min(add(this.value || 0, step), this.max), this.min);
248
+ this.setViewValue(this.formatNumber(res));
249
+ this._value = res;
250
+ this.cvaOnChange(res);
251
+ this.valueChange.emit(res);
129
252
  }
130
253
  stepDown(step) {
131
- this.elementRef.nativeElement.focus();
132
- const res = Math.min(Math.max(add(this.nativeElement.valueAsNumber || 0, -step), this.min), this.max);
133
- this.nativeElement.value = res.toString();
134
- this.viewToModelUpdate(this.nativeElement.valueAsNumber);
254
+ this.nativeElement.focus();
255
+ const res = Math.min(Math.max(add(this.value || 0, -step), this.min), this.max);
256
+ this.setViewValue(this.formatNumber(res));
257
+ this._value = res;
258
+ this.cvaOnChange(res);
259
+ this.valueChange.emit(res);
135
260
  }
136
- viewToModelUpdate(value) {
137
- if (this.ngControl) {
138
- this.ngControl.control.setValue(value);
261
+ setViewValue(value, savePosition = false) {
262
+ const cursorPosition = this.nativeElement.selectionStart;
263
+ this.renderer.setProperty(this.nativeElement, 'value', value);
264
+ if (savePosition) {
265
+ this.renderer.setProperty(this.nativeElement, 'selectionStart', cursorPosition);
266
+ this.renderer.setProperty(this.nativeElement, 'selectionEnd', cursorPosition);
267
+ }
268
+ }
269
+ viewToModelUpdate(newValue) {
270
+ const normalizedValue = newValue === null ? null : +this.normalizeNumber(newValue);
271
+ if (normalizedValue !== this.value) {
272
+ this._value = normalizedValue;
273
+ this.cvaOnChange(normalizedValue);
274
+ this.valueChange.emit(normalizedValue);
275
+ }
276
+ this.ngControl?.updateValueAndValidity({ emitEvent: false });
277
+ }
278
+ formatViewValue() {
279
+ if (this.viewValue === null || this.viewValue === '' || Number.isNaN(+this.normalizeNumber(this.viewValue))) {
280
+ return null;
139
281
  }
282
+ const separator = this.numberLocaleConfig.groupSeparator.includes(' ')
283
+ && this.numberLocaleConfig.fractionSeparator === ','
284
+ ? /[,.]/
285
+ : this.numberLocaleConfig.fractionSeparator;
286
+ const [intPart, fractionPart] = this.viewValue.split(separator)
287
+ .map((valuePart) => this.normalizeNumber(valuePart));
288
+ return this.createLocalizedNumberFromParts(+intPart, fractionPart);
140
289
  }
141
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqNumberInput, deps: [{ token: i0.ElementRef }, { token: i1.NgControl, optional: true, self: true }, { token: 'step', attribute: true }, { token: 'big-step', attribute: true }, { token: 'min', attribute: true }, { token: 'max', attribute: true }], target: i0.ɵɵFactoryTarget.Directive }); }
142
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqNumberInput, selector: "input[mcInput][type=\"number\"]", inputs: { bigStep: "bigStep", step: "step", min: "min", max: "max" }, host: { listeners: { "blur": "focusChanged(false)", "focus": "focusChanged(true)", "paste": "onPaste($event)", "keydown": "onKeyDown($event)" } }, exportAs: ["mcNumericalInput"], ngImport: i0 }); }
290
+ formatNumber(value) {
291
+ if (value === null || value === undefined) {
292
+ return null;
293
+ }
294
+ const [intPart, fractionPart] = value.toString().split('.');
295
+ return this.createLocalizedNumberFromParts(+intPart, fractionPart);
296
+ }
297
+ createLocalizedNumberFromParts(intPart, fractionPart) {
298
+ const formatOptions = {
299
+ useGrouping: this.withThousandSeparator,
300
+ maximumFractionDigits: 20
301
+ };
302
+ if (this.withThousandSeparator && this.numberLocaleConfig.startFormattingFrom) {
303
+ formatOptions.useGrouping = intPart >= Math.pow(
304
+ // tslint:disable-next-line:no-magic-numbers
305
+ 10, this.numberLocaleConfig.startFormattingFrom);
306
+ }
307
+ const localeId = this.localeService.id === 'es-LA' ? 'ru-RU' : this.localeService.id;
308
+ const formatter = new Intl.NumberFormat(localeId, formatOptions);
309
+ const formattedFractionPart = fractionPart?.split('')
310
+ .map((numChar) => formatter.format(+numChar)).join('');
311
+ return formattedFractionPart === undefined
312
+ ? formatter.format(intPart)
313
+ : `${formatter.format(intPart)}${this.numberLocaleConfig.fractionSeparator}${formattedFractionPart}`;
314
+ }
315
+ /**
316
+ * Method that returns a string representation of a number without localized separators
317
+ */
318
+ normalizeNumber(value, customConfig) {
319
+ if (value === null || value === undefined) {
320
+ return '';
321
+ }
322
+ const { groupSeparator, fractionSeparator } = customConfig || this.numberLocaleConfig;
323
+ const groupSeparatorRegexp = new RegExp(`[${groupSeparator.join('')}]`, 'g');
324
+ const fractionSeparatorRegexp = new RegExp(`\\${fractionSeparator}`, 'g');
325
+ return value.toString()
326
+ .replace(groupSeparatorRegexp, '')
327
+ .replace(fractionSeparatorRegexp, '.');
328
+ }
329
+ checkAndNormalizeLocalizedNumber(num) {
330
+ if (num === null || num === undefined) {
331
+ return null;
332
+ }
333
+ /* if some locale input config satisfies pasted number, try to normalise with selected locale config */
334
+ let numberOutput = null;
335
+ for (const { config } of this.allNumberLocaleConfigs) {
336
+ const normalized = +this.normalizeNumber(num, config);
337
+ if (!Number.isNaN(normalized)) {
338
+ numberOutput = normalized;
339
+ break;
340
+ }
341
+ }
342
+ return numberOutput;
343
+ }
344
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqNumberInput, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: 'step', attribute: true }, { token: 'big-step', attribute: true }, { token: 'min', attribute: true }, { token: 'max', attribute: true }, { token: KBQ_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
345
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqNumberInput, selector: "input[kbqInput][type=\"number\"]", inputs: { bigStep: "bigStep", step: "step", min: "min", max: "max", withThousandSeparator: "withThousandSeparator", startFormattingFrom: "startFormattingFrom", value: "value", disabled: "disabled" }, 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 }); }
143
346
  }
144
347
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqNumberInput, decorators: [{
145
348
  type: Directive,
146
349
  args: [{
147
- selector: `input[mcInput][type="number"]`,
148
- exportAs: 'mcNumericalInput',
350
+ selector: `input[kbqInput][type="number"]`,
351
+ exportAs: 'kbqNumericalInput',
352
+ providers: [KBQ_NUMBER_INPUT_VALUE_ACCESSOR],
149
353
  host: {
150
354
  '(blur)': 'focusChanged(false)',
151
355
  '(focus)': 'focusChanged(true)',
152
356
  '(paste)': 'onPaste($event)',
153
- '(keydown)': 'onKeyDown($event)'
357
+ '(keydown)': 'onKeyDown($event)',
358
+ '(input)': 'onInput($event)'
154
359
  }
155
360
  }]
156
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.NgControl, decorators: [{
157
- type: Optional
158
- }, {
159
- type: Self
160
- }] }, { type: undefined, decorators: [{
361
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
161
362
  type: Attribute,
162
363
  args: ['step']
163
364
  }] }, { type: undefined, decorators: [{
@@ -169,6 +370,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
169
370
  }] }, { type: undefined, decorators: [{
170
371
  type: Attribute,
171
372
  args: ['max']
373
+ }] }, { type: i3.KbqLocaleService, decorators: [{
374
+ type: Optional
375
+ }, {
376
+ type: Inject,
377
+ args: [KBQ_LOCALE_SERVICE]
172
378
  }] }]; }, propDecorators: { bigStep: [{
173
379
  type: Input
174
380
  }], step: [{
@@ -177,6 +383,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
177
383
  type: Input
178
384
  }], max: [{
179
385
  type: Input
386
+ }], withThousandSeparator: [{
387
+ type: Input
388
+ }], startFormattingFrom: [{
389
+ type: Input
390
+ }], value: [{
391
+ type: Input
392
+ }], disabled: [{
393
+ type: Input
180
394
  }] } });
181
395
 
182
396
  const KBQ_INPUT_VALUE_ACCESSOR = new InjectionToken('KBQ_INPUT_VALUE_ACCESSOR');
@@ -393,15 +607,15 @@ class KbqInput extends KbqInputMixinBase {
393
607
  return validity?.badInput;
394
608
  }
395
609
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqInput, deps: [{ token: i0.ElementRef }, { token: i1.NgControl, optional: true, self: true }, { token: KbqNumberInput, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: KBQ_INPUT_VALUE_ACCESSOR, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
396
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqInput, selector: "input[mcInput]", 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: [{
610
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqInput, selector: "input[kbqInput]", 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: [{
397
611
  provide: KbqFormFieldControl, useExisting: KbqInput
398
- }], exportAs: ["mcInput"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
612
+ }], exportAs: ["kbqInput"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
399
613
  }
400
614
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqInput, decorators: [{
401
615
  type: Directive,
402
616
  args: [{
403
- selector: `input[mcInput]`,
404
- exportAs: 'mcInput',
617
+ selector: `input[kbqInput]`,
618
+ exportAs: 'kbqInput',
405
619
  host: {
406
620
  class: 'kbq-input',
407
621
  // Native input properties that are overwritten by Angular inputs need to be synced with
@@ -453,12 +667,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
453
667
  }] } });
454
668
  class KbqInputMono {
455
669
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqInputMono, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
456
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqInputMono, selector: "input[mcInputMonospace]", host: { classAttribute: "kbq-input_monospace" }, exportAs: ["KbqInputMonospace"], ngImport: i0 }); }
670
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqInputMono, selector: "input[kbqInputMonospace]", host: { classAttribute: "kbq-input_monospace" }, exportAs: ["KbqInputMonospace"], ngImport: i0 }); }
457
671
  }
458
672
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqInputMono, decorators: [{
459
673
  type: Directive,
460
674
  args: [{
461
- selector: 'input[mcInputMonospace]',
675
+ selector: 'input[kbqInputMonospace]',
462
676
  exportAs: 'KbqInputMonospace',
463
677
  host: { class: 'kbq-input_monospace' }
464
678
  }]
@@ -716,15 +930,15 @@ class KbqInputPassword extends KbqInputMixinBase {
716
930
  return this.elementRef.nativeElement.validity?.badInput;
717
931
  }
718
932
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqInputPassword, deps: [{ token: i0.ElementRef }, { token: i1.NgControl, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: KBQ_INPUT_VALUE_ACCESSOR, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
719
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqInputPassword, selector: "input[mcInputPassword]", 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: [{
933
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqInputPassword, 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: [{
720
934
  provide: KbqFormFieldControl, useExisting: KbqInputPassword
721
- }], exportAs: ["mcInputPassword"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
935
+ }], exportAs: ["kbqInputPassword"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
722
936
  }
723
937
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqInputPassword, decorators: [{
724
938
  type: Directive,
725
939
  args: [{
726
- selector: `input[mcInputPassword]`,
727
- exportAs: 'mcInputPassword',
940
+ selector: `input[kbqInputPassword]`,
941
+ exportAs: 'kbqInputPassword',
728
942
  host: {
729
943
  class: 'kbq-input kbq-input-password',
730
944
  // Native input properties that are overwritten by Angular inputs need to be synced with
@@ -827,5 +1041,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
827
1041
  * Generated bundle index. Do not edit.
828
1042
  */
829
1043
 
830
- export { BIG_STEP, KBQ_INPUT_VALUE_ACCESSOR, KbqInput, KbqInputBase, KbqInputMixinBase, KbqInputModule, KbqInputMono, KbqInputPassword, KbqNumberInput, MAX_VALIDATOR, MIN_VALIDATOR, MaxValidator, MinValidator, SMALL_STEP, add, getPrecision, isDigit, isFloat, isInt, normalizeSplitter };
1044
+ export { BIG_STEP, KBQ_INPUT_VALUE_ACCESSOR, KBQ_NUMBER_INPUT_VALUE_ACCESSOR, KbqInput, KbqInputBase, KbqInputMixinBase, KbqInputModule, KbqInputMono, KbqInputPassword, KbqNumberInput, MAX_VALIDATOR, MIN_VALIDATOR, MaxValidator, MinValidator, SMALL_STEP, add, getPrecision, isDigit, isFloat, isInt, normalizeSplitter };
831
1045
  //# sourceMappingURL=koobiq-components-input.mjs.map