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

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 (479) 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 +49 -10
  27. package/code-block/actionbar.component.scss +34 -6
  28. package/code-block/code-block.component.d.ts +2 -2
  29. package/code-block/code-block.scss +101 -27
  30. package/core/animation/index.d.ts +1 -1
  31. package/core/animation/select-animations.d.ts +1 -1
  32. package/core/common-behaviors/color.d.ts +1 -1
  33. package/core/common-behaviors/common-module.d.ts +1 -1
  34. package/core/formatters/index.d.ts +1 -1
  35. package/core/formatters/number/formatter.d.ts +56 -1
  36. package/core/forms/_forms-theme.scss +4 -4
  37. package/core/forms/_forms.scss +1 -3
  38. package/core/forms/forms.directive.d.ts +2 -2
  39. package/core/locales/en-US.d.ts +19 -1
  40. package/core/locales/es-LA.d.ts +27 -0
  41. package/core/locales/fa-IR.d.ts +28 -0
  42. package/core/locales/locale-service.d.ts +148 -3
  43. package/core/locales/pt-BR.d.ts +27 -0
  44. package/core/locales/ru-RU.d.ts +20 -1
  45. package/core/locales/zh-CN.d.ts +26 -0
  46. package/core/option/_optgroup-theme.scss +1 -1
  47. package/core/option/_option-action-theme.scss +1 -1
  48. package/core/option/_option-theme.scss +37 -14
  49. package/core/option/action.d.ts +1 -1
  50. package/core/option/action.scss +4 -5
  51. package/core/option/optgroup.d.ts +1 -1
  52. package/core/option/option.d.ts +37 -8
  53. package/core/option/option.scss +5 -50
  54. package/core/overlay/overlay-position-map.d.ts +7 -1
  55. package/core/pop-up/constants.d.ts +2 -1
  56. package/core/public-api.d.ts +1 -0
  57. package/core/select/constants.d.ts +2 -2
  58. package/core/services/theme.service.d.ts +23 -0
  59. package/core/styles/_koobiq-theme.scss +12 -1
  60. package/core/styles/_tokens.kbq.import.scss +4 -4
  61. package/core/styles/_tokens.scss +4 -4
  62. package/core/styles/_variables.scss +1 -0
  63. package/core/styles/common/_animation.scss +10 -6
  64. package/core/styles/common/_list.scss +123 -0
  65. package/core/styles/common/_overlay.scss +1 -1
  66. package/core/styles/common/_select.scss +232 -0
  67. package/core/styles/theming/_components-theming.scss +716 -102
  68. package/core/styles/theming/_theming.scss +201 -30
  69. package/core/styles/typography/_typography.scss +176 -5
  70. package/datepicker/_datepicker-theme.scss +43 -57
  71. package/datepicker/calendar-body.component.d.ts +1 -1
  72. package/datepicker/calendar-body.scss +11 -26
  73. package/datepicker/calendar-header.component.d.ts +9 -3
  74. package/datepicker/calendar-header.scss +7 -31
  75. package/datepicker/calendar.component.d.ts +4 -5
  76. package/datepicker/calendar.scss +20 -25
  77. package/datepicker/datepicker-animations.d.ts +2 -2
  78. package/datepicker/datepicker-content.scss +17 -10
  79. package/datepicker/datepicker-input.directive.d.ts +4 -4
  80. package/datepicker/datepicker-input.scss +1 -1
  81. package/datepicker/datepicker-toggle.component.d.ts +3 -3
  82. package/datepicker/datepicker.component.d.ts +2 -2
  83. package/datepicker/month-view.component.d.ts +5 -6
  84. package/dl/_dl-theme.scss +2 -56
  85. package/dl/dl.component.d.ts +1 -2
  86. package/dl/dl.scss +10 -47
  87. package/dropdown/_dropdown-theme.scss +29 -37
  88. package/dropdown/dropdown-animations.d.ts +1 -1
  89. package/dropdown/dropdown-content.directive.d.ts +1 -1
  90. package/dropdown/dropdown-item.component.d.ts +1 -1
  91. package/dropdown/dropdown-item.scss +18 -40
  92. package/dropdown/dropdown-trigger.directive.d.ts +2 -2
  93. package/dropdown/dropdown.component.d.ts +1 -1
  94. package/dropdown/dropdown.scss +16 -39
  95. package/dropdown/dropdown.types.d.ts +1 -1
  96. package/esm2022/alert/alert.component.mjs +3 -3
  97. package/esm2022/autocomplete/autocomplete-origin.directive.mjs +4 -4
  98. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +34 -31
  99. package/esm2022/autocomplete/autocomplete.component.mjs +4 -4
  100. package/esm2022/badge/badge.component.mjs +122 -0
  101. package/esm2022/badge/badge.module.mjs +40 -0
  102. package/esm2022/badge/index.mjs +2 -0
  103. package/esm2022/badge/koobiq-components-badge.mjs +5 -0
  104. package/esm2022/badge/public-api.mjs +3 -0
  105. package/esm2022/button/button.component.mjs +4 -3
  106. package/esm2022/button-toggle/button-toggle.component.mjs +15 -15
  107. package/esm2022/checkbox/checkbox.mjs +4 -4
  108. package/esm2022/code-block/actionbar.component.mjs +3 -3
  109. package/esm2022/code-block/code-block.component.mjs +11 -9
  110. package/esm2022/core/animation/index.mjs +2 -2
  111. package/esm2022/core/animation/select-animations.mjs +4 -4
  112. package/esm2022/core/common-behaviors/color.mjs +1 -1
  113. package/esm2022/core/common-behaviors/common-module.mjs +2 -2
  114. package/esm2022/core/formatters/index.mjs +10 -2
  115. package/esm2022/core/formatters/number/formatter.mjs +224 -3
  116. package/esm2022/core/forms/forms.directive.mjs +5 -5
  117. package/esm2022/core/locales/en-US.mjs +22 -4
  118. package/esm2022/core/locales/es-LA.mjs +31 -2
  119. package/esm2022/core/locales/fa-IR.mjs +30 -2
  120. package/esm2022/core/locales/locale-service.mjs +4 -4
  121. package/esm2022/core/locales/pt-BR.mjs +29 -2
  122. package/esm2022/core/locales/ru-RU.mjs +23 -2
  123. package/esm2022/core/locales/zh-CN.mjs +28 -2
  124. package/esm2022/core/option/action.mjs +8 -7
  125. package/esm2022/core/option/optgroup.mjs +3 -3
  126. package/esm2022/core/option/option.mjs +47 -10
  127. package/esm2022/core/overlay/overlay-position-map.mjs +8 -1
  128. package/esm2022/core/pop-up/constants.mjs +2 -1
  129. package/esm2022/core/pop-up/pop-up-trigger.mjs +12 -3
  130. package/esm2022/core/public-api.mjs +2 -1
  131. package/esm2022/core/select/constants.mjs +3 -3
  132. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  133. package/esm2022/core/services/theme.service.mjs +60 -0
  134. package/esm2022/core/version.mjs +2 -2
  135. package/esm2022/datepicker/calendar-body.component.mjs +7 -5
  136. package/esm2022/datepicker/calendar-header.component.mjs +9 -8
  137. package/esm2022/datepicker/calendar.component.mjs +8 -17
  138. package/esm2022/datepicker/datepicker-animations.mjs +3 -3
  139. package/esm2022/datepicker/datepicker-input.directive.mjs +29 -20
  140. package/esm2022/datepicker/datepicker-toggle.component.mjs +6 -6
  141. package/esm2022/datepicker/datepicker.component.mjs +12 -12
  142. package/esm2022/datepicker/month-view.component.mjs +9 -18
  143. package/esm2022/dl/dl.component.mjs +3 -7
  144. package/esm2022/dropdown/dropdown-animations.mjs +4 -4
  145. package/esm2022/dropdown/dropdown-content.directive.mjs +3 -3
  146. package/esm2022/dropdown/dropdown-errors.mjs +6 -6
  147. package/esm2022/dropdown/dropdown-item.component.mjs +7 -6
  148. package/esm2022/dropdown/dropdown-trigger.directive.mjs +10 -9
  149. package/esm2022/dropdown/dropdown.component.mjs +9 -9
  150. package/esm2022/dropdown/dropdown.types.mjs +1 -1
  151. package/esm2022/file-upload/file-drop.mjs +43 -6
  152. package/esm2022/file-upload/file-upload.mjs +1 -1
  153. package/esm2022/file-upload/multiple-file-upload.component.mjs +13 -9
  154. package/esm2022/file-upload/single-file-upload.component.mjs +16 -13
  155. package/esm2022/form-field/cleaner.mjs +3 -3
  156. package/esm2022/form-field/form-field.mjs +12 -15
  157. package/esm2022/form-field/hint.mjs +16 -6
  158. package/esm2022/form-field/password-hint.mjs +25 -16
  159. package/esm2022/form-field/password-toggle.mjs +29 -12
  160. package/esm2022/form-field/prefix.mjs +3 -3
  161. package/esm2022/form-field/suffix.mjs +3 -3
  162. package/esm2022/form-field/validate.directive.mjs +15 -9
  163. package/esm2022/icon/icon-button.component.mjs +68 -0
  164. package/esm2022/icon/icon-item.component.mjs +27 -0
  165. package/esm2022/icon/icon.component.mjs +5 -90
  166. package/esm2022/icon/icon.module.mjs +4 -2
  167. package/esm2022/icon/public-api.mjs +3 -1
  168. package/esm2022/input/input-errors.mjs +2 -2
  169. package/esm2022/input/input-number.mjs +260 -44
  170. package/esm2022/input/input-password.mjs +5 -5
  171. package/esm2022/input/input.mjs +7 -7
  172. package/esm2022/link/link.component.mjs +14 -13
  173. package/esm2022/list/list-selection.component.mjs +23 -10
  174. package/esm2022/list/list.component.mjs +2 -2
  175. package/esm2022/list/list.module.mjs +8 -4
  176. package/esm2022/loader-overlay/loader-overlay.component.mjs +20 -19
  177. package/esm2022/modal/modal-control.service.mjs +5 -5
  178. package/esm2022/modal/modal-ref.class.mjs +1 -1
  179. package/esm2022/modal/modal.component.mjs +129 -134
  180. package/esm2022/modal/modal.module.mjs +13 -7
  181. package/esm2022/modal/modal.service.mjs +23 -23
  182. package/esm2022/modal/modal.type.mjs +1 -3
  183. package/esm2022/navbar/navbar-item.component.mjs +19 -18
  184. package/esm2022/navbar/navbar.component.mjs +20 -11
  185. package/esm2022/navbar/vertical-navbar.animation.mjs +2 -2
  186. package/esm2022/navbar/vertical-navbar.component.mjs +11 -8
  187. package/esm2022/popover/popover-animations.mjs +2 -2
  188. package/esm2022/popover/popover-confirm.component.mjs +9 -11
  189. package/esm2022/popover/popover.component.mjs +24 -24
  190. package/esm2022/progress-spinner/progress-spinner.component.mjs +3 -3
  191. package/esm2022/radio/radio.component.mjs +11 -8
  192. package/esm2022/risk-level/index.mjs +2 -0
  193. package/esm2022/risk-level/koobiq-components-risk-level.mjs +5 -0
  194. package/esm2022/risk-level/public-api.mjs +3 -0
  195. package/esm2022/risk-level/risk-level.component.mjs +40 -0
  196. package/esm2022/risk-level/risk-level.module.mjs +28 -0
  197. package/esm2022/select/select-option.directive.mjs +15 -3
  198. package/esm2022/select/select.component.mjs +47 -29
  199. package/esm2022/sidebar/sidebar-animations.mjs +2 -2
  200. package/esm2022/sidebar/sidebar.component.mjs +9 -9
  201. package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
  202. package/esm2022/sidepanel/sidepanel-directives.mjs +8 -10
  203. package/esm2022/sidepanel/sidepanel.module.mjs +10 -4
  204. package/esm2022/splitter/splitter.component.mjs +3 -3
  205. package/esm2022/table/table.component.mjs +3 -3
  206. package/esm2022/tabs/paginated-tab-header.mjs +11 -2
  207. package/esm2022/tabs/tab-body.component.mjs +7 -7
  208. package/esm2022/tabs/tab-content.directive.mjs +3 -3
  209. package/esm2022/tabs/tab-group.component.mjs +16 -21
  210. package/esm2022/tabs/tab-header.component.mjs +2 -2
  211. package/esm2022/tabs/tab-label-wrapper.directive.mjs +4 -3
  212. package/esm2022/tabs/tab-label.directive.mjs +3 -3
  213. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +21 -10
  214. package/esm2022/tabs/tab.component.mjs +14 -5
  215. package/esm2022/tabs/tabs-animations.mjs +2 -2
  216. package/esm2022/tabs/tabs.module.mjs +2 -6
  217. package/esm2022/tags/tag-default-options.mjs +1 -1
  218. package/esm2022/tags/tag-input.mjs +17 -15
  219. package/esm2022/tags/tag-list.component.mjs +15 -10
  220. package/esm2022/tags/tag.component.mjs +16 -16
  221. package/esm2022/textarea/textarea.component.mjs +4 -4
  222. package/esm2022/timepicker/timepicker.directive.mjs +10 -10
  223. package/esm2022/timezone/timezone-option.component.mjs +4 -4
  224. package/esm2022/timezone/timezone-select.component.mjs +5 -5
  225. package/esm2022/title/title.directive.mjs +6 -6
  226. package/esm2022/toast/toast-animations.mjs +2 -1
  227. package/esm2022/toast/toast-container.component.mjs +22 -8
  228. package/esm2022/toast/toast.component.mjs +30 -13
  229. package/esm2022/toast/toast.module.mjs +23 -8
  230. package/esm2022/toast/toast.service.mjs +2 -1
  231. package/esm2022/toast/toast.type.mjs +6 -1
  232. package/esm2022/toggle/toggle.component.mjs +4 -4
  233. package/esm2022/tooltip/tooltip.animations.mjs +2 -2
  234. package/esm2022/tooltip/tooltip.component.mjs +31 -30
  235. package/esm2022/tree/control/base-tree-control.mjs +1 -1
  236. package/esm2022/tree/control/flat-tree-control.mjs +4 -4
  237. package/esm2022/tree/control/tree-control.mjs +1 -1
  238. package/esm2022/tree/node.mjs +5 -5
  239. package/esm2022/tree/outlet.mjs +3 -3
  240. package/esm2022/tree/padding.directive.mjs +9 -9
  241. package/esm2022/tree/toggle.mjs +11 -12
  242. package/esm2022/tree/tree-base.mjs +3 -3
  243. package/esm2022/tree/tree-option.component.mjs +12 -10
  244. package/esm2022/tree/tree-selection.component.mjs +8 -6
  245. package/esm2022/tree/tree.mjs +3 -3
  246. package/esm2022/tree/tree.module.mjs +13 -4
  247. package/esm2022/tree-select/tree-select.component.mjs +28 -23
  248. package/fesm2022/koobiq-components-alert.mjs +2 -2
  249. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  250. package/fesm2022/koobiq-components-autocomplete.mjs +40 -37
  251. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  252. package/fesm2022/koobiq-components-badge.mjs +166 -0
  253. package/fesm2022/koobiq-components-badge.mjs.map +1 -0
  254. package/fesm2022/koobiq-components-button-toggle.mjs +14 -14
  255. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  256. package/fesm2022/koobiq-components-button.mjs +3 -2
  257. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  258. package/fesm2022/koobiq-components-checkbox.mjs +3 -3
  259. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  260. package/fesm2022/koobiq-components-code-block.mjs +10 -9
  261. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  262. package/fesm2022/koobiq-components-core.mjs +535 -46
  263. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  264. package/fesm2022/koobiq-components-datepicker.mjs +73 -79
  265. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  266. package/fesm2022/koobiq-components-dl.mjs +2 -6
  267. package/fesm2022/koobiq-components-dl.mjs.map +1 -1
  268. package/fesm2022/koobiq-components-dropdown.mjs +33 -31
  269. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  270. package/fesm2022/koobiq-components-file-upload.mjs +65 -21
  271. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  272. package/fesm2022/koobiq-components-form-field.mjs +96 -59
  273. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  274. package/fesm2022/koobiq-components-icon.mjs +10 -8
  275. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  276. package/fesm2022/koobiq-components-input.mjs +269 -55
  277. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  278. package/fesm2022/koobiq-components-link.mjs +13 -12
  279. package/fesm2022/koobiq-components-link.mjs.map +1 -1
  280. package/fesm2022/koobiq-components-list.mjs +31 -14
  281. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  282. package/fesm2022/koobiq-components-loader-overlay.mjs +19 -18
  283. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  284. package/fesm2022/koobiq-components-modal.mjs +164 -167
  285. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  286. package/fesm2022/koobiq-components-navbar.mjs +46 -37
  287. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  288. package/fesm2022/koobiq-components-popover.mjs +32 -33
  289. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  290. package/fesm2022/koobiq-components-progress-spinner.mjs +2 -2
  291. package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
  292. package/fesm2022/koobiq-components-radio.mjs +10 -7
  293. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  294. package/fesm2022/koobiq-components-risk-level.mjs +72 -0
  295. package/fesm2022/koobiq-components-risk-level.mjs.map +1 -0
  296. package/fesm2022/koobiq-components-select.mjs +60 -30
  297. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  298. package/fesm2022/koobiq-components-sidebar.mjs +8 -8
  299. package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
  300. package/fesm2022/koobiq-components-sidepanel.mjs +19 -14
  301. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  302. package/fesm2022/koobiq-components-splitter.mjs +2 -2
  303. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  304. package/fesm2022/koobiq-components-table.mjs +2 -2
  305. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  306. package/fesm2022/koobiq-components-tabs.mjs +74 -53
  307. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  308. package/fesm2022/koobiq-components-tags.mjs +45 -38
  309. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  310. package/fesm2022/koobiq-components-textarea.mjs +3 -3
  311. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  312. package/fesm2022/koobiq-components-timepicker.mjs +9 -9
  313. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  314. package/fesm2022/koobiq-components-timezone.mjs +7 -7
  315. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  316. package/fesm2022/koobiq-components-title.mjs +5 -5
  317. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  318. package/fesm2022/koobiq-components-toast.mjs +71 -22
  319. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  320. package/fesm2022/koobiq-components-toggle.mjs +3 -3
  321. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  322. package/fesm2022/koobiq-components-tooltip.mjs +31 -30
  323. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  324. package/fesm2022/koobiq-components-tree-select.mjs +27 -22
  325. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  326. package/fesm2022/koobiq-components-tree.mjs +67 -54
  327. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  328. package/file-upload/_file-upload-theme.scss +54 -40
  329. package/file-upload/file-drop.d.ts +3 -2
  330. package/file-upload/file-upload.d.ts +4 -1
  331. package/file-upload/file-upload.scss +2 -9
  332. package/file-upload/multiple-file-upload.component.d.ts +6 -5
  333. package/file-upload/multiple-file-upload.component.scss +170 -59
  334. package/file-upload/single-file-upload.component.d.ts +6 -5
  335. package/file-upload/single-file-upload.component.scss +42 -22
  336. package/form-field/_form-field-theme.scss +3 -6
  337. package/form-field/_hint-theme.scss +6 -2
  338. package/form-field/cleaner.d.ts +1 -1
  339. package/form-field/form-field.d.ts +3 -4
  340. package/form-field/form-field.scss +2 -2
  341. package/form-field/hint.d.ts +4 -1
  342. package/form-field/hint.scss +9 -1
  343. package/form-field/password-hint.d.ts +7 -3
  344. package/form-field/password-hint.scss +6 -0
  345. package/form-field/password-toggle.d.ts +13 -7
  346. package/form-field/prefix.d.ts +1 -1
  347. package/form-field/suffix.d.ts +1 -1
  348. package/form-field/validate.directive.d.ts +1 -1
  349. package/icon/_icon-button-theme.scss +129 -0
  350. package/icon/_icon-item-theme.scss +41 -0
  351. package/icon/_icon-theme.scss +1 -232
  352. package/icon/icon-button.component.d.ts +22 -0
  353. package/icon/icon-button.scss +33 -0
  354. package/icon/icon-item.component.d.ts +10 -0
  355. package/icon/icon-item.scss +18 -0
  356. package/icon/icon.component.d.ts +1 -25
  357. package/icon/icon.module.d.ts +6 -4
  358. package/icon/icon.scss +0 -41
  359. package/icon/public-api.d.ts +2 -0
  360. package/input/_input-theme.scss +2 -1
  361. package/input/input-number.d.ts +61 -10
  362. package/input/input-password.d.ts +1 -1
  363. package/input/input.d.ts +2 -2
  364. package/input/input.scss +3 -1
  365. package/link/_link-theme.scss +101 -92
  366. package/link/link.component.d.ts +4 -4
  367. package/list/_list-theme.scss +36 -17
  368. package/list/list-selection.component.d.ts +6 -2
  369. package/list/list.module.d.ts +1 -1
  370. package/list/list.scss +6 -19
  371. package/loader-overlay/_loader-overlay-theme.scss +43 -11
  372. package/loader-overlay/loader-overlay.component.d.ts +6 -5
  373. package/loader-overlay/loader-overlay.scss +56 -22
  374. package/markdown/_markdown-theme.scss +2 -2
  375. package/modal/README.md +5 -5
  376. package/modal/_modal-confirm.scss +5 -37
  377. package/modal/_modal-theme.scss +14 -52
  378. package/modal/modal-ref.class.d.ts +2 -2
  379. package/modal/modal.component.d.ts +53 -52
  380. package/modal/modal.module.d.ts +2 -1
  381. package/modal/modal.scss +50 -31
  382. package/modal/modal.type.d.ts +35 -36
  383. package/navbar/_navbar-theme.scss +2 -2
  384. package/navbar/navbar-item.component.d.ts +4 -3
  385. package/navbar/navbar.component.d.ts +5 -2
  386. package/navbar/vertical-navbar.component.d.ts +4 -2
  387. package/package.json +48 -38
  388. package/popover/README.md +14 -14
  389. package/popover/_popover-theme.scss +15 -78
  390. package/popover/popover-animations.d.ts +1 -1
  391. package/popover/popover-confirm.component.d.ts +1 -3
  392. package/popover/popover.component.d.ts +3 -3
  393. package/popover/popover.scss +60 -50
  394. package/prebuilt-themes/dark-theme.css +1 -1
  395. package/prebuilt-themes/light-theme.css +1 -1
  396. package/progress-spinner/progress-spinner.component.d.ts +2 -2
  397. package/progress-spinner/progress-spinner.scss +10 -5
  398. package/radio/_radio-theme.scss +17 -4
  399. package/radio/radio.component.d.ts +2 -2
  400. package/radio/radio.scss +13 -0
  401. package/risk-level/README.md +0 -0
  402. package/risk-level/_risk-level-theme.scss +88 -0
  403. package/risk-level/index.d.ts +1 -0
  404. package/risk-level/public-api.d.ts +2 -0
  405. package/risk-level/risk-level.component.d.ts +18 -0
  406. package/risk-level/risk-level.component.scss +26 -0
  407. package/risk-level/risk-level.module.d.ts +10 -0
  408. package/select/_select-theme.scss +12 -4
  409. package/select/select-option.directive.d.ts +2 -0
  410. package/select/select.component.d.ts +15 -12
  411. package/select/select.scss +6 -190
  412. package/sidebar/sidebar-animations.d.ts +1 -1
  413. package/sidebar/sidebar.component.d.ts +3 -3
  414. package/sidepanel/_sidepanel-theme.scss +11 -41
  415. package/sidepanel/sidepanel-directives.d.ts +0 -2
  416. package/sidepanel/sidepanel.scss +33 -35
  417. package/splitter/_splitter-theme.scss +1 -0
  418. package/splitter/splitter.component.d.ts +1 -1
  419. package/table/_table-theme.scss +1 -1
  420. package/table/table.component.d.ts +1 -1
  421. package/tabs/_tabs-common.scss +28 -147
  422. package/tabs/_tabs-theme.scss +81 -175
  423. package/tabs/paginated-tab-header.d.ts +1 -0
  424. package/tabs/tab-body.component.d.ts +1 -1
  425. package/tabs/tab-content.directive.d.ts +1 -1
  426. package/tabs/tab-group.component.d.ts +5 -8
  427. package/tabs/tab-group.scss +10 -10
  428. package/tabs/tab-header.scss +2 -24
  429. package/tabs/tab-label-wrapper.directive.d.ts +1 -1
  430. package/tabs/tab-label.directive.d.ts +1 -1
  431. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +4 -2
  432. package/tabs/tab-nav-bar/tab-nav-bar.scss +9 -16
  433. package/tabs/tab.component.d.ts +1 -1
  434. package/tabs/tabs-animations.d.ts +1 -1
  435. package/tabs/tabs.module.d.ts +1 -1
  436. package/tags/_tag-theme.scss +1 -25
  437. package/tags/tag-default-options.d.ts +4 -0
  438. package/tags/tag-input.d.ts +2 -2
  439. package/tags/tag-list.component.d.ts +3 -2
  440. package/tags/tag-list.scss +26 -16
  441. package/tags/tag.component.d.ts +6 -6
  442. package/textarea/textarea.component.d.ts +1 -1
  443. package/timepicker/timepicker.directive.d.ts +2 -2
  444. package/timezone/timezone-option.component.d.ts +1 -1
  445. package/timezone/timezone-select.component.d.ts +1 -1
  446. package/title/title.directive.d.ts +1 -1
  447. package/toast/_toast-theme.scss +21 -33
  448. package/toast/toast-animations.d.ts +1 -0
  449. package/toast/toast-container.component.d.ts +7 -3
  450. package/toast/toast-container.component.scss +2 -1
  451. package/toast/toast.component.d.ts +6 -1
  452. package/toast/toast.component.scss +41 -34
  453. package/toast/toast.module.d.ts +1 -1
  454. package/toast/toast.service.d.ts +2 -0
  455. package/toast/toast.type.d.ts +8 -5
  456. package/toggle/_toggle-theme.scss +9 -1
  457. package/toggle/toggle.component.d.ts +1 -1
  458. package/toggle/toggle.scss +5 -2
  459. package/tooltip/tooltip.animations.d.ts +1 -1
  460. package/tooltip/tooltip.component.d.ts +5 -5
  461. package/tree/_tree-theme.scss +46 -34
  462. package/tree/control/base-tree-control.d.ts +1 -1
  463. package/tree/control/tree-control.d.ts +1 -1
  464. package/tree/node.d.ts +1 -1
  465. package/tree/outlet.d.ts +1 -1
  466. package/tree/padding.directive.d.ts +1 -1
  467. package/tree/toggle.d.ts +3 -3
  468. package/tree/tree-base.d.ts +1 -1
  469. package/tree/tree-option.component.d.ts +1 -2
  470. package/tree/tree-option.scss +40 -27
  471. package/tree/tree-selection.component.d.ts +1 -1
  472. package/tree/tree.d.ts +1 -1
  473. package/tree/tree.module.d.ts +2 -1
  474. package/tree-select/_tree-select-theme.scss +13 -3
  475. package/tree-select/tree-select.component.d.ts +6 -4
  476. package/tree-select/tree-select.scss +5 -194
  477. package/core/styles/theming/_badges.scss +0 -57
  478. package/core/styles/theming/prebuilt/light-theme.scss +0 -20
  479. package/list/_list-base.scss +0 -54
