@koobiq/components 17.0.0-rc.5 → 17.0.0-rc.7

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 (220) hide show
  1. package/alert/_alert-theme.scss +19 -21
  2. package/alert/alert.component.scss +39 -41
  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 +15 -35
  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 +9 -32
  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 +13 -18
  17. package/code-block/README.md +1 -0
  18. package/code-block/_code-block-theme.scss +27 -26
  19. package/code-block/actionbar.component.scss +7 -18
  20. package/code-block/code-block.scss +29 -65
  21. package/core/forms/_forms-theme.scss +4 -7
  22. package/core/forms/_forms.scss +13 -42
  23. package/core/option/_optgroup-theme.scss +4 -5
  24. package/core/option/_option-action-theme.scss +7 -7
  25. package/core/option/_option-theme.scss +16 -20
  26. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -19
  27. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +9 -8
  28. package/core/styles/common/_groups.scss +3 -5
  29. package/core/styles/common/_list.scss +14 -18
  30. package/core/styles/common/_popup.scss +5 -4
  31. package/core/styles/common/_select.scss +11 -16
  32. package/core/styles/common/_tokens.scss +30 -9
  33. package/core/styles/theming/_components-theming.scss +151 -131
  34. package/core/styles/visual/_layout.scss +14 -16
  35. package/datepicker/_datepicker-theme.scss +24 -39
  36. package/datepicker/calendar-body.scss +3 -8
  37. package/datepicker/calendar-header.scss +4 -9
  38. package/datepicker/calendar.scss +5 -16
  39. package/datepicker/datepicker-content.scss +4 -12
  40. package/datepicker/datepicker-input.scss +0 -4
  41. package/datepicker/datepicker-toggle.scss +3 -2
  42. package/divider/_divider-theme.scss +3 -1
  43. package/divider/divider.scss +9 -25
  44. package/dl/_dl-theme.scss +5 -6
  45. package/dl/dl.scss +5 -19
  46. package/dropdown/_dropdown-theme.scss +28 -22
  47. package/dropdown/dropdown-item.scss +3 -11
  48. package/dropdown/dropdown.scss +6 -14
  49. package/esm2022/alert/alert.component.mjs +2 -2
  50. package/esm2022/button/button.component.mjs +13 -6
  51. package/esm2022/code-block/actionbar.component.mjs +2 -2
  52. package/esm2022/code-block/code-block.component.mjs +2 -2
  53. package/esm2022/core/version.mjs +2 -2
  54. package/esm2022/datepicker/datepicker-animations.mjs +2 -2
  55. package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
  56. package/esm2022/file-upload/single-file-upload.component.mjs +2 -2
  57. package/esm2022/form-field/form-field.mjs +2 -2
  58. package/esm2022/icon/icon-item.component.mjs +16 -6
  59. package/esm2022/input/input-number.mjs +2 -2
  60. package/esm2022/markdown/markdown.component.mjs +2 -2
  61. package/esm2022/modal/modal.component.mjs +4 -4
  62. package/esm2022/navbar/navbar-item.component.mjs +2 -2
  63. package/esm2022/navbar/navbar.component.mjs +2 -2
  64. package/esm2022/navbar/vertical-navbar.component.mjs +2 -2
  65. package/esm2022/popover/popover-confirm.component.mjs +3 -3
  66. package/esm2022/popover/popover.component.mjs +3 -3
  67. package/esm2022/scrollbar/scrollbar.component.mjs +2 -2
  68. package/esm2022/select/select.component.mjs +4 -4
  69. package/esm2022/splitter/splitter.component.mjs +2 -2
  70. package/esm2022/tabs/tab-body.component.mjs +1 -1
  71. package/esm2022/tabs/tab-group.component.mjs +4 -4
  72. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
  73. package/esm2022/tags/tag.component.mjs +2 -2
  74. package/esm2022/timepicker/timepicker.directive.mjs +11 -3
  75. package/esm2022/timezone/timezone-select.component.mjs +2 -2
  76. package/esm2022/title/title.directive.mjs +2 -2
  77. package/esm2022/toast/toast.component.mjs +3 -3
  78. package/esm2022/tree/tree-base.mjs +2 -2
  79. package/esm2022/tree-select/tree-select.component.mjs +3 -3
  80. package/fesm2022/koobiq-components-alert.mjs +2 -2
  81. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  82. package/fesm2022/koobiq-components-button.mjs +12 -5
  83. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  84. package/fesm2022/koobiq-components-code-block.mjs +4 -4
  85. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-core.mjs +1 -1
  87. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  88. package/fesm2022/koobiq-components-datepicker.mjs +1 -1
  89. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  90. package/fesm2022/koobiq-components-file-upload.mjs +4 -4
  91. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  92. package/fesm2022/koobiq-components-form-field.mjs +2 -2
  93. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  94. package/fesm2022/koobiq-components-icon.mjs +14 -4
  95. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  96. package/fesm2022/koobiq-components-input.mjs +1 -1
  97. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  98. package/fesm2022/koobiq-components-markdown.mjs +2 -2
  99. package/fesm2022/koobiq-components-modal.mjs +3 -3
  100. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  101. package/fesm2022/koobiq-components-navbar.mjs +6 -6
  102. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  103. package/fesm2022/koobiq-components-popover.mjs +4 -4
  104. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  105. package/fesm2022/koobiq-components-scrollbar.mjs +2 -2
  106. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  107. package/fesm2022/koobiq-components-select.mjs +3 -3
  108. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  109. package/fesm2022/koobiq-components-splitter.mjs +1 -1
  110. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  111. package/fesm2022/koobiq-components-tabs.mjs +5 -5
  112. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  113. package/fesm2022/koobiq-components-tags.mjs +1 -1
  114. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  115. package/fesm2022/koobiq-components-timepicker.mjs +10 -2
  116. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  117. package/fesm2022/koobiq-components-timezone.mjs +2 -2
  118. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  119. package/fesm2022/koobiq-components-title.mjs +1 -1
  120. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  121. package/fesm2022/koobiq-components-toast.mjs +2 -2
  122. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  123. package/fesm2022/koobiq-components-tree-select.mjs +2 -2
  124. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  125. package/fesm2022/koobiq-components-tree.mjs +1 -1
  126. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  127. package/file-upload/_file-upload-theme.scss +109 -68
  128. package/file-upload/file-upload.scss +0 -5
  129. package/file-upload/multiple-file-upload.component.scss +32 -98
  130. package/file-upload/single-file-upload.component.scss +12 -31
  131. package/form-field/_form-field-theme.scss +32 -34
  132. package/form-field/_hint-theme.scss +16 -19
  133. package/form-field/cleaner.scss +3 -8
  134. package/form-field/form-field.scss +11 -12
  135. package/form-field/hint.scss +3 -7
  136. package/form-field/password-toggle.scss +3 -9
  137. package/form-field/stepper.scss +4 -10
  138. package/icon/_icon-button-theme.scss +35 -35
  139. package/icon/_icon-item-theme.scss +46 -31
  140. package/icon/_icon-theme.scss +9 -15
  141. package/icon/icon-button.scss +5 -17
  142. package/icon/icon-item.component.d.ts +3 -1
  143. package/icon/icon-item.scss +12 -7
  144. package/icon/icon.scss +0 -5
  145. package/input/_input-theme.scss +2 -3
  146. package/input/input.scss +2 -1
  147. package/link/_link-theme.scss +25 -42
  148. package/list/_list-theme.scss +22 -19
  149. package/list/list.scss +0 -4
  150. package/loader-overlay/_loader-overlay-theme.scss +13 -16
  151. package/loader-overlay/loader-overlay.scss +9 -32
  152. package/markdown/_markdown-theme.scss +41 -44
  153. package/markdown/markdown.scss +38 -88
  154. package/modal/_modal-confirm.scss +2 -6
  155. package/modal/_modal-theme.scss +11 -12
  156. package/modal/modal.component.d.ts +1 -1
  157. package/modal/modal.scss +19 -25
  158. package/navbar/_navbar-item_horizontal.scss +24 -27
  159. package/navbar/_navbar-item_vertical.scss +28 -27
  160. package/navbar/_navbar-theme.scss +21 -22
  161. package/navbar/navbar-brand.scss +24 -26
  162. package/navbar/navbar-divider.scss +4 -7
  163. package/navbar/navbar-item.scss +5 -13
  164. package/navbar/navbar.scss +2 -5
  165. package/navbar/vertical-navbar.scss +3 -5
  166. package/package.json +9 -9
  167. package/popover/README.md +1 -0
  168. package/popover/_popover-theme.scss +9 -16
  169. package/popover/popover.scss +18 -24
  170. package/prebuilt-themes/dark-theme.css +1 -1
  171. package/prebuilt-themes/light-theme.css +1 -1
  172. package/progress-bar/_progress-bar-theme.scss +7 -10
  173. package/progress-bar/progress-bar.scss +6 -18
  174. package/progress-spinner/_progress-spinner-theme.scss +6 -7
  175. package/progress-spinner/progress-spinner.scss +8 -17
  176. package/radio/_radio-theme.scss +29 -37
  177. package/radio/radio.scss +17 -38
  178. package/risk-level/_risk-level-theme.scss +25 -30
  179. package/risk-level/risk-level.component.scss +5 -8
  180. package/schematics/ng-add/index.js +6 -6
  181. package/scrollbar/_scrollbar-component-theme.scss +14 -17
  182. package/scrollbar/scrollbar.component.scss +7 -20
  183. package/select/_select-theme.scss +14 -15
  184. package/select/select.scss +3 -10
  185. package/sidepanel/_sidepanel-theme.scss +8 -9
  186. package/sidepanel/sidepanel.scss +19 -30
  187. package/splitter/_splitter-theme.scss +3 -3
  188. package/table/_table-theme.scss +9 -8
  189. package/table/table.scss +12 -12
  190. package/tabs/_tabs-common.scss +4 -7
  191. package/tabs/_tabs-theme.scss +77 -44
  192. package/tabs/tab-body.component.d.ts +1 -1
  193. package/tabs/tab-group.scss +2 -7
  194. package/tabs/tab-header.scss +0 -4
  195. package/tabs/tab-nav-bar/tab-nav-bar.scss +2 -8
  196. package/tags/_tag-theme.scss +23 -26
  197. package/tags/tag-list.scss +6 -5
  198. package/tags/tag.component.d.ts +1 -1
  199. package/tags/tag.scss +6 -9
  200. package/textarea/_textarea-theme.scss +2 -4
  201. package/textarea/textarea.scss +6 -8
  202. package/timepicker/timepicker.directive.d.ts +1 -1
  203. package/timepicker/timepicker.scss +2 -7
  204. package/timezone/_timezone-option-theme.scss +8 -9
  205. package/timezone/timezone-option.component.scss +5 -7
  206. package/timezone/timezone-select.component.scss +2 -3
  207. package/toast/_toast-theme.scss +15 -14
  208. package/toast/toast-container.component.scss +4 -7
  209. package/toast/toast.component.scss +20 -25
  210. package/toggle/_toggle-theme.scss +48 -42
  211. package/toggle/toggle.scss +9 -21
  212. package/tooltip/_tooltip-theme.scss +13 -16
  213. package/tooltip/tooltip.scss +8 -10
  214. package/tree/_tree-theme.scss +20 -22
  215. package/tree/toggle.scss +3 -5
  216. package/tree/tree-base.d.ts +1 -1
  217. package/tree/tree-option.scss +5 -6
  218. package/tree-select/_tree-select-theme.scss +11 -13
  219. package/tree-select/tree-select.scss +0 -4
  220. package/core/styles/_variables.scss +0 -1
