@koobiq/components 17.0.0-rc.6 → 17.0.0-rc.8

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 (256) hide show
  1. package/alert/_alert-theme.scss +19 -33
  2. package/alert/alert.component.scss +49 -141
  3. package/autocomplete/_autocomplete-theme.scss +3 -2
  4. package/autocomplete/autocomplete.scss +7 -14
  5. package/badge/_badge-theme.scss +31 -45
  6. package/badge/badge.component.scss +18 -38
  7. package/button/_button-base.scss +7 -13
  8. package/button/_button-theme.scss +29 -85
  9. package/button/button.component.d.ts +3 -2
  10. package/button/button.scss +7 -16
  11. package/button-toggle/_button-toggle-theme.scss +18 -18
  12. package/button-toggle/button-toggle.scss +14 -34
  13. package/card/_card-theme.scss +19 -17
  14. package/card/card.component.scss +2 -4
  15. package/checkbox/_checkbox-theme.scss +44 -43
  16. package/checkbox/checkbox.scss +23 -21
  17. package/code-block/_code-block-theme.scss +27 -26
  18. package/code-block/actionbar.component.scss +7 -18
  19. package/code-block/code-block.scss +21 -66
  20. package/core/form-field/form-field-ref.d.ts +2 -0
  21. package/core/forms/_forms-theme.scss +4 -7
  22. package/core/forms/_forms.scss +13 -42
  23. package/core/locales/locale-service.d.ts +1 -0
  24. package/core/option/_optgroup-theme.scss +4 -5
  25. package/core/option/_option-action-theme.scss +7 -7
  26. package/core/option/_option-theme.scss +16 -20
  27. package/core/select/common.d.ts +35 -0
  28. package/core/select/index.d.ts +1 -0
  29. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -19
  30. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +9 -8
  31. package/core/styles/common/_groups.scss +3 -5
  32. package/core/styles/common/_list.scss +14 -18
  33. package/core/styles/common/_popup.scss +5 -4
  34. package/core/styles/common/_select.scss +11 -16
  35. package/core/styles/common/_tokens.scss +30 -9
  36. package/core/styles/theming/_components-theming.scss +151 -131
  37. package/core/styles/visual/_layout.scss +14 -16
  38. package/datepicker/_datepicker-theme.scss +24 -39
  39. package/datepicker/calendar-body.scss +3 -8
  40. package/datepicker/calendar-header.scss +4 -9
  41. package/datepicker/calendar.scss +5 -16
  42. package/datepicker/datepicker-content.scss +4 -12
  43. package/datepicker/datepicker-input.scss +0 -4
  44. package/datepicker/datepicker-toggle.scss +3 -2
  45. package/divider/_divider-theme.scss +3 -1
  46. package/divider/divider.scss +9 -25
  47. package/dl/_dl-theme.scss +5 -6
  48. package/dl/dl.scss +5 -19
  49. package/dropdown/_dropdown-theme.scss +21 -21
  50. package/dropdown/dropdown-item.scss +5 -11
  51. package/dropdown/dropdown-trigger.directive.d.ts +2 -2
  52. package/dropdown/dropdown.scss +6 -14
  53. package/esm2022/alert/alert.component.mjs +2 -2
  54. package/esm2022/badge/badge.component.mjs +2 -2
  55. package/esm2022/button/button.component.mjs +13 -6
  56. package/esm2022/button-toggle/button-toggle.component.mjs +2 -2
  57. package/esm2022/checkbox/checkbox.mjs +2 -2
  58. package/esm2022/code-block/actionbar.component.mjs +2 -2
  59. package/esm2022/code-block/code-block.component.mjs +2 -2
  60. package/esm2022/core/form-field/form-field-ref.mjs +1 -1
  61. package/esm2022/core/locales/locale-service.mjs +5 -2
  62. package/esm2022/core/option/option.mjs +2 -2
  63. package/esm2022/core/select/common.mjs +120 -0
  64. package/esm2022/core/select/index.mjs +2 -1
  65. package/esm2022/core/version.mjs +2 -2
  66. package/esm2022/datepicker/calendar-header.component.mjs +1 -1
  67. package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
  68. package/esm2022/dropdown/dropdown-trigger.directive.mjs +4 -4
  69. package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
  70. package/esm2022/file-upload/single-file-upload.component.mjs +2 -2
  71. package/esm2022/form-field/form-field.mjs +2 -2
  72. package/esm2022/form-field/hint.mjs +2 -2
  73. package/esm2022/form-field/password-hint.mjs +2 -2
  74. package/esm2022/icon/icon-item.component.mjs +16 -6
  75. package/esm2022/list/list-selection.component.mjs +2 -2
  76. package/esm2022/list/list.component.mjs +2 -2
  77. package/esm2022/markdown/markdown.component.mjs +2 -2
  78. package/esm2022/navbar/navbar-item.component.mjs +2 -2
  79. package/esm2022/navbar/navbar.component.mjs +2 -2
  80. package/esm2022/navbar/vertical-navbar.component.mjs +2 -2
  81. package/esm2022/popover/popover-confirm.component.mjs +3 -3
  82. package/esm2022/popover/popover.component.mjs +3 -3
  83. package/esm2022/radio/radio.component.mjs +2 -2
  84. package/esm2022/scrollbar/scrollbar.component.mjs +2 -2
  85. package/esm2022/select/select.component.mjs +18 -114
  86. package/esm2022/select/select.module.mjs +28 -28
  87. package/esm2022/table/table.component.mjs +2 -2
  88. package/esm2022/tabs/tab-group.component.mjs +54 -12
  89. package/esm2022/tabs/tab-header.component.mjs +2 -2
  90. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
  91. package/esm2022/tags/tag-default-options.mjs +1 -1
  92. package/esm2022/tags/tag-input.mjs +17 -3
  93. package/esm2022/tags/tag-list.component.mjs +2 -2
  94. package/esm2022/tags/tag.component.mjs +2 -2
  95. package/esm2022/timepicker/timepicker.directive.mjs +10 -2
  96. package/esm2022/timezone/timezone-option.component.mjs +2 -2
  97. package/esm2022/timezone/timezone-select.component.mjs +5 -5
  98. package/esm2022/title/title.directive.mjs +2 -2
  99. package/esm2022/toast/toast.component.mjs +3 -3
  100. package/esm2022/toast/toast.service.mjs +17 -12
  101. package/esm2022/tooltip/tooltip.component.mjs +2 -2
  102. package/esm2022/tree/tree-option.component.mjs +2 -2
  103. package/esm2022/tree-select/tree-select.component.mjs +9 -37
  104. package/esm2022/tree-select/tree-select.module.mjs +31 -11
  105. package/fesm2022/koobiq-components-alert.mjs +2 -2
  106. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  107. package/fesm2022/koobiq-components-badge.mjs +2 -2
  108. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  109. package/fesm2022/koobiq-components-button-toggle.mjs +2 -2
  110. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  111. package/fesm2022/koobiq-components-button.mjs +12 -5
  112. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  113. package/fesm2022/koobiq-components-checkbox.mjs +2 -2
  114. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  115. package/fesm2022/koobiq-components-code-block.mjs +4 -4
  116. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  117. package/fesm2022/koobiq-components-core.mjs +124 -7
  118. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  119. package/fesm2022/koobiq-components-datepicker.mjs +1 -1
  120. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  121. package/fesm2022/koobiq-components-dropdown.mjs +5 -5
  122. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  123. package/fesm2022/koobiq-components-file-upload.mjs +4 -4
  124. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  125. package/fesm2022/koobiq-components-form-field.mjs +6 -6
  126. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  127. package/fesm2022/koobiq-components-icon.mjs +14 -4
  128. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  129. package/fesm2022/koobiq-components-list.mjs +4 -4
  130. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  131. package/fesm2022/koobiq-components-markdown.mjs +2 -2
  132. package/fesm2022/koobiq-components-navbar.mjs +6 -6
  133. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  134. package/fesm2022/koobiq-components-popover.mjs +4 -4
  135. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  136. package/fesm2022/koobiq-components-radio.mjs +2 -2
  137. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  138. package/fesm2022/koobiq-components-scrollbar.mjs +2 -2
  139. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  140. package/fesm2022/koobiq-components-select.mjs +46 -142
  141. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  142. package/fesm2022/koobiq-components-table.mjs +2 -2
  143. package/fesm2022/koobiq-components-tabs.mjs +56 -14
  144. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  145. package/fesm2022/koobiq-components-tags.mjs +20 -7
  146. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  147. package/fesm2022/koobiq-components-timepicker.mjs +9 -1
  148. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  149. package/fesm2022/koobiq-components-timezone.mjs +6 -6
  150. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  151. package/fesm2022/koobiq-components-title.mjs +1 -1
  152. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  153. package/fesm2022/koobiq-components-toast.mjs +19 -13
  154. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  155. package/fesm2022/koobiq-components-tooltip.mjs +2 -2
  156. package/fesm2022/koobiq-components-tree-select.mjs +37 -44
  157. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  158. package/fesm2022/koobiq-components-tree.mjs +2 -2
  159. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  160. package/file-upload/_file-upload-theme.scss +109 -68
  161. package/file-upload/file-upload.scss +0 -5
  162. package/file-upload/multiple-file-upload.component.scss +35 -99
  163. package/file-upload/single-file-upload.component.scss +12 -31
  164. package/form-field/_form-field-theme.scss +32 -34
  165. package/form-field/_hint-theme.scss +16 -19
  166. package/form-field/cleaner.scss +3 -8
  167. package/form-field/form-field.scss +11 -12
  168. package/form-field/hint.scss +5 -7
  169. package/form-field/password-toggle.scss +3 -9
  170. package/form-field/stepper.scss +4 -10
  171. package/icon/_icon-button-theme.scss +35 -35
  172. package/icon/_icon-item-theme.scss +46 -31
  173. package/icon/_icon-theme.scss +9 -15
  174. package/icon/icon-button.scss +5 -17
  175. package/icon/icon-item.component.d.ts +3 -1
  176. package/icon/icon-item.scss +12 -7
  177. package/icon/icon.scss +0 -5
  178. package/input/_input-theme.scss +2 -3
  179. package/input/input.scss +2 -1
  180. package/link/_link-theme.scss +25 -42
  181. package/list/_list-theme.scss +18 -17
  182. package/list/list.scss +3 -5
  183. package/loader-overlay/_loader-overlay-theme.scss +13 -16
  184. package/loader-overlay/loader-overlay.scss +9 -32
  185. package/markdown/_markdown-theme.scss +41 -44
  186. package/markdown/markdown.scss +38 -88
  187. package/modal/_modal-confirm.scss +2 -6
  188. package/modal/_modal-theme.scss +11 -12
  189. package/modal/modal.scss +18 -24
  190. package/navbar/_navbar-item_horizontal.scss +28 -28
  191. package/navbar/_navbar-item_vertical.scss +31 -30
  192. package/navbar/_navbar-theme.scss +21 -22
  193. package/navbar/navbar-brand.scss +24 -26
  194. package/navbar/navbar-divider.scss +4 -7
  195. package/navbar/navbar-item.scss +11 -13
  196. package/navbar/navbar.scss +2 -5
  197. package/navbar/vertical-navbar.scss +3 -5
  198. package/package.json +9 -9
  199. package/popover/_popover-theme.scss +9 -16
  200. package/popover/popover.scss +18 -24
  201. package/prebuilt-themes/dark-theme.css +1 -1
  202. package/prebuilt-themes/light-theme.css +1 -1
  203. package/progress-bar/_progress-bar-theme.scss +7 -10
  204. package/progress-bar/progress-bar.scss +6 -18
  205. package/progress-spinner/_progress-spinner-theme.scss +6 -7
  206. package/progress-spinner/progress-spinner.scss +8 -17
  207. package/radio/_radio-theme.scss +29 -37
  208. package/radio/radio.scss +20 -39
  209. package/risk-level/_risk-level-theme.scss +25 -30
  210. package/risk-level/risk-level.component.scss +5 -8
  211. package/schematics/ng-add/index.js +6 -6
  212. package/scrollbar/_scrollbar-component-theme.scss +14 -17
  213. package/scrollbar/scrollbar.component.scss +13 -20
  214. package/select/_select-theme.scss +14 -15
  215. package/select/select.component.d.ts +2 -32
  216. package/select/select.module.d.ts +1 -1
  217. package/select/select.scss +3 -10
  218. package/sidepanel/_sidepanel-theme.scss +8 -9
  219. package/sidepanel/sidepanel.scss +19 -30
  220. package/splitter/_splitter-theme.scss +3 -3
  221. package/table/_table-theme.scss +9 -8
  222. package/table/table.scss +12 -12
  223. package/tabs/_tabs-common.scss +4 -7
  224. package/tabs/_tabs-theme.scss +77 -44
  225. package/tabs/tab-group.component.d.ts +9 -3
  226. package/tabs/tab-group.scss +2 -7
  227. package/tabs/tab-header.scss +0 -4
  228. package/tabs/tab-nav-bar/tab-nav-bar.scss +2 -7
  229. package/tags/_tag-theme.scss +23 -26
  230. package/tags/tag-default-options.d.ts +1 -0
  231. package/tags/tag-input.d.ts +7 -1
  232. package/tags/tag-list.scss +6 -5
  233. package/tags/tag.scss +6 -9
  234. package/textarea/_textarea-theme.scss +2 -4
  235. package/textarea/textarea.scss +4 -6
  236. package/timepicker/timepicker.scss +2 -7
  237. package/timezone/_timezone-option-theme.scss +8 -9
  238. package/timezone/timezone-option.component.scss +5 -7
  239. package/timezone/timezone-select.component.d.ts +2 -1
  240. package/timezone/timezone-select.component.scss +2 -3
  241. package/toast/_toast-theme.scss +15 -14
  242. package/toast/toast-container.component.scss +4 -7
  243. package/toast/toast.component.scss +20 -25
  244. package/toast/toast.service.d.ts +8 -4
  245. package/toggle/_toggle-theme.scss +48 -42
  246. package/toggle/toggle.scss +9 -21
  247. package/tooltip/_tooltip-theme.scss +13 -16
  248. package/tooltip/tooltip.scss +8 -10
  249. package/tree/_tree-theme.scss +20 -22
  250. package/tree/toggle.scss +3 -5
  251. package/tree/tree-option.scss +5 -6
  252. package/tree-select/_tree-select-theme.scss +12 -14
  253. package/tree-select/tree-select.component.d.ts +4 -17
  254. package/tree-select/tree-select.module.d.ts +1 -2
  255. package/tree-select/tree-select.scss +1 -5
  256. package/core/styles/_variables.scss +0 -1