@@ -7,7 +7,7 @@ import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coerci
7
7
  import * as i1 from '@mosaic-design/date-adapter';
8
8
  import { DateAdapter as DateAdapter$1 } from '@mosaic-design/date-adapter';
9
9
  import { DateFormatter as DateFormatter$1 } from '@mosaic-design/date-formatter';
10
- import { BehaviorSubject, Subject } from 'rxjs';
10
+ import { BehaviorSubject, Subject, pairwise } from 'rxjs';
11
11
  import * as i2 from '@angular/common';
12
12
  import { CommonModule, DOCUMENT } from '@angular/common';
13
13
  import { ENTER, SPACE, TAB, ESCAPE } from '@koobiq/cdk/keycodes';
@@ -38,7 +38,7 @@ var AnimationCurves;
38
38
  * const containing the metadata for one animation.
39
39
  *
40
40
  */
41
- const mcSelectAnimations = {
41
+ const kbqSelectAnimations = {
42
42
  /**
43
43
  * This animation transforms the select's overlay panel on and off the page.
44
44
  *
@@ -74,8 +74,8 @@ const mcSelectAnimations = {
74
74
  ])
75
75
  ])
76
76
  };
77
- const transformPanel = mcSelectAnimations.transformPanel;
78
- const fadeInContent = mcSelectAnimations.fadeInContent;
77
+ const transformPanel = kbqSelectAnimations.transformPanel;
78
+ const fadeInContent = kbqSelectAnimations.fadeInContent;
79
79
 
80
80
  // Injection token that configures whether the koobiq sanity checks are enabled.
81
81
  const KBQ_SANITY_CHECKS = new InjectionToken('kbq-sanity-checks', {
@@ -86,7 +86,7 @@ function mcSanityChecksFactory() {
86
86
  return true;
87
87
  }
88
88
  /**
89
- * Module that captures anything that should be loaded and/or run for *all* Mosaic
89
+ * Module that captures anything that should be loaded and/or run for *all* Koobiq
90
90
  * components. This includes Bidi, etc.
91
91
  *
92
92
  * This module should be imported to each top-level component module (e.g., KbqTabsModule).
@@ -525,59 +525,208 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
525
525
  }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
526
526
 
527
527
  const enUSLocaleData = {
528
- en: {
528
+ 'en-US': {
529
529
  select: { hiddenItemsText: 'one more' },
530
530
  datepicker: {
531
- placeholder: 'dd/mm/yyyy',
532
- dateInput: 'dd/MM/yyyy'
531
+ placeholder: 'yyyy-mm-dd',
532
+ dateInput: 'yyyy-MM-dd'
533
+ },
534
+ formatters: {
535
+ number: {
536
+ rounding: {
537
+ separator: '',
538
+ groupSeparator: '.',
539
+ thousand: 'K',
540
+ million: 'M',
541
+ billion: 'B',
542
+ trillion: 'T'
543
+ }
544
+ }
545
+ },
546
+ input: {
547
+ number: {
548
+ groupSeparator: [','],
549
+ fractionSeparator: '.'
550
+ }
533
551
  }
534
552
  }
535
553
  };
536
554
 
537
555
  const esLALocaleData = {
538
556
  'es-LA': {
539
- select: { hiddenItemsText: 'más' }
557
+ select: { hiddenItemsText: 'más' },
558
+ datepicker: {
559
+ placeholder: 'dd/mm/aaaa'
560
+ },
561
+ timepicker: {
562
+ placeholder: {
563
+ full: 'hh:mm:ss',
564
+ short: 'hh:mm'
565
+ }
566
+ },
567
+ formatters: {
568
+ number: {
569
+ rounding: {
570
+ separator: '',
571
+ groupSeparator: ',',
572
+ thousand: 'K',
573
+ million: 'M',
574
+ billion: 'MRD',
575
+ trillion: 'B'
576
+ }
577
+ }
578
+ },
579
+ input: {
580
+ number: {
581
+ // nbsp is generated automatically and used by default in spec
582
+ // tslint:disable-next-line:no-irregular-whitespace
583
+ groupSeparator: [' ', ' '],
584
+ fractionSeparator: ','
585
+ }
586
+ }
540
587
  }
541
588
  };
542
589
 
543
590
  const faIRLocaleData = {
544
591
  'fa-IR': {
545
- select: { hiddenItemsText: 'أكثر' }
592
+ select: { hiddenItemsText: 'أكثر' },
593
+ datepicker: {
594
+ placeholder: 'روز/ ماه/سال'
595
+ },
596
+ timepicker: {
597
+ placeholder: {
598
+ full: 'ثانیه:دقیقه:ساعت',
599
+ short: 'دقیقه:ساعت'
600
+ }
601
+ },
602
+ formatters: {
603
+ number: {
604
+ rounding: {
605
+ separator: ' ',
606
+ groupSeparator: '٫',
607
+ thousand: 'هزار',
608
+ million: 'میلیون',
609
+ billion: 'م',
610
+ trillion: 'تریلیون',
611
+ rtl: true
612
+ }
613
+ }
614
+ },
615
+ input: {
616
+ number: {
617
+ groupSeparator: ['\u066C'],
618
+ fractionSeparator: '\u066B'
619
+ }
620
+ }
546
621
  }
547
622
  };
548
623
 
549
624
  const ptBRLocaleData = {
550
625
  'pt-BR': {
551
- select: { hiddenItemsText: 'mais' }
626
+ select: { hiddenItemsText: 'mais' },
627
+ datepicker: {
628
+ placeholder: 'dd/mm/yyyy'
629
+ },
630
+ timepicker: {
631
+ placeholder: {
632
+ full: 'hh:mm:ss',
633
+ short: 'hh:mm'
634
+ }
635
+ },
636
+ formatters: {
637
+ number: {
638
+ rounding: {
639
+ separator: ' ',
640
+ groupSeparator: ',',
641
+ thousand: 'mil',
642
+ million: 'mi',
643
+ billion: 'bi',
644
+ trillion: 'tri'
645
+ }
646
+ }
647
+ },
648
+ input: {
649
+ number: {
650
+ groupSeparator: ['.'],
651
+ fractionSeparator: ','
652
+ }
653
+ }
552
654
  }
553
655
  };
554
656
 
555
657
  const ruRULocaleData = {
556
- ru: {
658
+ 'ru-RU': {
557
659
  select: { hiddenItemsText: 'еще' },
558
660
  datepicker: {
559
661
  placeholder: 'дд.мм.гггг',
560
662
  dateInput: 'dd.MM.yyyy'
663
+ },
664
+ formatters: {
665
+ number: {
666
+ rounding: {
667
+ separator: ' ',
668
+ groupSeparator: ',',
669
+ thousand: 'К',
670
+ million: 'М',
671
+ billion: 'М',
672
+ trillion: 'Т'
673
+ }
674
+ }
675
+ },
676
+ input: {
677
+ number: {
678
+ // nbsp is generated automatically and used by default in spec
679
+ // tslint:disable-next-line:no-irregular-whitespace
680
+ groupSeparator: [' ', ' '],
681
+ fractionSeparator: ',',
682
+ startFormattingFrom: 4
683
+ }
561
684
  }
562
685
  }
563
686
  };
564
687
 
565
688
  const znCNLocaleData = {
566
689
  'zh-CN': {
567
- select: { hiddenItemsText: '更多的' }
690
+ select: { hiddenItemsText: '更多的' },
691
+ datepicker: {
692
+ placeholder: '年/月/日'
693
+ },
694
+ timepicker: {
695
+ placeholder: {
696
+ full: '时:分:秒',
697
+ short: '时:分'
698
+ }
699
+ },
700
+ formatters: {
701
+ number: {
702
+ rounding: {
703
+ separator: ' ',
704
+ groupSeparator: '.',
705
+ tenThousand: '万',
706
+ oneHundredMillions: '亿',
707
+ trillion: '兆'
708
+ }
709
+ }
710
+ },
711
+ input: {
712
+ number: {
713
+ groupSeparator: [','],
714
+ fractionSeparator: '.'
715
+ }
716
+ }
568
717
  }
569
718
  };
570
719
 
571
720
  const KBQ_LOCALE_ID$1 = new InjectionToken('KbqLocaleId');
572
- const KBQ_DEFAULT_LOCALE_ID = 'ru';
721
+ const KBQ_DEFAULT_LOCALE_ID = 'ru-RU';
573
722
  function KBQ_DEFAULT_LOCALE_DATA_FACTORY() {
574
723
  return {
575
724
  items: [
576
- { id: 'en', name: 'English' },
725
+ { id: 'en-US', name: 'English' },
577
726
  { id: 'zh-CN', name: '简体中文' },
578
727
  { id: 'es-LA', name: 'Español' },
579
728
  { id: 'pt-BR', name: 'Português' },
580
- { id: 'ru', name: 'Русский' },
729
+ { id: 'ru-RU', name: 'Русский' },
581
730
  { id: 'fa-IR', name: 'فارسی' }
582
731
  ],
583
732
  ...ruRULocaleData,
@@ -672,8 +821,29 @@ const minIntGroupPosition = 1;
672
821
  const minFractionGroupPosition = 3;
673
822
  const maxFractionGroupPosition = 5;
674
823
  const useGroupingPosition = 7;
824
+ // tslint:disable:no-magic-numbers
825
+ const ROUNDING_UNITS = {
826
+ thousand: 1e3,
827
+ tenThousand: 10 * 1e3,
828
+ million: 1e6,
829
+ oneHundredMillions: 100 * 1e6,
830
+ billion: 1e9,
831
+ trillion: 1e12
832
+ };
833
+ const intervalsConfig = {
834
+ supportedLanguages: ['ru-RU', 'en-US', 'es-LA', 'pt-BR', 'fa-IR'],
835
+ intervals: [
836
+ { startRange: 1, endRange: ROUNDING_UNITS.thousand },
837
+ { startRange: ROUNDING_UNITS.thousand, endRange: ROUNDING_UNITS.tenThousand, precision: 1 },
838
+ { startRange: ROUNDING_UNITS.tenThousand, endRange: ROUNDING_UNITS.million },
839
+ { startRange: ROUNDING_UNITS.million, endRange: ROUNDING_UNITS.million * 10, precision: 1 },
840
+ { startRange: ROUNDING_UNITS.million * 10, endRange: ROUNDING_UNITS.billion }
841
+ ]
842
+ };
843
+ // tslint:enable:no-magic-numbers
675
844
  class ParsedDigitsInfo {
676
845
  }
846
+ const defaultValueForGroupingInRULocale = 10000;
677
847
  function parseDigitsInfo(digitsInfo) {
678
848
  const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);
679
849
  if (parts === null) {
@@ -737,16 +907,28 @@ class KbqDecimalPipe {
737
907
  ...this.options,
738
908
  ...parsedDigitsInfo
739
909
  };
910
+ if (this.isSpecialFormatForRULocale(currentLocale, value, parsedDigitsInfo?.useGrouping)) {
911
+ options.useGrouping = false;
912
+ }
740
913
  try {
741
914
  const num = strToNumber(value);
915
+ /* Guideline requires for group separator to be `space`, as in 'ru-RU' locale.
916
+ * But by default in es-LA locale is used `comma`.
917
+ * To reduce data manipulation, 'ru-RU' locale is used. */
918
+ if (currentLocale === 'es-LA') {
919
+ return Intl.NumberFormat.call(this, 'ru-RU', options).format(num);
920
+ }
742
921
  return Intl.NumberFormat.call(this, currentLocale, options).format(num);
743
922
  }
744
923
  catch (error) {
745
924
  throw Error(`InvalidPipeArgument: KbqDecimalPipe for pipe '${JSON.stringify(error.message)}'`);
746
925
  }
747
926
  }