@@ -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
  }
@@ -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
  }
@@ -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);
@@ -2,6 +2,7 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../tokens';
5
+ @use './tokens' as *;
5
6
 
6
7
 
7
8
  // This mixin will ensure that lines that overflow the container will hide the overflow and
@@ -55,8 +56,8 @@
55
56
 
56
57
  @include kbq-truncate-line();
57
58
 
58
- padding-top: var(--kbq-list-size-text-padding-vertical, map.get($tokens, list-size-text-padding-vertical));
59
- padding-bottom: var(--kbq-list-size-text-padding-vertical, map.get($tokens, list-size-text-padding-vertical));
59
+ padding-top: kbq-css-variable(list-size-text-padding-vertical);
60
+ padding-bottom: kbq-css-variable(list-size-text-padding-vertical);
60
61
  }
61
62
 
62
63
  // This mixin provides all list-item styles, changing font size and height based on whether the list is in dense mode.
@@ -82,11 +83,9 @@
82
83
 
83
84
  min-height: 32px;
84
85
 
85
- gap: var(
86
- --kbq-list-size-container-content-gap-horizontal, map.get($tokens, list-size-container-content-gap-horizontal)
87
- );
86
+ gap: kbq-css-variable(list-size-container-content-gap-horizontal);
88
87
 