@@ -1,15 +1,13 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
  @use '../core/styles/tokens';
4
+ @use '../core/styles/common/tokens' as *;
5
+
4
6
 
5
7
  $tokens: meta.module-variables(tokens) !default;
6
8
 
7
- $border-radius: var(
8
- --kbq-code-block-size-container-border-radius, map.get($tokens, code-block-size-container-border-radius)
9
- );
10
- $border-width: var(
11
- --kbq-code-block-size-container-border-width, map.get($tokens, code-block-size-container-border-width)
12
- );
9
+ $border-radius: kbq-css-variable(code-block-size-container-border-radius);
10
+ $border-width: kbq-css-variable(code-block-size-container-border-width);
13
11
 
14
12
  /* stylelint-disable no-descending-specificity */
15
13
  .kbq-code-block {
@@ -32,21 +30,13 @@ $border-width: var(
32
30
  $buttons-margin: calc(32 * 4) + 24px;
33
31
 
34
32
  padding:
35
- var(
36
- --kbq-code-block-size-header-padding-vertical,
37
- map.get($tokens, code-block-size-header-padding-vertical)
38
- )
33
+ kbq-css-variable(code-block-size-header-padding-vertical)
39
34
  calc(var(
40
35
  --kbq-code-block-size-header-padding-right,
41
36
  map.get($tokens, code-block-size-header-padding-right)
42
37
  ) + $buttons-margin)
43
- var(
44
- --kbq-code-block-size-header-padding-vertical,
45
- map.get($tokens, code-block-size-header-padding-vertical)
46
- ) var(
47
- --kbq-code-block-size-header-padding-left,
48
- map.get($tokens, code-block-size-header-padding-left)
49
- );
38
+ kbq-css-variable(code-block-size-header-padding-vertical)
39
+ kbq-css-variable(code-block-size-header-padding-left);
50
40
 
51
41
  border-width: $border-width $border-width 0 $border-width;
52
42
  border-style: solid;
@@ -56,7 +46,7 @@ $border-width: var(
56
46
  &:has(.kbq-code-block__show-more) {
57
47
  .kbq-code-block__code {
58
48
  & > code {
59
- padding-bottom: map.get($tokens, size-3xl) !important;
49
+ padding-bottom: kbq-css-variable(size-3xl) !important;
60
50
  overflow-x: scroll;
61
51
  }
62
52
  }
@@ -65,21 +55,10 @@ $border-width: var(
65
55
  .kbq-code-block__code {
66
56
  > code {
67
57
  padding:
68
- var(
69
- --kbq-code-block-size-with-header-content-padding-top,
70
- map.get($tokens, code-block-size-with-header-content-padding-top)
71
- )
72
- var(
73
- --kbq-code-block-size-with-header-content-padding-horizontal,
74
- map.get($tokens, code-block-size-with-header-content-padding-horizontal)
75
- )
76
- var(
77
- --kbq-code-block-size-with-header-content-padding-bottom,
78
- map.get($tokens, code-block-size-with-header-content-padding-bottom)
79
- ) var(
80
- --kbq-code-block-size-with-header-content-padding-horizontal,
81
- map.get($tokens, code-block-size-with-header-content-padding-horizontal)
82
- );
58
+ kbq-css-variable(code-block-size-with-header-content-padding-top)
59
+ kbq-css-variable(code-block-size-with-header-content-padding-horizontal)
60
+ kbq-css-variable(code-block-size-with-header-content-padding-bottom)
61
+ kbq-css-variable(code-block-size-with-header-content-padding-horizontal);
83
62
 
84
63
  border-radius: $border-radius;
85
64
 
@@ -89,10 +68,7 @@ $border-width: var(
89
68
  }
90
69
 
91
70
  .hljs-ln-numbers {
92
- padding-right: var(
93
- --kbq-code-block-size-with-header-content-content-gap-horizontal,
94
- map.get($tokens, code-block-size-with-header-content-content-gap-horizontal)
95
- );
71
+ padding-right: kbq-css-variable(code-block-size-with-header-content-content-gap-horizontal);
96
72
  }
97
73
  }
98
74
 
@@ -133,21 +109,12 @@ $border-width: var(
133
109
 
134
110
  & > code {
135
111
  padding:
136
- var(
137
- --kbq-code-block-size-no-header-content-padding-vertical,
138
- map.get($tokens, code-block-size-no-header-content-padding-vertical)
139
- )
140
- var(
141
- --kbq-code-block-size-no-header-content-padding-horizontal,
142
- map.get($tokens, code-block-size-no-header-content-padding-horizontal)
143
- );
112
+ kbq-css-variable(code-block-size-no-header-content-padding-vertical)
113
+ kbq-css-variable(code-block-size-no-header-content-padding-horizontal);
144
114
  }
145
115
 
146
116
  .hljs-ln-numbers {
147
- padding-right: var(
148
- --kbq-code-block-size-no-header-content-content-gap-horizontal,
149
- map.get($tokens, code-block-size-no-header-content-content-gap-horizontal)
150
- );
117
+ padding-right: kbq-css-variable(code-block-size-no-header-content-content-gap-horizontal);
151
118
  }
152
119
  }
153
120
  }
@@ -218,31 +185,19 @@ $border-width: var(
218
185
  border-radius: $border-radius;
219
186
 
220
187
  &.kbq-code-block__show-more_collapsed {
221
- padding-top: var(
222
- --kbq-code-block-size-collapse-collapsed-padding-top,
223
- map.get($tokens, code-block-size-collapse-collapsed-padding-top)
224
- );
188
+ padding-top: kbq-css-variable(code-block-size-collapse-collapsed-padding-top);
225
189
 
226
- padding-bottom: var(
227
- --kbq-code-block-size-collapse-collapsed-padding-bottom,
228
- map.get($tokens, code-block-size-collapse-collapsed-padding-bottom)
229
- );
190
+ padding-bottom: kbq-css-variable(code-block-size-collapse-collapsed-padding-bottom);
230
191
  }
231
192
 
232
193
  &.kbq-code-block__show-more_expanded {
233
- padding-top: var(
234
- --kbq-code-block-size-collapse-expanded-padding-top,
235
- map.get($tokens, code-block-size-collapse-expanded-padding-top)
236
- );
194
+ padding-top: kbq-css-variable(code-block-size-collapse-expanded-padding-top);
237
195
 
238
- margin-bottom: var(
239
- --kbq-code-block-size-collapse-expanded-padding-bottom,
240
- map.get($tokens, code-block-size-collapse-expanded-padding-bottom)
241
- );
196
+ margin-bottom: kbq-css-variable(code-block-size-collapse-expanded-padding-bottom);
242
197
  }
243
198
 
244
199
  .bg-wrapper {
245
- border-radius: var(--kbq-button-size-border-radius, map.get($tokens, button-size-border-radius));
200
+ border-radius: kbq-css-variable(button-size-border-radius);
246
201
  }
247
202
  }
248
203
  /* stylelint-enable no-descending-specificity */
@@ -1,7 +1,9 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  export interface KbqFormFieldRef {
3
3
  control: any;
4
+ canCleanerClearByEsc: boolean;
4
5
  shouldForward(str: string): boolean;
6
+ focusViaKeyboard(): void;
5
7
  }
6
8
  /**
7
9
  * Injection token that can be used to inject an instances of `KbqFormField`. It serves
@@ -3,29 +3,26 @@
3
3
 
4
4
  @use '../styles/typography/typography-utils' as *;
5
5
  @use './forms' as *;
6
+ @use '../styles/common/tokens' as *;
6
7
 
7
8
 
8
9
  @mixin kbq-forms-theme($theme) {
9
10
  @include kbq-form-geometry(map.get($theme, tokens));
10
11
 
11
- $foreground: map.get($theme, foreground);
12
-
13
12
  $forms: map.get(map.get($theme, components), forms);
14
13
 
15
14
  .kbq-form__label {
16
- color: map.get($forms, label);
15
+ color: kbq-css-variable(forms-label, map.get($forms, label));
17
16
  }
18
17
 
19
18
  .kbq-form__legend {
20
- color: map.get($forms, legend);
19
+ color: kbq-css-variable(forms-legend, map.get($forms, legend));
21
20
  }
22
21
  }
23
22
 
24
23
  @mixin kbq-forms-typography($config) {
25
- $tokens: map.get($config, tokens);
26
-
27
24
  .kbq-form__label {
28
- @include kbq-typography-level-to-styles($config, map.get($tokens, forms-font-label));
25
+ @include kbq-typography-css-variables(forms, label);
29
26
  }
30
27
 
31
28
  //.kbq-form__legend {
@@ -4,6 +4,7 @@
4
4
  @use '../styles/common/vendor-prefixes';
5
5
  @use '../styles/typography/typography' as *;
6
6
  @use '../styles/typography/typography-utils' as *;
7
+ @use '../styles/common/tokens' as *;
7
8
 
8
9
 
9
10
  @mixin kbq-form-geometry($tokens) {
@@ -18,41 +19,26 @@
18
19
  }
19
20
 
20
21
  .kbq-form-horizontal {
21
- $config: kbq-typography-config($tokens);
22
-
23
- $line-height: kbq-line-height($config, map.get($tokens, forms-font-label));
22
+ $line-height: map.get($tokens, forms-font-label-line-height);
24
23
  $form-field-size-height: map.get($tokens, form-field-size-height);
25
- $label-padding-top: calc(($form-field-size-height - $line-height) / 2);
26
24
 
27
25
  & .kbq-form-row_margin {
28
- margin-bottom: var(
29
- --kbq-forms-size-horizontal-row-margin-bottom,
30
- #{map.get($tokens, forms-size-horizontal-row-margin-bottom)}
31
- );
26
+ margin-bottom: kbq-css-variable(forms-size-horizontal-row-margin-bottom);
32
27
  }
33
28
 
34
29
  & .kbq-form__label {
35
- padding-top: var(--kbq-forms-size-horizontal-label-padding-top, #{$label-padding-top});
30
+ padding-top: calc(($form-field-size-height - $line-height) / 2);
36
31
 
37
32
  text-align: start;
38
33
  }
39
34
 
40
35
  & .kbq-form__control {
41
- padding-left: var(
42
- --kbq-forms-size-horizontal-control-padding-left,
43
- #{map.get($tokens, forms-size-horizontal-control-padding-left)}
44
- );
36
+ padding-left: kbq-css-variable(forms-size-horizontal-control-padding-left);
45
37
  }
46
38
 
47
39
  & .kbq-form__legend {
48
- margin-top: var(
49
- --kbq-forms-size-horizontal-legend-margin-top,
50
- #{map.get($tokens, forms-size-horizontal-legend-margin-top)}
51
- );
52
- margin-bottom: var(
53
- --kbq-forms-size-horizontal-legend-margin-bottom,
54
- #{map.get($tokens, forms-size-horizontal-legend-margin-bottom)}
55
- );
40
+ margin-top: kbq-css-variable(forms-size-horizontal-legend-margin-top);
41
+ margin-bottom: kbq-css-variable(forms-size-horizontal-legend-margin-bottom);
56
42
  }
57
43
  }
58
44
 
@@ -62,19 +48,12 @@
62
48
  }
63
49
 
64
50
  & .kbq-form-row_margin {
65
- margin-bottom: var(
66
- --kbq-forms-size-vertical-row-margin-bottom, #{map.get($tokens, forms-size-vertical-row-margin-bottom)}
67
- );
51
+ margin-bottom: kbq-css-variable(forms-size-vertical-row-margin-bottom);
68
52
  }
69
53
 
70
54
  & .kbq-form__label {
71
- padding-top: var(
72
- --kbq-forms-size-vertical-label-padding-top, #{map.get($tokens, forms-size-vertical-label-padding-top)}
73
- );
74
- padding-bottom: var(
75
- --kbq-forms-size-vertical-label-padding-bottom,
76
- #{map.get($tokens, forms-size-vertical-label-padding-bottom)}
77
- );
55
+ padding-top: kbq-css-variable(forms-size-vertical-label-padding-top);
56
+ padding-bottom: kbq-css-variable(forms-size-vertical-label-padding-bottom);
78
57
 
79
58
  text-align: start;
80
59
  }
@@ -84,13 +63,8 @@
84
63
  }
85
64
 
86
65
  & .kbq-form__legend {
87
- margin-top: var(
88
- --kbq-forms-size-vertical-legend-margin-top, #{map.get($tokens, forms-size-vertical-legend-margin-top)}
89
- );
90
- margin-bottom: var(
91
- --kbq-forms-size-vertical-legend-margin-bottom,
92
- #{map.get($tokens, forms-size-vertical-legend-margin-bottom)}
93
- );
66
+ margin-top: kbq-css-variable(forms-size-vertical-legend-margin-top);
67
+ margin-bottom: kbq-css-variable(forms-size-vertical-legend-margin-bottom);
94
68
  }
95
69
  }
96
70
 
@@ -103,10 +77,7 @@
103
77
  flex-direction: row;
104
78
 
105
79
  & .kbq-form__row:not(:first-child) {
106
- padding-left: var(
107
- --kbq-forms-size-vertical-control-padding-left,
108
- #{map.get($tokens, forms-size-vertical-control-padding-left)}
109
- );
80
+ padding-left: kbq-css-variable(forms-size-vertical-control-padding-left);
110
81
  }
111
82
  }
112
83
  }
@@ -407,6 +407,7 @@ export declare const KBQ_LOCALE_SERVICE: InjectionToken<KbqLocaleService>;
407
407
  export declare class KbqLocaleService {
408
408
  readonly changes: BehaviorSubject<string>;
409
409
  readonly locales: any;
410
+ private readonly document;
410
411
  id: string;
411
412
  current: any;
412
413
  constructor(id: string, localeData: any);
@@ -2,24 +2,23 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../styles/typography/typography-utils' as *;
5
+ @use '../styles/common/tokens' as *;
5
6
 
6
7
 
7
8
  @mixin kbq-optgroup-theme($theme) {
8
9
  $foreground: map.get($theme, foreground);
9
10
 
10
11
  .kbq-optgroup-label {
11
- color: map.get($foreground, contrast);
12
+ color: kbq-css-variable(foreground-contrast, map.get($foreground, contrast));
12
13
  }
13
14
 
14
15
  .kbq-disabled .kbq-optgroup-label {
15
- color: map.get($foreground, text-disabled);
16
+ color: kbq-css-variable(foreground-text-disabled, map.get($foreground, text-disabled));
16
17
  }
17
18
  }
18
19
 
19
20
  @mixin kbq-optgroup-typography($config) {
20
- $tokens: map.get($config, tokens);
21
-
22
21
  .kbq-optgroup-label {
23
- @include kbq-typography-level-to-styles($config, map.get($tokens, optgroup-font-default));
22
+ @include kbq-typography-css-variables(optgroup, default);
24
23
  }
25
24
  }
@@ -2,38 +2,38 @@
2
2
 
3
3
  @use '../styles/theming/theming' as *;
4
4
  @use '../styles/typography/typography-utils' as *;
5
+ @use '../styles/common/tokens' as *;
5
6
 
6
7
 
7
8
  @mixin kbq-option-action-theme($theme) {
8
- $foreground: map.get($theme, foreground);
9
9
  $background: map.get($theme, background);
10
10
 
11
11
  $states: map.get($theme, states);
12
12
 
13
13
  .kbq-option-action {
14
14
  &.cdk-keyboard-focused {
15
- border-color: map.get(map.get($theme, states), focused-color);
15
+ border-color: kbq-css-variable(states-focused-color, map.get($theme, states, focused-color));
16
16
  }
17
17
 
18
18
  &:active,
19
19
  &.kbq-pressed {
20
20
  & .kbq-icon {
21
- color: map.get(map.get($states, icon), contrast-fade);
21
+ color: kbq-css-variable(states-icon-contrast-fade, map.get($states, icon, contrast-fade));
22
22
  }
23
23
 
24
- background-color: map.get($background, transparent);
24
+ background-color: kbq-css-variable(background-transparent, map.get($background, transparent));
25
25
  }
26
26
 
27
27
  &:hover .kbq-icon {
28
- color: map.get(map.get($states, icon), contrast-fade-hover);
28
+ color: kbq-css-variable(states-icon-contrast-fade-hover, map.get($states, icon, contrast-fade-hover));
29
29
  }
30
30
 
31
31
  &.kbq-disabled {
32
32
  & .kbq-icon {
33
- color: map.get(map.get($states, icon), disabled);
33
+ color: kbq-css-variable(states-icon-disabled, map.get($states, icon, disabled));
34
34
  }
35
35
 
36
- background-color: map.get($background, transparent);
36
+ background-color: kbq-css-variable(background-transparent, map.get($background, transparent));
37
37
  }
38
38
  }
39
39
  }
@@ -2,26 +2,24 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../styles/typography/typography-utils' as *;
5
+ @use '../styles/common/tokens' as *;
5
6
 
6
7
 
7
- @mixin kbq-option($state) {
8
- background: map.get($state, container-background);
8
+ @mixin kbq-option($component, $style-name) {
9
+ $state: map.get($component, $style-name);
10
+
11
+ background: kbq-css-variable(list-#{$style-name}-container-background, map.get($state, container-background));
9
12
 
10
13
  .kbq-option-text {
11
- color: map.get($state, text);
14
+ color: kbq-css-variable(list-#{$style-name}-text, map.get($state, text));
12
15
  }
13
16
 
14
- // todo выглядит как баг
15
- //.kbq-icon {
16
- // color: map.get($state, icon);
17
- //}
18
-
19
17
  .kbq-option-action .kbq-icon {
20
- color: map.get($state, icon-button);
18
+ color: kbq-css-variable(list-#{$style-name}-icon-button, map.get($state, icon-button));
21
19
  }
22
20
 
23
21
  .kbq-option-caption {
24
- color: map.get($state, caption);
22
+ color: kbq-css-variable(list-#{$style-name}-caption, map.get($state, caption));
25
23
  }
26
24
  }
27
25
 
@@ -29,39 +27,37 @@
29
27
  $list-item: map.get(map.get($theme, components), list-item);
30
28
 
31
29
  .kbq-option {
32
- @include kbq-option(map.get($list-item, default));
30
+ @include kbq-option($list-item, default);
33
31
 
34
32
  &:hover:not(.kbq-disabled) {
35
- @include kbq-option(map.get($list-item, hover));
33
+ @include kbq-option($list-item, states-hover);
36
34
  }
37
35
 
38
36
  &.kbq-focused,
39
37
  &.kbq-active {
40
- border-color: map.get(map.get($list-item, focused), focus-outline);
38
+ border-color: map.get($list-item, states-focused, focus-outline);
41
39
  }
42
40
 
43
41
  &.kbq-selected {
44
- @include kbq-option(map.get($list-item, selected));
42
+ @include kbq-option($list-item, states-selected);
45
43
 
46
44
  &:hover:not(.kbq-disabled) {
47
- @include kbq-option(map.get($list-item, selected-hover));
45
+ @include kbq-option($list-item, states-selected-hover);
48
46
  }
49
47
  }
50
48
 
51
49
  &.kbq-disabled {
52
- @include kbq-option(map.get($list-item, disabled));
50
+ @include kbq-option($list-item, states-disabled);
53
51
  }
54
52
  }
55
53
  }
56
54
 
57
55
  @mixin kbq-option-typography($config) {
58
- $tokens: map.get($config, tokens);
59
-
60
56
  .kbq-option {
61
- @include kbq-typography-level-to-styles($config, map.get($tokens, list-font-text));
57
+ @include kbq-typography-css-variables(list, text);
62
58
  }
63
59
 
64
60
  .kbq-list-option-caption {
65
- @include kbq-typography-level-to-styles($config, map.get($tokens, list-font-caption));
61
+ @include kbq-typography-css-variables(list, caption);
66
62
  }
67
63
  }
@@ -0,0 +1,35 @@
1
+ import { AfterContentInit, OnDestroy } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import { KbqFormFieldRef } from '../form-field';
4
+ import * as i0 from "@angular/core";
5
+ export declare class KbqSelectTrigger {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectTrigger, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqSelectTrigger, "kbq-select-trigger, [kbq-select-trigger]", never, {}, {}, never, never, true, never>;
8
+ }
9
+ export declare class KbqSelectMatcher {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectMatcher, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqSelectMatcher, "kbq-select-matcher, [kbq-select-matcher]", never, {}, {}, never, never, true, never>;
12
+ }
13
+ export declare class KbqSelectFooter {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectFooter, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqSelectFooter, "kbq-select-footer, [kbq-select-footer]", never, {}, {}, never, never, true, never>;
16
+ }
17
+ export declare class KbqSelectSearch implements AfterContentInit, OnDestroy {
18
+ protected formField: KbqFormFieldRef;
19
+ searchChangesSubscription: Subscription;
20
+ isSearchChanged: boolean;
21
+ get ngControl(): any;
22
+ constructor(formField: KbqFormFieldRef);
23
+ focus(): void;
24
+ reset(): void;
25
+ value(): any;
26
+ ngAfterContentInit(): void;
27
+ ngOnDestroy(): void;
28
+ handleKeydown(event: KeyboardEvent): void;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectSearch, [{ optional: true; }]>;
30
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqSelectSearch, "[kbqSelectSearch]", ["kbqSelectSearch"], {}, {}, never, never, true, never>;
31
+ }
32
+ export declare class KbqSelectSearchEmptyResult {
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectSearchEmptyResult, never>;
34
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KbqSelectSearchEmptyResult, "[kbq-select-search-empty-result]", ["kbqSelectSearchEmptyResult"], {}, {}, never, never, true, never>;
35
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './events';
2
2
  export * from './errors';
3
3
  export * from './constants';
4
+ export * from './common';
@@ -1,48 +1,45 @@
1
1
  @use 'sass:map';
2
2
 
3
3
 
4
- @mixin kbq-pseudo-checkbox-color($checkbox) {
5
- $default: map.get($checkbox, default);
4
+ @use '../../styles/common/tokens' as *;
6
5
 
7
- border-color: map.get($default, border);
6
+
7
+ @mixin kbq-pseudo-checkbox-color($component, $style-name) {
8
+ $style: map.get($component, $style-name);
9
+ $base: checkbox-#{$style-name};
10
+
11
+ border-color: kbq-css-variable(#{$base}-default-border, map.get($style, default, border));
8
12
 
9
13
  & .kbq-checkbox-checkmark,
10
14
  & .kbq-checkbox-mixedmark {
11
- color: map.get($default, color);
15
+ color: kbq-css-variable(#{$base}-default-color, map.get($style, default, color));
12
16
  }
13
17
 
14
18
  &.kbq-checked,
15
19
  &.kbq-indeterminate {
16
- $checked: map.get($checkbox, checked);
17
-
18
- border-color: map.get($checked, border);
19
- background: map.get($checked, background);
20
+ border-color: kbq-css-variable(#{$base}-checked-border, map.get($style, checked, border));
21
+ background: kbq-css-variable(#{$base}-checked-background, map.get($style, checked, background));
20
22
  }
21
23
 
22
24
  &.kbq-disabled {
23
- $disabled: map.get($checkbox, disabled);
24
-
25
25
  & .kbq-checkbox-checkmark,
26
26
  & .kbq-checkbox-mixedmark {
27
- color: map.get($disabled, color);
27
+ color: kbq-css-variable(#{$base}-disabled-color, map.get($style, disabled, color));
28
28
  }
29
29
 
30
- border-color: map.get($disabled, border);
31
- background: map.get($disabled, background);
30
+ border-color: kbq-css-variable(#{$base}-disabled-border, map.get($style, disabled, border));
31
+ background: kbq-css-variable(#{$base}-disabled-background, map.get($style, disabled, background));
32
32
  }
33
33
  }
34
34
 
35
35
  @mixin kbq-pseudo-checkbox-theme($theme) {
36
- $foreground: map.get($theme, foreground);
37
- $background: map.get($theme, background);
38
-
39
- $checkbox: map.get(map.get($theme, components), checkbox);
36
+ $checkbox: map.get($theme, components, checkbox);
40
37
 
41
38
  .kbq-pseudo-checkbox {
42
- @include kbq-pseudo-checkbox-color(map.get($checkbox, theme));
39
+ @include kbq-pseudo-checkbox-color($checkbox, theme);
43
40
 
44
41
  &.kbq-error {
45
- @include kbq-pseudo-checkbox-color(map.get($checkbox, error));
42
+ @include kbq-pseudo-checkbox-color($checkbox, error);
46
43
  }
47
44
  }
48
45
  }
@@ -2,6 +2,7 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../../styles/tokens';
5
+ @use '../../styles/common/tokens' as *;
5
6
 
6
7
 
7
8
  $tokens: meta.module-variables(tokens) !default;
@@ -14,12 +15,12 @@ $tokens: meta.module-variables(tokens) !default;
14
15
  align-items: center;
15
16
  justify-content: center;
16
17
 
17
- width: var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width));
18
- height: var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width));
18
+ width: kbq-css-variable(checkbox-size-normal-width);
19
+ height: kbq-css-variable(checkbox-size-normal-width);
19
20
 
20
21
  border: {
21
- radius: var(--kbq-checkbox-size-normal-border-radius, map.get($tokens, checkbox-size-normal-border-radius));
22
- width: var(--kbq-checkbox-size-normal-border-width, map.get($tokens, checkbox-size-normal-border-width));
22
+ radius: kbq-css-variable(checkbox-size-normal-border-radius);
23
+ width: kbq-css-variable(checkbox-size-normal-border-width);
23
24
  style: solid;
24
25
  }
25
26
 
@@ -56,11 +57,11 @@ $tokens: meta.module-variables(tokens) !default;
56
57
  }
57
58
 
58
59
  .kbq-pseudo-checkbox.kbq-pseudo-checkbox_big {
59
- width: var(--kbq-checkbox-size-big-width, map.get($tokens, checkbox-size-big-width));
60
- height: var(--kbq-checkbox-size-big-width, map.get($tokens, checkbox-size-big-width));
60
+ width: kbq-css-variable(checkbox-size-big-width);
61
+ height: kbq-css-variable(checkbox-size-big-width);
61
62
 
62
63
  border: {
63
- radius: var(--kbq-checkbox-size-big-border-radius, map.get($tokens, checkbox-size-big-border-radius));
64
- width: var(--kbq-checkbox-size-big-border-width, map.get($tokens, checkbox-size-big-border-width));
64
+ radius: kbq-css-variable(checkbox-size-big-border-radius);
65
+ width: kbq-css-variable(checkbox-size-big-border-width);
65
66
  }
66
67
  }
@@ -2,6 +2,7 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../tokens';
5
+ @use '../common/tokens' as *;
5
6
 
6
7
 
7
8
  $tokens: meta.module-variables(tokens) !default;
@@ -82,7 +83,7 @@ $tokens: meta.module-variables(tokens) !default;
82
83
  &:first-child:not(:last-child) {
83
84
  @include border-bottom-radius(0);
84
85
 
85
- border-top-right-radius: var(--kbq-button-size-border-radius, map.get($tokens, button-size-border-radius));
86
+ border-top-right-radius: kbq-css-variable(button-size-border-radius);
86
87
 
87
88
  > .kbq-form-field__container {
88
89
  @include border-bottom-radius(0);
@@ -92,10 +93,7 @@ $tokens: meta.module-variables(tokens) !default;
92
93
  &:last-child:not(:first-child) {
93
94
  @include border-top-radius(0);
94
95
 
95
- border-bottom-left-radius: var(
96
- --kbq-button-size-border-radius,
97
- map.get($tokens, button-size-border-radius)
98
- );
96
+ border-bottom-left-radius: kbq-css-variable(button-size-border-radius);
99
97
 
100
98
  > .kbq-form-field__container {
101
99
  @include border-top-radius(0);