927
+ isSpecialFormatForRULocale(locale, value, grouping) {
928
+ return ['ru', 'ru-RU'].includes(locale) && grouping === undefined && value < defaultValueForGroupingInRULocale;
929
+ }
748
930
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, deps: [{ token: KBQ_LOCALE_ID, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }, { token: KBQ_NUMBER_FORMATTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
749
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, name: "mcNumber", pure: false }); }
931
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, name: "kbqNumber", pure: false }); }
750
932
  /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, providedIn: 'root' }); }
751
933
  }
752
934
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqDecimalPipe, decorators: [{
@@ -754,7 +936,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
754
936
  args: [{ providedIn: 'root' }]
755
937
  }, {
756
938
  type: Pipe,
757
- args: [{ name: 'mcNumber', pure: false }]
939
+ args: [{ name: 'kbqNumber', pure: false }]
940
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
941
+ type: Optional
942
+ }, {
943
+ type: Inject,
944
+ args: [KBQ_LOCALE_ID]
945
+ }] }, { type: KbqLocaleService, decorators: [{
946
+ type: Optional
947
+ }, {
948
+ type: Inject,
949
+ args: [KBQ_LOCALE_SERVICE]
950
+ }] }, { type: ParsedDigitsInfo, decorators: [{
951
+ type: Optional
952
+ }, {
953
+ type: Inject,
954
+ args: [KBQ_NUMBER_FORMATTER_OPTIONS]
955
+ }] }]; } });
956
+ class KbqTableNumberPipe {
957
+ constructor(id, localeService, options) {
958
+ this.id = id;
959
+ this.localeService = localeService;
960
+ this.options = options;
961
+ this.options = this.options || KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS;
962
+ this.localeService?.changes
963
+ .subscribe((newId) => this.id = newId);
964
+ }
965
+ /**
966
+ * @param value The number to be formatted.
967
+ * @param digitsInfo Decimal representation options, specified by a string
968
+ * in the following format:<br>
969
+ * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
970
+ * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
971
+ * Default is `1`.
972
+ * - `minFractionDigits`: The minimum number of digits after the decimal point.
973
+ * Default is `0`.
974
+ * - `maxFractionDigits`: The maximum number of digits after the decimal point.
975
+ * Default is `3`.
976
+ * @param locale A locale code for the locale format rules to use.
977
+ * When not supplied, uses the value of `KBQ_LOCALE_ID`, which is `ru` by default.
978
+ */
979
+ transform(value, digitsInfo, locale) {
980
+ if (isEmpty(value)) {
981
+ return null;
982
+ }
983
+ const currentLocale = locale || this.id || KBQ_DEFAULT_LOCALE_ID;
984
+ let parsedDigitsInfo;
985
+ if (digitsInfo) {
986
+ parsedDigitsInfo = parseDigitsInfo(digitsInfo);
987
+ }
988
+ const options = {
989
+ ...this.options,
990
+ ...parsedDigitsInfo
991
+ };
992
+ try {
993
+ const num = strToNumber(value);
994
+ /* Guideline requires for group separator to be `space`, as in 'ru-RU' locale.
995
+ * But by default in es-LA locale is used `comma`.
996
+ * To reduce data manipulation, 'ru-RU' locale is used. */
997
+ if (currentLocale === 'es-LA') {
998
+ return Intl.NumberFormat.call(this, 'ru-RU', options).format(num);
999
+ }
1000
+ return Intl.NumberFormat.call(this, currentLocale, options).format(num);
1001
+ }
1002
+ catch (error) {
1003
+ throw Error(`InvalidPipeArgument: KbqTableNumberPipe for pipe '${JSON.stringify(error.message)}'`);
1004
+ }
1005
+ }
1006
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTableNumberPipe, deps: [{ token: KBQ_LOCALE_ID, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }, { token: KBQ_NUMBER_FORMATTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
1007
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqTableNumberPipe, name: "kbqTableNumber", pure: false }); }
1008
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTableNumberPipe, providedIn: 'root' }); }
1009
+ }
1010
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqTableNumberPipe, decorators: [{
1011
+ type: Injectable,
1012
+ args: [{ providedIn: 'root' }]
1013
+ }, {
1014
+ type: Pipe,
1015
+ args: [{ name: 'kbqTableNumber', pure: false }]
758
1016
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
759
1017
  type: Optional
760
1018
  }, {
@@ -771,10 +1029,124 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
771
1029
  type: Inject,
772
1030
  args: [KBQ_NUMBER_FORMATTER_OPTIONS]
773
1031
  }] }]; } });