89
- border-width: var(--kbq-list-size-container-focus-outline-width, $outline-width);
88
+ border-width: kbq-css-variable(list-size-container-focus-outline-width);
90
89
  border-style: solid;
91
90
  border-color: transparent;
92
91
 
@@ -113,10 +112,7 @@
113
112
  }
114
113
 
115
114
  .kbq-list-option-caption {
116
- padding-top: var(
117
- --kbq-list-size-container-content-gap-vertical,
118
- map.get($tokens, list-size-container-content-gap-vertical)
119
- );
115
+ padding-top: kbq-css-variable(list-size-container-content-gap-vertical);
120
116
  }
121
117
  }
122
118
 
@@ -132,10 +128,10 @@
132
128
  min-height: 32px;
133
129
 
134
130
  padding:
135
- var(--kbq-list-size-header-padding-top, map.get($tokens, list-size-header-padding-top))
136
- var(--kbq-list-size-header-padding-horizontal, map.get($tokens, list-size-header-padding-horizontal))
137
- var(--kbq-list-size-header-padding-bottom, map.get($tokens, list-size-header-padding-bottom))
138
- var(--kbq-list-size-header-padding-horizontal, map.get($tokens, list-size-header-padding-horizontal));
131
+ kbq-css-variable(list-size-header-padding-top)
132
+ kbq-css-variable(list-size-header-padding-horizontal)
133
+ kbq-css-variable(list-size-header-padding-bottom)
134
+ kbq-css-variable(list-size-header-padding-horizontal);
139
135
 
