@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,19 @@
1
1
  @use 'sass:map';
2
2
 
3
+ @use '../core/styles/common/tokens' as *;
4
+
5
+
6
+ @mixin kbq-card-style($component, $style-name) {
7
+ $style: map.get($component, $style-name);
3
8
 
4
- @mixin kbq-card-type($card) {
5
9
  box-shadow:
6
- inset -1px 0 0 0 map.get($card, shadow),
7
- inset 0 1px 0 0 map.get($card, shadow),
8
- inset 0 -1px 0 0 map.get($card, shadow);
10
+ inset -1px 0 0 0 kbq-css-variable(card-#{$style-name}-shadow, map.get($style, shadow)),
11
+ inset 0 1px 0 0 kbq-css-variable(card-#{$style-name}-shadow, map.get($style, shadow)),
12
+ inset 0 -1px 0 0 kbq-css-variable(card-#{$style-name}-shadow, map.get($style, shadow));
9
13
 
10
- background-color: map.get($card, background);
14
+ background-color: kbq-css-variable(card-#{$style-name}-background, map.get($style, background));
11
15
 
12
- border-left-color: map.get($card, vertical-line);
16
+ border-left-color: kbq-css-variable(card-#{$style-name}-vertical-line, map.get($style, vertical-line));
13
17
  }
14
18
 
15
19
  @mixin kbq-card-theme($theme) {
@@ -19,43 +23,41 @@
19
23
  $card: map.get(map.get($theme, components), card);
20
24
  $popup: map.get(map.get($theme, components), popup);
21
25
 
22
- $is-dark: map.get($theme, is-dark);
23
-
24
26
  .kbq-card {
25
- color: map.get($foreground, contrast);
27
+ color: kbq-css-variable(foreground-contrast, map.get($foreground, contrast));
26
28
 
27
29
  &.kbq-card_error {
28
- @include kbq-card-type(map.get($card, error));
30
+ @include kbq-card-style($card, error);
29
31
  }
30
32
 
31
33
  &.kbq-card_warning {
32
- @include kbq-card-type(map.get($card, warning));
34
+ @include kbq-card-style($card, warning);
33
35
  }
34
36
 
35
37
  &.kbq-card_success {
36
- @include kbq-card-type(map.get($card, success));
38
+ @include kbq-card-style($card, success);
37
39
  }
38
40
 
39
41
  &.kbq-card_info {
40
- @include kbq-card-type(map.get($card, info));
42
+ @include kbq-card-style($card, info);
41
43
  }
42
44
 
43
45
  &.kbq-card_white {
44
- background-color: map.get($popup, background);
46
+ background-color: kbq-css-variable(popup-background, map.get($popup, background));
45
47
  }
46
48
 
47
49
  &.kbq-selected {
48
- background-color: map.get(map.get($theme, states), selected-color);
50
+ background-color: kbq-css-variable(states-selected-color, map.get($theme, states, selected-color));
49
51
  }
50
52
 
51
53
  &:not(.kbq-card_readonly):hover {
52
54
  .kbq-card__overlay {
53
- background: map.get($background, overlay-hover);
55
+ background: kbq-css-variable(background-overlay-hover, map.get($background, overlay-hover));
54
56
  }
55
57
  }
56
58
 
57
59
  &.cdk-keyboard-focused {
58
- box-shadow: 0 0 0 2px map.get(map.get($theme, states), focused-color);
60
+ box-shadow: 0 0 0.1px 2px kbq-css-variable(states-focused-color, map.get($theme, states, focused-color));
59
61
  }
60
62
  }
61
63
  }
@@ -3,11 +3,9 @@
3
3
 
4
4
  @use '../core/styles/common/layout';
5
5
 
6
- @use '../core/styles/tokens';
6
+ @use '../core/styles/common/tokens' as *;
7
7
 
8
8
 
9
- $tokens: meta.module-variables(tokens) !default;
10
-
11
9
  .kbq-card {
12
10
  position: relative;
13
11
  box-sizing: border-box;
@@ -22,7 +20,7 @@ $tokens: meta.module-variables(tokens) !default;
22
20
  }
23
21
 
24
22
  border-left: {
25
- width: var(--kbq-card-size-vertical-line, map.get($tokens, card-size-vertical-line));
23
+ width: kbq-css-variable(card-size-vertical-line);
26
24
  style: solid;
27
25
  color: transparent;
28
26
  };
@@ -2,94 +2,100 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../core/styles/typography/typography-utils' as *;
5
+ @use '../core/styles/common/tokens' as *;
5
6
 
6
7
 
7
8
  /* stylelint-disable no-descending-specificity */
8
- @mixin kbq-checkbox-state($state) {
9
+ @mixin kbq-checkbox-color($component, $style-name) {
10
+ $style: map.get($component, $style-name);
11
+ $base: checkbox-#{$style-name};
12
+
9
13
  .kbq-checkbox__frame {
10
- border-color: map.get($state, border);
14
+ border-color: kbq-css-variable(#{$base}-default-border, map.get($style, default, border));
11
15
 
12
- background-color: map.get($state, background);
16
+ background-color: kbq-css-variable(#{$base}-default-background, map.get($style, default, background));
13
17
  }
14
- }
15
-
16
- @mixin kbq-checkbox-color($checkbox) {
17
- $default: map.get($checkbox, default);
18
-
19
- @include kbq-checkbox-state($default);
20
18
 
21
19
  .kbq-checkbox-label {
22
- color: map.get($default, text);
20
+ color: kbq-css-variable(#{$base}-default-text, map.get($style, default, text));
23
21
  }
24
22
 
25
23
  .kbq-checkbox__frame {
26
24
  & .kbq-checkbox-checkmark,
27
25
  & .kbq-checkbox-mixedmark {
28
- color: map.get($default, color);
26
+ color: kbq-css-variable(#{$base}-default-color, map.get($style, default, color));
29
27
  }
30
28
  }
31
29
 
32
30
  & .kbq-hint .kbq-hint__text {
33
- color: map.get($default, caption);
31
+ color: kbq-css-variable(#{$base}-default-caption, map.get($style, default, caption));
34
32
  }
35
33
 
36
34
  &:hover,
37
35
  &.kbq-hover {
38
- @include kbq-checkbox-state(map.get($checkbox, hover));
36
+ .kbq-checkbox__frame {
37
+ border-color: kbq-css-variable(#{$base}-hover-border, map.get($style, hover, border));
38
+
39
+ background-color: kbq-css-variable(#{$base}-hover-background, map.get($style, hover, background));
40
+ }
39
41
  }
40
42
 
41
43
  &.kbq-checked,
42
44
  &.kbq-indeterminate {
43
- @include kbq-checkbox-state(map.get($checkbox, checked));
45
+ .kbq-checkbox__frame {
46
+ border-color: kbq-css-variable(#{$base}-checked-border, map.get($style, checked, border));
47
+
48
+ background-color: kbq-css-variable(#{$base}-checked-background, map.get($style, checked, background));
49
+ }
44
50
  }
45
51
 
46
52
  &.kbq-checked:not(.kbq-disabled),
47
53
  &.kbq-indeterminate:not(.kbq-disabled) {
48
54
  &:hover,
49
55
  &.kbq-hover {
50
- @include kbq-checkbox-state(map.get($checkbox, checked-hover));
56
+ .kbq-checkbox__frame {
57
+ border-color: kbq-css-variable(#{$base}-hover-border, map.get($style, checked-hover, border));
58
+
59
+ background-color: kbq-css-variable(
60
+ #{$base}-hover-background, map.get($style, checked-hover, background));
61
+ }
51
62
  }
52
63
 
53
64
  & .kbq-checkbox-input.cdk-keyboard-focused {
54
65
  + .kbq-checkbox__frame {
55
- $checked-focused: map.get($checkbox, checked-focused);
56
-
57
- border-color: map.get($checked-focused, border);
58
- background-color: map.get($checked-focused, background);
59
- outline: map.get($checked-focused, outline);
66
+ border-color: kbq-css-variable(#{$base}-focused-border, map.get($style, checked-focused, border));
67
+ background-color: kbq-css-variable(
68
+ #{$base}-focused-background, map.get($style, checked-focused, background));
69
+ outline: kbq-css-variable(#{$base}-focused-outline, map.get($style, checked-focused, outline));
60
70
  }
61
71
  }
62
72
  }
63
73
 
64
74
  & .kbq-checkbox-input.cdk-keyboard-focused {
65
75
  + .kbq-checkbox__frame {
66
- $focused: map.get($checkbox, focused);
67
-
68
- border-color: map.get($focused, border);
69
- background-color: map.get($focused, background);
70
- outline: map.get($focused, outline);
76
+ border-color: kbq-css-variable(#{$base}-focused-border, map.get($style, focused, border));
77
+ background-color: kbq-css-variable(#{$base}-focused-background, map.get($style, focused, background));
78
+ outline: kbq-css-variable(#{$base}-focused-outline, map.get($style, focused, outline));
71
79
  }
72
80
  }
73
81
 
74
82
  &.kbq-disabled {
75
- $disabled: map.get($checkbox, disabled);
76
-
77
83
  .kbq-checkbox__frame {
78
- border-color: map.get($disabled, border);
79
- background-color: map.get($disabled, background);
84
+ border-color: kbq-css-variable(#{$base}-disabled-border, map.get($style, disabled, border));
85
+ background-color: kbq-css-variable(#{$base}-disabled-background, map.get($style, disabled, background));
80
86
 
81
87
  & .kbq-checkbox-checkmark,
82
88
  & .kbq-checkbox-mixedmark {
83
- color: map.get($disabled, color);
89
+ color: kbq-css-variable(#{$base}-disabled-color, map.get($style, disabled, color));
84
90
  }
85
91
  }
86
92
 
87
93
  & .kbq-hint .kbq-hint__text {
88
- color: map.get($disabled, caption);
94
+ color: kbq-css-variable(#{$base}-disabled-caption, map.get($style, disabled, caption));
89
95
  }
90
96
 
91
97
  .kbq-checkbox-label {
92
- color: map.get($disabled, text);
98
+ color: kbq-css-variable(#{$base}-disabled-text, map.get($style, disabled, text));
93
99
  }
94
100
  }
95
101
  }
@@ -98,34 +104,29 @@
98
104
  @mixin kbq-checkbox-theme($theme) {
99
105
  $checkbox: map.get(map.get($theme, components), checkbox);
100
106
 
101
- $checkbox-theme: map.get($checkbox, theme);
102
- $checkbox-error: map.get($checkbox, error);
103
-
104
107
  .kbq-checkbox {
105
- @include kbq-checkbox-color($checkbox-theme);
108
+ @include kbq-checkbox-color($checkbox, theme);
106
109
 
107
110
  &.kbq-error {
108
- @include kbq-checkbox-color($checkbox-error);
111
+ @include kbq-checkbox-color($checkbox, error);
109
112
  }
110
113
  }
111
114
  }
112
115
 
113
116
  @mixin kbq-checkbox-typography($config) {
114
- $tokens: map.get($config, tokens);
115
-
116
117
  .kbq-checkbox {
117
- @include kbq-typography-level-to-styles($config, map.get($tokens, checkbox-font-normal-label));
118
+ @include kbq-typography-css-variables(checkbox, normal-label);
118
119
 
119
120
  & .kbq-hint .kbq-hint__text {
120
- @include kbq-typography-level-to-styles($config, map.get($tokens, checkbox-font-normal-caption));
121
+ @include kbq-typography-css-variables(checkbox, normal-caption);
121
122
  }
122
123
  }
123
124
 
124
125
  .kbq-checkbox.kbq-checkbox_big {
125
- @include kbq-typography-level-to-styles($config, map.get($tokens, checkbox-font-big-label));
126
+ @include kbq-typography-css-variables(checkbox, big-label);
126
127
 
127
128
  & .kbq-hint .kbq-hint__text {
128
- @include kbq-typography-level-to-styles($config, map.get($tokens, checkbox-font-big-caption));
129
+ @include kbq-typography-css-variables(checkbox, big-caption);
129
130
  }
130
131
  }
131
132
  }
@@ -5,6 +5,7 @@
5
5
  @use '../core/styles/common/layout';
6
6
 
7
7
  @use '../core/styles/tokens';
8
+ @use '../core/styles/common/tokens' as *;
8
9
 
9
10
 
10
11
  $tokens: meta.module-variables(tokens) !default;
@@ -24,15 +25,15 @@ $tokens: meta.module-variables(tokens) !default;
24
25
  pointer-events: none;
25
26
  background-color: transparent;
26
27
 
27
- border-radius: var(--kbq-checkbox-size-normal-border-radius, map.get($tokens, checkbox-size-normal-border-radius));
28
+ border-radius: kbq-css-variable(checkbox-size-normal-border-radius);
28
29
 
29
30
  border: {
30
- width: var(--kbq-checkbox-size-normal-border-width, map.get($tokens, checkbox-size-normal-border-width));
31
+ width: kbq-css-variable(checkbox-size-normal-border-width);
31
32
  style: solid;
32
33
  }
33
34
 
34
- height: var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width));
35
- width: var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width));
35
+ height: kbq-css-variable(checkbox-size-normal-width);
36
+ width: kbq-css-variable(checkbox-size-normal-width);
36
37
  }
37
38
 
38
39
  .kbq-checkbox__layout {
@@ -44,6 +45,10 @@ $tokens: meta.module-variables(tokens) !default;
44
45
  // (e.g. pointer by default, regular when disabled), instead of the browser default.
45
46
  cursor: inherit;
46
47
 
48
+ padding-top: kbq-css-variable(checkbox-size-normal-paddding-top);
49
+
50
+ padding-bottom: kbq-css-variable(checkbox-size-normal-paddding-bottom);
51
+
47
52
  padding-left: calc(
48
53
  var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width)) +
49
54
  var(
@@ -59,11 +64,11 @@ $tokens: meta.module-variables(tokens) !default;
59
64
  display: inline-block;
60
65
 
61
66
  position: absolute;
62
- top: 0;
67
+ top: kbq-css-variable(checkbox-size-normal-top);
63
68
  left: 0;
64
69
 
65
- height: var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width));
66
- width: var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width));
70
+ height: kbq-css-variable(checkbox-size-normal-width);
71
+ width: kbq-css-variable(checkbox-size-normal-width);
67
72
  }
68
73
 
69
74
  .kbq-checkbox {
@@ -101,15 +106,13 @@ $tokens: meta.module-variables(tokens) !default;
101
106
  }
102
107
 
103
108
  & .kbq-hint {
104
- margin-top: var(
105
- --kbq-checkbox-size-normal-vertical-content-padding,
106
- map.get($tokens, checkbox-size-normal-vertical-content-padding)
107
- );
109
+ margin-top: kbq-css-variable(checkbox-size-normal-vertical-content-padding);
108
110
  }
109
111
  }
110
112
 
111
113
  .kbq-checkbox.kbq-checkbox_big {
112
114
  & .kbq-checkbox__layout {
115
+
113
116
  padding-left: calc(
114
117
  var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width)) +
115
118
  var(
@@ -120,25 +123,22 @@ $tokens: meta.module-variables(tokens) !default;
120
123
  }
121
124
 
122
125
  & .kbq-checkbox__inner-container {
123
- top: 2px;
124
- height: var(--kbq-checkbox-size-big-width, map.get($tokens, checkbox-size-big-width));
125
- width: var(--kbq-checkbox-size-big-width, map.get($tokens, checkbox-size-big-width));
126
+ top: kbq-css-variable(checkbox-size-big-top);
127
+ height: kbq-css-variable(checkbox-size-big-width);
128
+ width: kbq-css-variable(checkbox-size-big-width);
126
129
  }
127
130
 
128
131
  & .kbq-checkbox__frame {
129
- border-radius: var(--kbq-checkbox-size-big-border-radius, map.get($tokens, checkbox-size-big-border-radius));
132
+ border-radius: kbq-css-variable(checkbox-size-big-border-radius);
130
133
 
131
134
  border: {
132
- width: var(--kbq-checkbox-size-big-border-width, map.get($tokens, checkbox-size-big-border-width));
135
+ width: kbq-css-variable(checkbox-size-big-border-width);
133
136
  style: solid;
134
137
  }
135
138
  }
136
139
 
137
140
  & .kbq-hint {
138
- margin-top: var(
139
- --kbq-checkbox-size-big-vertical-content-padding,
140
- map.get($tokens, checkbox-size-big-vertical-content-padding)
141
- );
141
+ margin-top: kbq-css-variable(checkbox-size-big-vertical-content-padding);
142
142
  }
143
143
  }
144
144
 
@@ -157,9 +157,11 @@ $tokens: meta.module-variables(tokens) !default;
157
157
  /* stylelint-disable no-descending-specificity */
158
158
  .kbq-checkbox_label-before {
159
159
  .kbq-checkbox__layout {
160
+
160
161
  padding-left: 0;
161
162
  padding-right: calc(
162
- var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width)) +
163
+ var(--kbq-checkbox-size-normal-width, map.get($tokens, checkbox-size-normal-width))
164
+ +
163
165
  var(
164
166
  --kbq-checkbox-size-normal-horizontal-content-padding,
165
167
  map.get($tokens, checkbox-size-normal-horizontal-content-padding)
@@ -3,24 +3,22 @@
3
3
  @use 'sass:list';
4
4
 
5
5
  @use '../core/styles/typography/typography-utils' as *;
6
+ @use '../core/styles/common/tokens' as *;
6
7
 
7
8
 
8
- @mixin kbq-code-block-style($style) {
9
- $header: map.get($style, header);
10
- $container: map.get($style, container);
11
- $actionbar: map.get($style, actionbar);
12
- $collapse: map.get($style, collapse);
9
+ @mixin kbq-code-block-style($component, $style-name) {
10
+ $style: map.get($component, $style-name);
11
+ $base: code-block-#{$style-name};
13
12
 
14
- background: map.get($container, background);
13
+ background: kbq-css-variable(#{$base}-container-background, map.get($style, container, background));
15
14
 
16
15
  & .kbq-tab-header {
17
- $header: map.get($style, header);
18
- background: map.get($header, background) !important;
19
- border-color: map.get($container, border);
16
+ background: kbq-css-variable(#{$base}-header-background, map.get($style, header, background)) !important;
17
+ border-color: kbq-css-variable(#{$base}-container-border, map.get($style, container, border));
20
18
  }
21
19
 
22
20
  .kbq-tab-body__wrapper {
23
- border-color: map.get($container, border);
21
+ border-color: kbq-css-variable(#{$base}-container-border, map.get($style, container, border));
24
22
  }
25
23
 
26
24
  &:not(.kbq-code-block_no-header) {
@@ -30,12 +28,12 @@
30
28
  }
31
29
 
32
30
  & .kbq-code-block-actionbar {
33
- background: map.get($actionbar, background);
31
+ background: kbq-css-variable(#{$base}-actionbar-background, map.get($style, actionbar, background));
34
32
  }
35
33
 
36
34
  &.kbq-code-block_header-with-shadow {
37
35
  & .kbq-tab-header {
38
- box-shadow: map.get($header, shadow);
36
+ box-shadow: kbq-css-variable(#{$base}-header-shadow, map.get($style, header, shadow));
39
37
  }
40
38
  }
41
39
 
@@ -43,23 +41,26 @@
43
41
  & .kbq-code-block__fade-gradient {
44
42
  display: block;
45
43
 
46
- background: map.get($actionbar, fade-gradient)
44
+ background: kbq-css-variable(#{$base}-actionbar-fade-gradient, map.get($style, actionbar, fade-gradient))
47
45
  }
48
46
  }
49
47
 
50
48
  .kbq-code-block__show-more {
51
49
  .bg-wrapper {
52
- background: map.get($collapse, button-expand-background);
50
+ background: kbq-css-variable(
51
+ #{$base}-collapse-button-expand-background, map.get($style, collapse, button-expand-background));
53
52
  opacity: 90%;
54
53
  }
55
54
  }
56
55
 
57
56
  & .kbq-code-block__show-more_expanded {
58
- background: map.get($collapse, expanded-background);
57
+ background: kbq-css-variable(
58
+ #{$base}-collapse-expanded-background, map.get($style, collapse, expanded-background));
59
59
  }
60
60
 
61
61
  & .kbq-code-block__show-more_collapsed {
62
- background: map.get($collapse, collapsed-background);
62
+ background: kbq-css-variable(
63
+ #{$base}-collapse-collapsed-background, map.get($style, collapse, collapsed-background));
63
64
  }
64
65
  }
65
66
 
@@ -338,22 +339,23 @@
338
339
  }
339
340
 
340
341
  &.kbq-code-block_outline {
341
- @include kbq-code-block-style(map.get($code-block, outline));
342
+ @include kbq-code-block-style($code-block, outline);
342
343
  }
343
344
 
344
345
  &.kbq-code-block_filled {
345
- @include kbq-code-block-style(map.get($code-block, filled));
346
+ @include kbq-code-block-style($code-block, filled);
346
347
  }
347
348
 
348
349
  .kbq-tab-group.kbq-focused {
349
350
  // paint focus border from the top since because of border constraints
350
351
  .kbq-tab-header {
351
- box-shadow: 0 3px 0 -1px map.get(map.get($theme, states), focused-color);
352
+ box-shadow: 0 3px 0 -1px kbq-css-variable(states-focused-color, map.get($theme, states, focused-color));
352
353
  }
353
354
 
354
355
  .kbq-tab-body__wrapper {
355
- border-color: map.get(map.get($theme, states), focused-color);
356
- box-shadow: inset 0 0 0 1px map.get(map.get($theme, states), focused-color);
356
+ border-color: kbq-css-variable(states-focused-color, map.get($theme, states, focused-color));
357
+ box-shadow: inset 0 0 0.1 1px kbq-css-variable(
358
+ states-focused-color, map.get($theme, states, focused-color));
357
359
  }
358
360
  }
359
361
 
@@ -367,20 +369,19 @@
367
369
 
368
370
  .kbq-code-block-actionbar {
369
371
  .kbq-code-block-actionbar_less-contrast {
370
- background-color: map-get($code-block, actionbar, bg-less-contrast);
372
+ background-color: kbq-css-variable(
373
+ code-block-actionbar-bg-less-contrast, map-get($code-block, actionbar, bg-less-contrast));
371
374
  }
372
375
 
373
376
  &.kbq-actionbar-block_floating {
374
- background-color: map-get($code-block, actionbar, bg);
377
+ background-color: kbq-css-variable(code-block-actionbar-bg, map-get($code-block, actionbar, bg));
375
378
  }
376
379
  }
377
380
  }
378
381
 
379
382
  @mixin kbq-code-block-typography($config) {
380
- $tokens: map.get($config, tokens);
381
-
382
383
  .kbq-code-block {
383
- @include kbq-typography-level-to-styles($config, map.get($tokens, code-block-font-default));
384
+ @include kbq-typography-css-variables(code-block, default);
384
385
 
385
386
  & .kbq-code-block__code {
386
387
  font: inherit;
@@ -1,6 +1,7 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
  @use '../core/styles/tokens';
4
+ @use '../core/styles/common/tokens' as *;
4
5
 
5
6
 
6
7
  $tokens: meta.module-variables(tokens) !default;
@@ -17,27 +18,15 @@ $tokens: meta.module-variables(tokens) !default;
17
18
  right: 0;
18
19
 
19
20
  margin:
20
- var(
21
- --kbq-code-block-size-actionbar-padding-vertical,
22
- map.get($tokens, code-block-size-actionbar-padding-vertical)
23
- )
24
- var(
25
- --kbq-code-block-size-actionbar-padding-horizontal,
26
- map.get($tokens, code-block-size-actionbar-padding-horizontal)
27
- );
21
+ kbq-css-variable(code-block-size-actionbar-padding-vertical)
22
+ kbq-css-variable(code-block-size-actionbar-padding-horizontal);
28
23
 
29
- gap: var(
30
- --kbq-code-block-size-actionbar-content-gap-horizontal,
31
- map.get($tokens, code-block-size-actionbar-content-gap-horizontal)
32
- );
24
+ gap: kbq-css-variable(code-block-size-actionbar-content-gap-horizontal);
33
25
 
34
26
  & .kbq-code-block__fade-gradient {
35
27
  display: none;
36
28
 
37
- width: var(
38
- --kbq-code-block-size-actionbar-fade-gradient-width,
39
- map.get($tokens, code-block-size-actionbar-fade-gradient-width)
40
- );
29
+ width: kbq-css-variable(code-block-size-actionbar-fade-gradient-width);
41
30
  height: 32px;
42
31
 
43
32
  margin-top: calc(
@@ -49,7 +38,7 @@ $tokens: meta.module-variables(tokens) !default;
49
38
  }
50
39
 
51
40
  &.kbq-actionbar-block_floating {
52
- top: map.get($tokens, code-block-size-actionbar-margin-top);
53
- right: map.get($tokens, code-block-size-actionbar-margin-right);
41
+ top: kbq-css-variable(code-block-size-actionbar-margin-top);
42
+ right: kbq-css-variable(code-block-size-actionbar-margin-right);
54
43
  }
55
44
  }