1032
+ function isWithin(startRange, endRange, valueToCheck) {
1033
+ return startRange <= valueToCheck && valueToCheck < endRange;
1034
+ }
1035
+ class KbqRoundDecimalPipe {
1036
+ constructor(id, localeService) {
1037
+ this.id = id;
1038
+ this.localeService = localeService;
1039
+ this.localeService?.changes
1040
+ .subscribe((newId) => this.id = newId);
1041
+ }
1042
+ transform(value, locale) {
1043
+ if (isEmpty(value)) {
1044
+ return null;
1045
+ }
1046
+ const currentLocale = locale || this.id || KBQ_DEFAULT_LOCALE_ID;
1047
+ this.roundingOptions = this.localeService.locales[currentLocale].formatters.number.rounding;
1048
+ try {
1049
+ const num = strToNumber(value);
1050
+ const unit = this.calculateUnit(num);
1051
+ if (!unit) {
1052
+ return Intl.NumberFormat.call(this, currentLocale, { useGrouping: false }).format(num);
1053
+ }
1054
+ let parts = {};
1055
+ if (intervalsConfig.supportedLanguages.includes(currentLocale)) {
1056
+ intervalsConfig.intervals
1057
+ .find(({ startRange, endRange, precision }) => {
1058
+ const within = isWithin(startRange, endRange, num);
1059
+ if (within) {
1060
+ if (precision) {
1061
+ parts = unit === 'thousand' ?
1062
+ this.calculatePartsForThousands(num) :
1063
+ {
1064
+ num: Math.trunc(num / ROUNDING_UNITS[unit]),
1065
+ fraction: this.calculateDecimal(num, ROUNDING_UNITS[unit])
1066
+ };
1067
+ }
1068
+ else {
1069
+ parts = { num: Math.round(num / ROUNDING_UNITS[unit]) };
1070
+ }
1071
+ }
1072
+ return within;
1073
+ });
1074
+ }
1075
+ parts = parts.num ? parts : {
1076
+ num: Math.trunc(num / ROUNDING_UNITS[unit]),
1077
+ fraction: this.calculateDecimal(num, ROUNDING_UNITS[unit])
1078
+ };
1079
+ Object.keys(parts).forEach((key) => {
1080
+ parts[key] = Intl.NumberFormat.call(this, currentLocale, { useGrouping: false }).format(parts[key]);
1081
+ });
1082
+ const calculatedValue = parts.fraction
1083
+ ? `${parts.num}${this.roundingOptions.groupSeparator}${parts.fraction}`
1084
+ : `${parts.num}`;
1085
+ return `${calculatedValue}${this.roundingOptions.separator}${this.roundingOptions[unit]}`;
1086
+ }
1087
+ catch (error) {
1088
+ throw Error(`InvalidPipeArgument: KbqRoundDecimalPipe for pipe '${JSON.stringify(error.message)}'`);
1089
+ }
1090
+ }
1091
+ calculateDecimal(num, divider) {
1092
+ /* tslint:disable-next-line:no-magic-numbers */
1093
+ return Math.round(num / divider % 1 * 10);
1094
+ }
1095
+ /**
1096
+ * 2 * 1000 is a number in the interval of [1500...2500)
1097
+ *
1098
+ * 2,0 * 1000 is a number in the interval of [1950...2050)
1099
+ */
1100
+ calculatePartsForThousands(num) {
1101
+ const dividedValue = num / ROUNDING_UNITS.thousand;
1102
+ const div = Math.round(dividedValue) * ROUNDING_UNITS.thousand;
1103
+ const fifty = 50;
1104
+ return isWithin(div - fifty, div + fifty, num)
1105
+ ? { num: Math.round(dividedValue), fraction: 0 }
1106
+ : { num: Math.round(dividedValue) };
1107
+ }
1108
+ calculateUnit(num) {
1109
+ let currentUnit;
1110
+ const localizedOptions = Object.keys(this.roundingOptions);
1111
+ Object.keys(ROUNDING_UNITS).every((key) => {
1112
+ if (!localizedOptions.includes(key)) {
1113
+ return true;
1114
+ }
1115
+ if (num / ROUNDING_UNITS[key] >= 1) {
1116
+ currentUnit = key;
1117
+ return true;
1118
+ }
1119
+ return false;
1120
+ });
1121
+ return currentUnit;
1122
+ }
1123
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqRoundDecimalPipe, deps: [{ token: KBQ_LOCALE_ID, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
1124
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqRoundDecimalPipe, name: "kbqRoundNumber", pure: false }); }
1125
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqRoundDecimalPipe, providedIn: 'root' }); }
1126
+ }
1127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqRoundDecimalPipe, decorators: [{
1128
+ type: Injectable,
1129
+ args: [{ providedIn: 'root' }]
1130
+ }, {
1131
+ type: Pipe,
1132
+ args: [{ name: 'kbqRoundNumber', pure: false }]
1133
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1134
+ type: Optional
1135
+ }, {
1136
+ type: Inject,
1137
+ args: [KBQ_LOCALE_ID]
1138
+ }] }, { type: KbqLocaleService, decorators: [{
1139
+ type: Optional
1140
+ }, {
1141
+ type: Inject,
1142
+ args: [KBQ_LOCALE_SERVICE]
1143
+ }] }]; } });
774
1144
 