140
136
  .kbq-list-text {
141
137
  @include kbq-list-text();
@@ -154,10 +150,10 @@
154
150
  min-height: 32px;
155
151
 
156
152
  padding:
157
- var(--kbq-list-size-subheading-padding-top, map.get($tokens, list-size-subheading-padding-top))
158
- var(--kbq-list-size-subheading-padding-horizontal, map.get($tokens, list-size-subheading-padding-horizontal))
159
- var(--kbq-list-size-subheading-padding-bottom, map.get($tokens, list-size-subheading-padding-bottom))
160
- var(--kbq-list-size-subheading-padding-horizontal, map.get($tokens, list-size-subheading-padding-horizontal));
153
+ kbq-css-variable(list-size-subheading-padding-top)
154
+ kbq-css-variable(list-size-subheading-padding-horizontal)
155
+ kbq-css-variable(list-size-subheading-padding-bottom)
156
+ kbq-css-variable(list-size-subheading-padding-horizontal);
161
157
 
162
158
  .kbq-list-text {
163
159
  @include kbq-list-text();
@@ -1,11 +1,12 @@
1
1
  @use 'sass:map';
2
+ @use './tokens' as *;
2
3
 
3
4
 
4
5
  @mixin popup-params($theme) {
5
- $popup: map.get(map.get($theme, components), popup);
6
+ $popup: map.get($theme, components, popup);
6
7
 
7
- box-shadow: map.get($popup, shadow);
8
- border-color: map.get($popup, border);
8
+ box-shadow: kbq-css-variable(popup-shadow, map.get($popup, shadow));
9
+ border-color: kbq-css-variable(popup-border, map.get($popup, border));
9
10
 
10
- background-color: map.get($popup, background);
11
+ background-color: kbq-css-variable(popup-background, map.get($popup, background));
11
12
  }
@@ -3,6 +3,7 @@
3
3
 
4
4
  @use '../common/vendor-prefixes';
5
5
  @use '../tokens';
6
+ @use './tokens' as *;
6
7
 
7
8
 
8
9
  $tokens: meta.module-variables(tokens) !default;
@@ -116,11 +117,9 @@ $tokens: meta.module-variables(tokens) !default;
116
117
  (var(--kbq-select-size-multiple-padding-vertical, $padding-vertical) * 2)
117
118
  );
118
119
 
119
- gap: var(--kbq-select-size-multiple-content-gap, map.get($tokens, select-size-multiple-content-gap));
120
+ gap: kbq-css-variable(select-size-multiple-content-gap);
120
121
 
121
- margin-right: var(
122
- --kbq-select-size-multiple-content-gap, map.get($tokens, select-size-multiple-content-gap)
123
- );
122
+ margin-right: kbq-css-variable(select-size-multiple-content-gap);
124
123
  }
125
124
  }
126
125
  }
@@ -135,9 +134,7 @@ $tokens: meta.module-variables(tokens) !default;
135
134
  flex: 0 0 70px;
136
135
  align-self: center;
137
136
  padding-left: 4px;
138
- padding-right: var(
139
- --kbq-select-size-multiple-content-gap, map.get($tokens, select-size-multiple-content-gap)
140
- );
137
+ padding-right: kbq-css-variable(select-size-multiple-content-gap);
141
138
 
142
139
  text-align: right;
143
140
  }
@@ -175,9 +172,7 @@ $tokens: meta.module-variables(tokens) !default;
175
172
 
176
173
  overflow: hidden;
177
174
 
178
- border-radius: var(
179
- --kbq-select-panel-size-border-radius, map.get($tokens, select-panel-size-border-radius)
180
- );
175
+ border-radius: kbq-css-variable(select-panel-size-border-radius);
181
176
 
182
177
  // Override optgroup and option to scale based on font-size of the trigger.
183
178
  .kbq-optgroup-label,
@@ -194,15 +189,15 @@ $tokens: meta.module-variables(tokens) !default;
194
189
  position: relative;
195
190
 
196
191
  max-width: 100%;
197
- height: var(--kbq-option-size-height, map.get($tokens, option-size-height));
192
+ height: kbq-css-variable(option-size-height);
198
193
 
199
194
  cursor: default;
200
195
  outline: none;
201
196
 
202
- padding-left: var(--kbq-option-size-horizontal-padding, map.get($tokens, option-size-horizontal-padding));
203
- padding-right: var(--kbq-option-size-horizontal-padding, map.get($tokens, option-size-horizontal-padding));
197
+ padding-left: kbq-css-variable(option-size-horizontal-padding);
198
+ padding-right: kbq-css-variable(option-size-horizontal-padding);
204
199
 
205
- border: var(--kbq-option-size-border-width, map.get($tokens, option-size-border-width)) solid transparent;
200
+ border: kbq-css-variable(option-size-border-width) solid transparent;
206
201
  }
207
202
 
208
203
  .kbq-select__search-container {
@@ -214,7 +209,7 @@ $tokens: meta.module-variables(tokens) !default;
214
209
  }
215
210
 
216
211
  %kbq-select-content {
217
- max-height: var(--kbq-select-panel-size-max-height, map.get($tokens, select-panel-size-max-height));
212
+ max-height: kbq-css-variable(select-panel-size-max-height);
218
213
  padding: 4px 0;
219
214
  overflow: hidden auto;
220
215
  }
@@ -229,5 +224,5 @@ $tokens: meta.module-variables(tokens) !default;
229
224
  border-top-width: 1px;
230
225
  border-top-style: solid;
231
226
 
232
- padding: map.get($tokens, size-xxs) map.get($tokens, size-m);
227
+ padding: kbq-css-variable(size-xxs) kbq-css-variable(size-m);
233
228
  }
@@ -9,15 +9,9 @@
9
9
  $tokens: meta.module-variables(tokens) !default;
10
10
 
11
11
 
12
- @function cssVar($name) {
13
- @if string.index($name, light-) {
14
- $short-name: '';
15
-
16
- @each $part in string.split($name, '-light') {
17
- $short-name: $short-name + $part;
18
- }
19
-
20
- @return var(--kbq-#{$short-name}, map.get($tokens, $name));
12
+ @function kbq-css-variable($name, $value: null) {
13
+ @if $value {
14
+ @return var(--kbq-#{$name}, $value);
21
15
  } @else {
22
16
  @return var(--kbq-#{$name}, map.get($tokens, $name));
23
17
  }
@@ -26,3 +20,30 @@ $tokens: meta.module-variables(tokens) !default;
26
20
  @function getToken($name) {
27
21
  @return map.get($tokens, $name);
28
22
  }
23
+
24
+ @mixin kbq-css-font-variable($component, $component-property, $font-property, $font) {
25
+ #{$font-property}: var(
26
+ --kbq-#{$component}-#{$font}#{$component-property}-#{$font-property},
27
+ map.get($tokens, #{$component}-#{$font}#{$component-property}-#{$font-property})
28
+ );
29
+ }
30
+
31
+ @mixin kbq-typography-css-variables($component, $property) {
32
+ @include kbq-css-font-variable($component, $property, font-size, font-);
33
+ @include kbq-css-font-variable($component, $property, font-weight, font-);
34
+ @include kbq-css-font-variable($component, $property, line-height, font-);
35
+ @include kbq-css-font-variable($component, $property, font-family, font-);
36
+ @include kbq-css-font-variable($component, $property, text-transform, font-);
37
+ @include kbq-css-font-variable($component, $property, font-feature-settings, font-);
38
+ @include kbq-css-font-variable($component, $property, letter-spacing, font-);
39
+ }
40
+
41
+ @mixin kbq-typography-level-to-styles_css-variables($component, $property) {
42
+ @include kbq-css-font-variable($component, $property, font-size, '');
43
+ @include kbq-css-font-variable($component, $property, font-weight, '');
44
+ @include kbq-css-font-variable($component, $property, line-height, '');
45
+ @include kbq-css-font-variable($component, $property, font-family, '');
46
+ @include kbq-css-font-variable($component, $property, text-transform, '');
47
+ @include kbq-css-font-variable($component, $property, font-feature-settings, '');
48
+ @include kbq-css-font-variable($component, $property, letter-spacing, '');
49
+ }