775
1145
  class KbqFormattersModule {
776
1146
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqFormattersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
777
1147
  /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: KbqFormattersModule, declarations: [KbqDecimalPipe,
1148
+ KbqRoundDecimalPipe,
1149
+ KbqTableNumberPipe,
778
1150
  AbsoluteDateFormatterPipe,
779
1151
  AbsoluteDateTimeFormatterPipe,
780
1152
  AbsoluteDateShortFormatterPipe,
@@ -788,6 +1160,8 @@ class KbqFormattersModule {
788
1160
  RangeDateTimeFormatterPipe,
789
1161
  RangeShortDateTimeFormatterPipe,
790
1162
  RangeMiddleDateTimeFormatterPipe], exports: [KbqDecimalPipe,
1163
+ KbqRoundDecimalPipe,
1164
+ KbqTableNumberPipe,
791
1165
  AbsoluteDateFormatterPipe,
792
1166
  AbsoluteDateTimeFormatterPipe,
793
1167
  AbsoluteDateShortFormatterPipe,
@@ -808,6 +1182,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
808
1182
  args: [{
809
1183
  declarations: [
810
1184
  KbqDecimalPipe,
1185
+ KbqRoundDecimalPipe,
1186
+ KbqTableNumberPipe,
811
1187
  AbsoluteDateFormatterPipe,
812
1188
  AbsoluteDateTimeFormatterPipe,
813
1189
  AbsoluteDateShortFormatterPipe,
@@ -824,6 +1200,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
824
1200
  ],
825
1201
  exports: [
826
1202
  KbqDecimalPipe,
1203
+ KbqRoundDecimalPipe,
1204
+ KbqTableNumberPipe,
827
1205
  AbsoluteDateFormatterPipe,
828
1206
  AbsoluteDateTimeFormatterPipe,
829
1207
  AbsoluteDateShortFormatterPipe,
@@ -868,13 +1246,13 @@ class KbqFormElement {
868
1246
  }
869
1247
  }
870
1248
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqFormElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
871
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqFormElement, selector: ".kbq-form__row, .kbq-form__fieldset, .kbq-form__legend", host: { properties: { "class.kbq-form-row_margin": "margin" } }, queries: [{ propertyName: "elements", predicate: KbqFormElement }], exportAs: ["mcFormElement"], ngImport: i0 }); }
1249
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqFormElement, selector: ".kbq-form__row, .kbq-form__fieldset, .kbq-form__legend", host: { properties: { "class.kbq-form-row_margin": "margin" } }, queries: [{ propertyName: "elements", predicate: KbqFormElement }], exportAs: ["kbqFormElement"], ngImport: i0 }); }
872
1250
  }
873
1251
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqFormElement, decorators: [{
874
1252
  type: Directive,
875
1253
  args: [{
876
1254
  selector: '.kbq-form__row, .kbq-form__fieldset, .kbq-form__legend',
877
- exportAs: 'mcFormElement',
1255
+ exportAs: 'kbqFormElement',
878
1256
  host: {
879
1257
  '[class.kbq-form-row_margin]': 'margin'
880
1258
  }
@@ -897,13 +1275,13 @@ class KbqForm {
897
1275
  });
898
1276
  }
899
1277
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqForm, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
900
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqForm, selector: ".kbq-form-vertical, .kbq-form-horizontal", host: { classAttribute: "kbq-form" }, queries: [{ propertyName: "elements", predicate: KbqFormElement }], exportAs: ["mcForm"], ngImport: i0 }); }
1278
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.5", type: KbqForm, selector: ".kbq-form-vertical, .kbq-form-horizontal", host: { classAttribute: "kbq-form" }, queries: [{ propertyName: "elements", predicate: KbqFormElement }], exportAs: ["kbqForm"], ngImport: i0 }); }
901
1279
  }
902
1280
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqForm, decorators: [{
903
1281
  type: Directive,
904
1282
  args: [{
905
1283
  selector: '.kbq-form-vertical, .kbq-form-horizontal',
906
- exportAs: 'mcForm',
1284
+ exportAs: 'kbqForm',
907
1285
  host: {
908
1286
  class: 'kbq-form'
909
1287
  }
@@ -1058,11 +1436,11 @@ class KbqOptgroup extends KbqOptgroupMixinBase {
1058
1436
  this.labelId = `kbq-optgroup-label-${uniqueOptgroupIdCounter++}`;
1059
1437
  }
1060
1438
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOptgroup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1061
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOptgroup, selector: "kbq-optgroup", inputs: { disabled: "disabled", label: "label" }, host: { properties: { "class.kbq-disabled": "disabled" }, classAttribute: "kbq-optgroup" }, exportAs: ["mcOptgroup"], usesInheritance: true, ngImport: i0, template: "<label class=\"kbq-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"kbq-option, kbq-list-option, kbq-timezone-option, ng-container\"></ng-content>\n", styles: [".kbq-optgroup-label{padding-left:var(--kbq-optgroup-size-padding-left, 17px);-webkit-user-select:none;user-select:none;cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1439
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOptgroup, selector: "kbq-optgroup", inputs: { disabled: "disabled", label: "label" }, host: { properties: { "class.kbq-disabled": "disabled" }, classAttribute: "kbq-optgroup" }, exportAs: ["kbqOptgroup"], usesInheritance: true, ngImport: i0, template: "<label class=\"kbq-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"kbq-option, kbq-list-option, kbq-timezone-option, ng-container\"></ng-content>\n", styles: [".kbq-optgroup-label{padding-left:var(--kbq-optgroup-size-padding-left, 17px);-webkit-user-select:none;user-select:none;cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1062
1440
  }
1063
1441
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOptgroup, decorators: [{
1064
1442
  type: Component,
1065
- args: [{ selector: 'kbq-optgroup', exportAs: 'mcOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {
1443
+ args: [{ selector: 'kbq-optgroup', exportAs: 'kbqOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {
1066
1444
  class: 'kbq-optgroup',
1067
1445
  '[class.kbq-disabled]': 'disabled'
1068
1446
  }, template: "<label class=\"kbq-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"kbq-option, kbq-list-option, kbq-timezone-option, ng-container\"></ng-content>\n", styles: [".kbq-optgroup-label{padding-left:var(--kbq-optgroup-size-padding-left, 17px);-webkit-user-select:none;user-select:none;cursor:default}\n"] }]
@@ -1100,7 +1478,7 @@ class KbqPseudoCheckbox extends KbqPseudoCheckboxMixinBase {
1100
1478
  this.disabled = false;
1101
1479
  }
1102
1480
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqPseudoCheckbox, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
1103
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: { color: "color", big: "big", state: "state", disabled: "disabled" }, host: { properties: { "class.kbq-checkbox_big": "big", "class.kbq-indeterminate": "state === \"indeterminate\"", "class.kbq-checked": "state === \"checked\"", "class.kbq-disabled": "disabled" }, classAttribute: "kbq-pseudo-checkbox" }, usesInheritance: true, ngImport: i0, template: "<i class=\"kbq-checkbox-checkmark mc kbq-check_16\"></i>\n<i class=\"kbq-checkbox-mixedmark mc kbq-minus_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:var(--kbq-checkbox-size-normal-width, 16px);height:var(--kbq-checkbox-size-normal-width, 16px);border-radius:var(--kbq-checkbox-size-normal-border-radius, 4px);border-width:var(--kbq-checkbox-size-normal-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none;position:absolute;top:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px))}.kbq-pseudo-checkbox.kbq-pseudo-checkbox-checked,.kbq-pseudo-checkbox.kbq-pseudo-checkbox-indeterminate{border-color:transparent}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width, 16px);height:var(--kbq-checkbox-size-big-width, 16px);border-radius:var(--kbq-checkbox-size-big-border-radius, 4px);border-width:var(--kbq-checkbox-size-big-border-width, 1px)}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-mixedmark{top:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1481
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: { color: "color", big: "big", state: "state", disabled: "disabled" }, host: { properties: { "class.kbq-checkbox_big": "big", "class.kbq-indeterminate": "state === \"indeterminate\"", "class.kbq-checked": "state === \"checked\"", "class.kbq-disabled": "disabled" }, classAttribute: "kbq-pseudo-checkbox" }, usesInheritance: true, ngImport: i0, template: "<i class=\"kbq-checkbox-checkmark mc mc-check_16\"></i>\n<i class=\"kbq-checkbox-mixedmark mc mc-minus_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:var(--kbq-checkbox-size-normal-width, 16px);height:var(--kbq-checkbox-size-normal-width, 16px);border-radius:var(--kbq-checkbox-size-normal-border-radius, 4px);border-width:var(--kbq-checkbox-size-normal-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none;position:absolute;top:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px))}.kbq-pseudo-checkbox.kbq-pseudo-checkbox-checked,.kbq-pseudo-checkbox.kbq-pseudo-checkbox-indeterminate{border-color:transparent}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width, 16px);height:var(--kbq-checkbox-size-big-width, 16px);border-radius:var(--kbq-checkbox-size-big-border-radius, 4px);border-width:var(--kbq-checkbox-size-big-border-width, 1px)}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-mixedmark{top:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1104
1482
  }
1105
1483
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqPseudoCheckbox, decorators: [{
1106
1484
  type: Component,
@@ -1110,7 +1488,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
1110
1488
  '[class.kbq-indeterminate]': 'state === "indeterminate"',
1111
1489
  '[class.kbq-checked]': 'state === "checked"',
1112
1490
  '[class.kbq-disabled]': 'disabled'
1113
- }, preserveWhitespaces: false, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<i class=\"kbq-checkbox-checkmark mc kbq-check_16\"></i>\n<i class=\"kbq-checkbox-mixedmark mc kbq-minus_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:var(--kbq-checkbox-size-normal-width, 16px);height:var(--kbq-checkbox-size-normal-width, 16px);border-radius:var(--kbq-checkbox-size-normal-border-radius, 4px);border-width:var(--kbq-checkbox-size-normal-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none;position:absolute;top:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px))}.kbq-pseudo-checkbox.kbq-pseudo-checkbox-checked,.kbq-pseudo-checkbox.kbq-pseudo-checkbox-indeterminate{border-color:transparent}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width, 16px);height:var(--kbq-checkbox-size-big-width, 16px);border-radius:var(--kbq-checkbox-size-big-border-radius, 4px);border-width:var(--kbq-checkbox-size-big-border-width, 1px)}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-mixedmark{top:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px))}\n"] }]
1491
+ }, preserveWhitespaces: false, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<i class=\"kbq-checkbox-checkmark mc mc-check_16\"></i>\n<i class=\"kbq-checkbox-mixedmark mc mc-minus_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:var(--kbq-checkbox-size-normal-width, 16px);height:var(--kbq-checkbox-size-normal-width, 16px);border-radius:var(--kbq-checkbox-size-normal-border-radius, 4px);border-width:var(--kbq-checkbox-size-normal-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none;position:absolute;top:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-normal-border-width, 1px))}.kbq-pseudo-checkbox.kbq-pseudo-checkbox-checked,.kbq-pseudo-checkbox.kbq-pseudo-checkbox-indeterminate{border-color:transparent}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width, 16px);height:var(--kbq-checkbox-size-big-width, 16px);border-radius:var(--kbq-checkbox-size-big-border-radius, 4px);border-width:var(--kbq-checkbox-size-big-border-width, 1px)}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big .kbq-checkbox-mixedmark{top:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px));left:calc(-1 * var(--kbq-checkbox-size-big-border-width, 1px))}\n"] }]
1114
1492
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { big: [{
1115
1493
  type: Input
1116
1494
  }], state: [{
@@ -1135,10 +1513,49 @@ class KbqOptionSelectionChange {
1135
1513
  * Injection token used to provide the parent component to options.
1136
1514
  */
1137
1515
  const KBQ_OPTION_PARENT_COMPONENT = new InjectionToken('KBQ_OPTION_PARENT_COMPONENT');
1516
+ class KbqOptionBase {
1517
+ /** Emits the selection change event. */
1518
+ emitSelectionChangeEvent(isUserInput = false) {
1519
+ this.onSelectionChange.emit(new KbqOptionSelectionChange(this, isUserInput));
1520
+ }
1521
+ }
1522
+ class KbqVirtualOption extends KbqOptionBase {
1523
+ get disabled() {
1524
+ return this._disabled;
1525
+ }
1526
+ set disabled(value) {
1527
+ this._disabled = coerceBooleanProperty(value);
1528
+ }
1529
+ get selected() {
1530
+ return this._selected;
1531
+ }
1532
+ get viewValue() {
1533
+ return this.value;
1534
+ }
1535
+ constructor(value, _disabled = false) {
1536
+ super();
1537
+ this.value = value;
1538
+ this._disabled = _disabled;
1539
+ this._selected = false;
1540
+ this.onSelectionChange = new EventEmitter();
1541
+ }
1542
+ select() {
1543
+ if (!this._selected) {
1544
+ this._selected = true;
1545
+ this.emitSelectionChangeEvent();
1546
+ }
1547
+ }
1548
+ deselect() {
1549
+ if (this._selected) {
1550
+ this._selected = false;
1551
+ this.emitSelectionChangeEvent();
1552
+ }
1553
+ }
1554
+ }
1138
1555
  /**
1139
1556
  * Single option inside of a `<kbq-select>` element.
1140
1557
  */
1141
- class KbqOption {
1558
+ class KbqOption extends KbqOptionBase {
1142
1559
  get showCheckbox() {
1143
1560
  return this._showCheckbox === undefined ? this.multiple : this._showCheckbox;
1144
1561
  }
@@ -1179,6 +1596,7 @@ class KbqOption {
1179
1596
  return this._active;
1180
1597
  }
1181
1598
  constructor(element, changeDetectorRef, parent, group) {
1599
+ super();
1182
1600
  this.element = element;
1183
1601
  this.changeDetectorRef = changeDetectorRef;
1184
1602
  this.parent = parent;
@@ -1269,6 +1687,7 @@ class KbqOption {
1269
1687
  this.selectViaInteraction();
1270
1688
  // Prevent the page from scrolling down and form submits.
1271
1689
  event.preventDefault();
1690
+ event.stopPropagation();
1272
1691
  }
1273
1692
  }
1274
1693
  /**
@@ -1288,18 +1707,14 @@ class KbqOption {
1288
1707
  getHostElement() {
1289
1708
  return this.element.nativeElement;
1290
1709
  }
1291
- /** Emits the selection change event. */
1292
- emitSelectionChangeEvent(isUserInput = false) {
1293
- this.onSelectionChange.emit(new KbqOptionSelectionChange(this, isUserInput));
1294
- }
1295
1710
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOption, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: KBQ_OPTION_PARENT_COMPONENT, optional: true }, { token: KbqOptgroup, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1296
1711
  /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOption, selector: "kbq-option", inputs: { value: "value", showCheckbox: "showCheckbox", disabled: "disabled" }, outputs: { onSelectionChange: "onSelectionChange" }, host: { listeners: { "click": "selectViaInteraction()", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "getTabIndex()", "class.kbq-selected": "selected", "class.kbq-option-multiple": "multiple", "class.kbq-active": "active", "class.kbq-disabled": "disabled", "id": "id" }, classAttribute: "kbq-option" }, providers: [{
1297
1712
  provide: KBQ_TITLE_TEXT_REF, useExisting: KbqOption
1298
- }], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["mcTitleText"], descendants: true }], exportAs: ["mcOption"], ngImport: i0, template: "<kbq-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</kbq-pseudo-checkbox>\n\n<span #mcTitleText class=\"kbq-option-text\"><ng-content></ng-content></span>\n\n<div class=\"kbq-option-overlay\"></div>\n", styles: [".kbq-option{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, 32px);border:var(--kbq-option-size-border-width, 2px) solid transparent;cursor:pointer;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, 12px);padding-right:var(--kbq-option-size-horizontal-padding, 12px);-webkit-tap-highlight-color:transparent}.kbq-option.kbq-disabled{cursor:default}.kbq-option .kbq-pseudo-checkbox{margin-right:8px}.kbq-option .kbq-option-overlay{position:absolute;top:calc(-1 * var(--kbq-option-size-border-width, 2px));left:calc(-1 * var(--kbq-option-size-border-width, 2px));right:calc(-1 * var(--kbq-option-size-border-width, 2px));bottom:calc(-1 * var(--kbq-option-size-border-width, 2px));pointer-events:none;border-radius:inherit}.kbq-option-text{display:inline-block;flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["color", "big", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1713
+ }], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["kbqTitleText"], descendants: true }], exportAs: ["kbqOption"], usesInheritance: true, ngImport: i0, template: "<kbq-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</kbq-pseudo-checkbox>\n\n<span #kbqTitleText class=\"kbq-option-text\">\n <ng-content></ng-content>\n</span>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.04) 10px,rgba(255,255,255,.04) 10px,rgba(255,255,255,.04) 20px,rgba(0,0,0,.04) 20px,rgba(0,0,0,.04) 30px,rgba(255,255,255,.04) 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.kbq-option{position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-list-size-container-content-gap-horizontal, 8px);border-width:var(--kbq-list-size-container-focus-outline-width, 2px);border-style:solid;border-color:transparent;padding:calc(var(--kbq-list-size-container-padding-vertical, 4px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-right, 12px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-vertical, 4px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-left, 12px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-option .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:var(--kbq-list-size-text-padding-vertical, 4px);padding-bottom:var(--kbq-list-size-text-padding-vertical, 4px)}.kbq-option .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option .kbq-list-text:empty{display:none}.kbq-option .kbq-list-option-caption{padding-top:var(--kbq-list-size-container-content-gap-vertical, 2px)}.kbq-option:not(.kbq-disabled){cursor:pointer}.kbq-option-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:var(--kbq-list-size-text-padding-vertical, 4px);padding-bottom:var(--kbq-list-size-text-padding-vertical, 4px)}.kbq-option-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option-text:empty{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["color", "big", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1299
1714
  }
1300
1715
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOption, decorators: [{
1301
1716
  type: Component,
1302
- args: [{ selector: 'kbq-option', exportAs: 'mcOption', host: {
1717
+ args: [{ selector: 'kbq-option', exportAs: 'kbqOption', host: {
1303
1718
  '[attr.tabindex]': 'getTabIndex()',
1304
1719
  class: 'kbq-option',
1305
1720
  '[class.kbq-selected]': 'selected',
@@ -1311,7 +1726,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
1311
1726
  '(keydown)': 'handleKeydown($event)'
1312
1727
  }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{
1313
1728
  provide: KBQ_TITLE_TEXT_REF, useExisting: KbqOption
1314
- }], template: "<kbq-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</kbq-pseudo-checkbox>\n\n<span #mcTitleText class=\"kbq-option-text\"><ng-content></ng-content></span>\n\n<div class=\"kbq-option-overlay\"></div>\n", styles: [".kbq-option{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, 32px);border:var(--kbq-option-size-border-width, 2px) solid transparent;cursor:pointer;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, 12px);padding-right:var(--kbq-option-size-horizontal-padding, 12px);-webkit-tap-highlight-color:transparent}.kbq-option.kbq-disabled{cursor:default}.kbq-option .kbq-pseudo-checkbox{margin-right:8px}.kbq-option .kbq-option-overlay{position:absolute;top:calc(-1 * var(--kbq-option-size-border-width, 2px));left:calc(-1 * var(--kbq-option-size-border-width, 2px));right:calc(-1 * var(--kbq-option-size-border-width, 2px));bottom:calc(-1 * var(--kbq-option-size-border-width, 2px));pointer-events:none;border-radius:inherit}.kbq-option-text{display:inline-block;flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
1729
+ }], template: "<kbq-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</kbq-pseudo-checkbox>\n\n<span #kbqTitleText class=\"kbq-option-text\">\n <ng-content></ng-content>\n</span>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.04) 10px,rgba(255,255,255,.04) 10px,rgba(255,255,255,.04) 20px,rgba(0,0,0,.04) 20px,rgba(0,0,0,.04) 30px,rgba(255,255,255,.04) 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.kbq-option{position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-list-size-container-content-gap-horizontal, 8px);border-width:var(--kbq-list-size-container-focus-outline-width, 2px);border-style:solid;border-color:transparent;padding:calc(var(--kbq-list-size-container-padding-vertical, 4px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-right, 12px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-vertical, 4px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-list-size-container-padding-left, 12px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-option .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:var(--kbq-list-size-text-padding-vertical, 4px);padding-bottom:var(--kbq-list-size-text-padding-vertical, 4px)}.kbq-option .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option .kbq-list-text:empty{display:none}.kbq-option .kbq-list-option-caption{padding-top:var(--kbq-list-size-container-content-gap-vertical, 2px)}.kbq-option:not(.kbq-disabled){cursor:pointer}.kbq-option-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:var(--kbq-list-size-text-padding-vertical, 4px);padding-bottom:var(--kbq-list-size-text-padding-vertical, 4px)}.kbq-option-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option-text:empty{display:none}\n"] }]
1315
1730
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
1316
1731
  type: Optional
1317
1732
  }, {
@@ -1321,7 +1736,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
1321
1736
  type: Optional
1322
1737
  }] }]; }, propDecorators: { textElement: [{
1323
1738
  type: ViewChild,
1324
- args: ['mcTitleText', { static: false }]
1739
+ args: ['kbqTitleText', { static: false }]
1325
1740
  }], value: [{
1326
1741
  type: Input
1327
1742
  }], showCheckbox: [{
@@ -1452,30 +1867,31 @@ class KbqOptionActionComponent extends KbqOptionActionMixinBase {
1452
1867
  setTimeout(() => this.option.tooltipTrigger.disabled = false);
1453
1868
  }
1454
1869
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOptionActionComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: KBQ_OPTION_ACTION_PARENT }], target: i0.ɵɵFactoryTarget.Component }); }
1455
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOptionActionComponent, selector: "kbq-option-action", inputs: { disabled: "disabled" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur()", "click": "onClick($event)", "keydown": "onKeyDown($event)" }, properties: { "class.kbq-expanded": "false", "attr.disabled": "disabled || null", "attr.tabIndex": "-1" }, classAttribute: "kbq-option-action" }, queries: [{ propertyName: "customIcon", first: true, predicate: ["customIcon"], descendants: true }], exportAs: ["mcOptionAction"], usesInheritance: true, ngImport: i0, template: `
1870
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: KbqOptionActionComponent, selector: "kbq-option-action", inputs: { disabled: "disabled" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur()", "click": "onClick($event)", "keydown": "onKeyDown($event)" }, properties: { "class.kbq-expanded": "false", "class.kbq-disabled": "disabled", "attr.disabled": "disabled || null", "attr.tabIndex": "-1" }, classAttribute: "kbq-option-action" }, queries: [{ propertyName: "customIcon", first: true, predicate: ["customIcon"], descendants: true }], exportAs: ["kbqOptionAction"], usesInheritance: true, ngImport: i0, template: `
1456
1871
  <ng-container [ngSwitch]="!!customIcon">
1457
- <i class="mc kbq-icon kbq-ellipsis_16" *ngSwitchCase="false"></i>
1872
+ <i class="mc kbq-icon mc-ellipsis_16" *ngSwitchCase="false"></i>
1458
1873
  <ng-content select="[kbq-icon]" *ngSwitchCase="true"></ng-content>
1459
1874
  </ng-container>
1460
- `, isInline: true, styles: [".kbq-option-action{box-sizing:unset;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:28px;height:100%;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.kbq-option-action[disabled]{cursor:default}\n"], dependencies: [{ kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1875
+ `, isInline: true, styles: [".kbq-option-action{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:24px;height:24px;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.kbq-option-action.kbq-disabled{cursor:default}\n"], dependencies: [{ kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1461
1876
  }
1462
1877
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: KbqOptionActionComponent, decorators: [{
1463
1878
  type: Component,
1464
- args: [{ selector: 'kbq-option-action', exportAs: 'mcOptionAction', template: `
1879
+ args: [{ selector: 'kbq-option-action', exportAs: 'kbqOptionAction', template: `
1465
1880
  <ng-container [ngSwitch]="!!customIcon">
1466
- <i class="mc kbq-icon kbq-ellipsis_16" *ngSwitchCase="false"></i>
1881
+ <i class="mc kbq-icon mc-ellipsis_16" *ngSwitchCase="false"></i>
1467
1882
  <ng-content select="[kbq-icon]" *ngSwitchCase="true"></ng-content>
1468
1883
  </ng-container>
1469
1884
  `, host: {
1470
1885
  class: 'kbq-option-action',
1471
1886
  '[class.kbq-expanded]': 'false',
1887
+ '[class.kbq-disabled]': 'disabled',
1472
1888
  '[attr.disabled]': 'disabled || null',
1473
1889
  '[attr.tabIndex]': '-1',
1474
1890
  '(focus)': 'onFocus($event)',
1475
1891
  '(blur)': 'onBlur()',
1476
1892
  '(click)': 'onClick($event)',
1477
1893
  '(keydown)': 'onKeyDown($event)'
1478
- }, inputs: ['disabled'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".kbq-option-action{box-sizing:unset;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:28px;height:100%;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.kbq-option-action[disabled]{cursor:default}\n"] }]
1894
+ }, inputs: ['disabled'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".kbq-option-action{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:24px;height:24px;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.kbq-option-action.kbq-disabled{cursor:default}\n"] }]
1479
1895
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: undefined, decorators: [{
1480
1896
  type: Inject,
1481
1897
  args: [KBQ_OPTION_ACTION_PARENT]
@@ -1621,6 +2037,7 @@ const EXTENDED_OVERLAY_POSITIONS = objectValues([
1621
2037
  const TOP_POSITION_PRIORITY = objectValues([
1622
2038
  POSITION_MAP.top,
1623
2039
  POSITION_MAP.bottom,
2040
+ POSITION_MAP.right,
1624
2041
  POSITION_MAP.rightBottom,
1625
2042
  POSITION_MAP.leftBottom,
1626
2043
  POSITION_MAP.bottomLeft,
@@ -1746,6 +2163,11 @@ const POSITION_TO_CSS_MAP = {
1746
2163
  bottomLeft: 'bottom-left',
1747
2164
  bottomRight: 'bottom-right'
1748
2165
  };
2166
+ const KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER = (token, factory) => ({
2167
+ provide: token,
2168
+ deps: [Overlay],
2169
+ useFactory: factory
2170
+ });
1749
2171
  function arrayMap(array, iteratee) {
1750
2172
  let index = -1;
1751
2173
  const length = array === null ? 0 : array.length;
@@ -1788,6 +2210,7 @@ var PopUpTriggers;
1788
2210
  PopUpTriggers["Click"] = "click";
1789
2211
  PopUpTriggers["Focus"] = "focus";
1790
2212
  PopUpTriggers["Hover"] = "hover";
2213
+ PopUpTriggers["Keydown"] = "keydown";
1791
2214
  })(PopUpTriggers || (PopUpTriggers = {}));
1792
2215
  var PopUpSizes;
1793
2216
  (function (PopUpSizes) {
@@ -2066,6 +2489,15 @@ class KbqPopUpTrigger {
2066
2489
  .set('blur', () => this.hide())
2067
2490
  .forEach(this.addEventListener);
2068
2491
  }
2492
+ if (this.trigger.includes(PopUpTriggers.Keydown)) {
2493
+ this.listeners
2494
+ .set('keydown', (event) => {
2495
+ if (event instanceof KeyboardEvent && [ENTER, SPACE].includes(event.keyCode)) {
2496
+ this.show();
2497
+ }
2498
+ })
2499
+ .forEach(this.addEventListener);
2500
+ }
2069
2501
  }
2070
2502
  /** Updates the position of the current popover. */
2071
2503
  updatePosition(reapplyPosition = false) {
@@ -2109,7 +2541,7 @@ class KbqPopUpTrigger {
2109
2541
  .pipe(takeUntil(this.destroyed))
2110
2542
  .pipe(delay(0))
2111
2543
  .subscribe((event) => {
2112
- if (event?.type === 'click' && event.mcPopoverPreventHide) {
2544
+ if (event?.type === 'click' && event.kbqPopoverPreventHide) {
2113
2545
  return;
2114
2546
  }
2115
2547
  this.hide();
@@ -2165,14 +2597,14 @@ const SELECT_PANEL_VIEWPORT_PADDING = 8;
2165
2597
  /** Injection token that determines the scroll handling while a select is open. */
2166
2598
  const KBQ_SELECT_SCROLL_STRATEGY = new InjectionToken('kbq-select-scroll-strategy');
2167
2599
  /** @docs-private */
2168
- function mcSelectScrollStrategyProviderFactory(overlay) {
2600
+ function kbqSelectScrollStrategyProviderFactory(overlay) {
2169
2601
  return () => overlay.scrollStrategies.reposition();
2170
2602
  }
2171
2603
  /** @docs-private */
2172
2604
  const KBQ_SELECT_SCROLL_STRATEGY_PROVIDER = {
2173
2605
  provide: KBQ_SELECT_SCROLL_STRATEGY,
2174
2606
  deps: [Overlay],
2175
- useFactory: mcSelectScrollStrategyProviderFactory
2607
+ useFactory: kbqSelectScrollStrategyProviderFactory
2176
2608
  };
2177
2609
 
2178
2610
  class KbqMeasureScrollbarService {
@@ -2220,6 +2652,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
2220
2652
  args: [DOCUMENT]
2221
2653
  }] }]; } });
2222
2654
 
2655
+ const KbqDefaultThemes = [
2656
+ {
2657
+ name: 'light',
2658
+ className: 'kbq-theme-light',
2659
+ selected: true
2660
+ },
2661
+ {
2662
+ name: 'dark',
2663
+ className: 'kbq-theme-dark',
2664
+ selected: false
2665
+ }
2666
+ ];
2667
+ class ThemeService {
2668
+ constructor(rendererFactory) {
2669
+ this.rendererFactory = rendererFactory;
2670
+ this.current = new BehaviorSubject(null);
2671
+ this.themes = KbqDefaultThemes;
2672
+ this.update = ([prev, current]) => {
2673
+ if (prev) {
2674
+ prev.selected = false;
2675
+ this.renderer.removeClass(document.body, prev.className);
2676
+ }
2677
+ if (current) {
2678
+ this.renderer.addClass(document.body, current.className);
2679
+ current.selected = true;
2680
+ }
2681
+ };
2682
+ this.renderer = this.rendererFactory.createRenderer(null, null);
2683
+ this.subscription = this.current
2684
+ .pipe(pairwise())
2685
+ .subscribe(this.update);
2686
+ }
2687
+ setThemes(items) {
2688
+ this.themes = items;
2689
+ }
2690
+ setTheme(value) {
2691
+ if (typeof value === 'number') {
2692
+ this.current.next(this.themes[value]);
2693
+ }
2694
+ else if (typeof value === 'object' && this.themes.includes(value)) {
2695
+ this.current.next(value);
2696
+ }
2697
+ else {
2698
+ throw Error(`value has unsupported type: ${typeof value}`);
2699
+ }
2700
+ }
2701
+ getTheme() {
2702
+ return this.current.value;
2703
+ }
2704
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: ThemeService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
2705
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
2706
+ }
2707
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: ThemeService, decorators: [{
2708
+ type: Injectable,
2709
+ args: [{ providedIn: 'root' }]
2710
+ }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
2711
+
2223
2712
  function isBoolean(val) { return typeof val === 'boolean'; }
2224
2713
  function toBoolean(value) {
2225
2714
  return value != null && `${value}` !== 'false';
@@ -2328,11 +2817,11 @@ const validationTooltipShowDelay = 10;
2328
2817
  const validationTooltipHideDelay = 3000;
2329
2818
  const KBQ_VALIDATION = new InjectionToken('KbqUseValidation', { factory: () => ({ useValidation: true }) });
2330
2819
 
2331
- const VERSION = new Version('16.0.0-beta.1+sha-9882803');
2820
+ const VERSION = new Version('16.0.0-beta.11+sha-0a44c80');
2332
2821
 
2333
2822
  /**
2334
2823
  * Generated bundle index. Do not edit.
2335
2824
  */
2336
2825
 
2337
- export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_FORM_FIELD_REF, KBQ_LABEL_GLOBAL_OPTIONS, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_SANITY_CHECKS, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_TITLE_TEXT_REF, KBQ_VALIDATION, KbqCommonModule, KbqComponentColors, KbqDataSizeModule, KbqDataSizePipe, KbqDecimalPipe, KbqForm, KbqFormElement, KbqFormattersModule, KbqFormsModule, KbqHighlightModule, KbqHighlightPipe, KbqLine, KbqLineModule, KbqLineSetter, KbqLocaleService, KbqLocaleServiceModule, KbqMeasureScrollbarService, KbqOptgroup, KbqOptgroupBase, KbqOptgroupMixinBase, KbqOption, KbqOptionActionBase, KbqOptionActionComponent, KbqOptionActionMixinBase, KbqOptionModule, KbqOptionSelectionChange, KbqPopUp, KbqPopUpTrigger, KbqPseudoCheckbox, KbqPseudoCheckboxBase, KbqPseudoCheckboxMixinBase, KbqPseudoCheckboxModule, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MeasurementSystem, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, VERSION, countGroupLabelsBeforeOption, escapeRegExp, fadeAnimation, formatDataSize, getHumanizedBytes, getKbqSelectDynamicMultipleError, getKbqSelectNonArrayValueError, getKbqSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, mcSelectAnimations, mcSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, selectEvents, sizeUnitsConfig, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay };
2826
+ export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_FORM_FIELD_REF, KBQ_LABEL_GLOBAL_OPTIONS, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_SANITY_CHECKS, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_TITLE_TEXT_REF, KBQ_VALIDATION, KbqCommonModule, KbqComponentColors, KbqDataSizeModule, KbqDataSizePipe, KbqDecimalPipe, KbqDefaultThemes, KbqForm, KbqFormElement, KbqFormattersModule, KbqFormsModule, KbqHighlightModule, KbqHighlightPipe, KbqLine, KbqLineModule, KbqLineSetter, KbqLocaleService, KbqLocaleServiceModule, KbqMeasureScrollbarService, KbqOptgroup, KbqOptgroupBase, KbqOptgroupMixinBase, KbqOption, KbqOptionActionBase, KbqOptionActionComponent, KbqOptionActionMixinBase, KbqOptionBase, KbqOptionModule, KbqOptionSelectionChange, KbqPopUp, KbqPopUpTrigger, KbqPseudoCheckbox, KbqPseudoCheckboxBase, KbqPseudoCheckboxMixinBase, KbqPseudoCheckboxModule, KbqRoundDecimalPipe, KbqTableNumberPipe, KbqVirtualOption, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MeasurementSystem, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, ThemeService, VERSION, countGroupLabelsBeforeOption, escapeRegExp, fadeAnimation, formatDataSize, getHumanizedBytes, getKbqSelectDynamicMultipleError, getKbqSelectNonArrayValueError, getKbqSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, isWithin, kbqSelectAnimations, kbqSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, selectEvents, sizeUnitsConfig, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay };
2338
2827
  //# sourceMappingURL=koobiq-components-core.mjs.map