@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
@@ -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 {
@@ -62,8 +63,8 @@ $tokens: meta.module-variables(tokens) !default;
62
63
  top: 0;
63
64
  left: 0;
64
65
 
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));
66
+ height: kbq-css-variable(checkbox-size-normal-width);
67
+ width: kbq-css-variable(checkbox-size-normal-width);
67
68
  }
68
69
 
69
70
  .kbq-checkbox {
@@ -101,10 +102,7 @@ $tokens: meta.module-variables(tokens) !default;
101
102
  }
102
103
 
103
104
  & .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
- );
105
+ margin-top: kbq-css-variable(checkbox-size-normal-vertical-content-padding);
108
106
  }
109
107
  }
110
108
 
@@ -121,24 +119,21 @@ $tokens: meta.module-variables(tokens) !default;
121
119
 
122
120
  & .kbq-checkbox__inner-container {
123
121
  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));
122
+ height: kbq-css-variable(checkbox-size-big-width);
123
+ width: kbq-css-variable(checkbox-size-big-width);
126
124
  }
127
125
 
128
126
  & .kbq-checkbox__frame {
129
- border-radius: var(--kbq-checkbox-size-big-border-radius, map.get($tokens, checkbox-size-big-border-radius));
127
+ border-radius: kbq-css-variable(checkbox-size-big-border-radius);
130
128
 
131
129
  border: {
132
- width: var(--kbq-checkbox-size-big-border-width, map.get($tokens, checkbox-size-big-border-width));
130
+ width: kbq-css-variable(checkbox-size-big-border-width);
133
131
  style: solid;
134
132
  }
135
133
  }
136
134
 
137
135
  & .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
- );
136
+ margin-top: kbq-css-variable(checkbox-size-big-vertical-content-padding);
142
137
  }
143
138
  }
144
139
 
@@ -16,6 +16,7 @@
16
16
 
17
17
  ## Example
18
18
 
19
+ <!-- cspell:ignore Э́йяфьядлайё̀кюдль, Эйяфьядлайёкюдль -->
19
20
  ```html
20
21
  <ng-template #customContent>
21
22
  Э́йяфьядлайё̀кюдль — шестой по величине ледник Исландии. Расположен на юге Исландии в 125 км к востоку от Рейкьявика. Под этим ледником находится одноимённый вулкан конической формы.
@@ -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 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
  }
@@ -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,45 +30,35 @@ $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;
53
43
  border-radius: $border-radius $border-radius 0 0;
54
44
  }
55
45
 
46
+ &:has(.kbq-code-block__show-more) {
47
+ .kbq-code-block__code {
48
+ & > code {
49
+ padding-bottom: kbq-css-variable(size-3xl) !important;
50
+ overflow-x: scroll;
51
+ }
52
+ }
53
+ }
54
+
56
55
  .kbq-code-block__code {
57
56
  > code {
58
57
  padding:
59
- var(
60
- --kbq-code-block-size-with-header-content-padding-top,
61
- map.get($tokens, code-block-size-with-header-content-padding-top)
62
- )
63
- var(
64
- --kbq-code-block-size-with-header-content-padding-horizontal,
65
- map.get($tokens, code-block-size-with-header-content-padding-horizontal)
66
- )
67
- var(
68
- --kbq-code-block-size-with-header-content-padding-bottom,
69
- map.get($tokens, code-block-size-with-header-content-padding-bottom)
70
- ) var(
71
- --kbq-code-block-size-with-header-content-padding-horizontal,
72
- map.get($tokens, code-block-size-with-header-content-padding-horizontal)
73
- );
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);
74
62
 
75
63
  border-radius: $border-radius;
76
64
 
@@ -80,10 +68,7 @@ $border-width: var(
80
68
  }
81
69
 
82
70
  .hljs-ln-numbers {
83
- padding-right: var(
84
- --kbq-code-block-size-with-header-content-content-gap-horizontal,
85
- map.get($tokens, code-block-size-with-header-content-content-gap-horizontal)
86
- );
71
+ padding-right: kbq-css-variable(code-block-size-with-header-content-content-gap-horizontal);
87
72
  }
88
73
  }
89
74
 
@@ -124,21 +109,12 @@ $border-width: var(
124
109
 
125
110
  & > code {
126
111
  padding:
127
- var(
128
- --kbq-code-block-size-no-header-content-padding-vertical,
129
- map.get($tokens, code-block-size-no-header-content-padding-vertical)
130
- )
131
- var(
132
- --kbq-code-block-size-no-header-content-padding-horizontal,
133
- map.get($tokens, code-block-size-no-header-content-padding-horizontal)
134
- );
112
+ kbq-css-variable(code-block-size-no-header-content-padding-vertical)
113
+ kbq-css-variable(code-block-size-no-header-content-padding-horizontal);
135
114
  }
136
115
 
137
116
  .hljs-ln-numbers {
138
- padding-right: var(
139
- --kbq-code-block-size-no-header-content-content-gap-horizontal,
140
- map.get($tokens, code-block-size-no-header-content-content-gap-horizontal)
141
- );
117
+ padding-right: kbq-css-variable(code-block-size-no-header-content-content-gap-horizontal);
142
118
  }
143
119
  }
144
120
  }
@@ -209,31 +185,19 @@ $border-width: var(
209
185
  border-radius: $border-radius;
210
186
 
211
187
  &.kbq-code-block__show-more_collapsed {
212
- padding-top: var(
213
- --kbq-code-block-size-collapse-collapsed-padding-top,
214
- map.get($tokens, code-block-size-collapse-collapsed-padding-top)
215
- );
188
+ padding-top: kbq-css-variable(code-block-size-collapse-collapsed-padding-top);
216
189
 
217
- padding-bottom: var(
218
- --kbq-code-block-size-collapse-collapsed-padding-bottom,
219
- map.get($tokens, code-block-size-collapse-collapsed-padding-bottom)
220
- );
190
+ padding-bottom: kbq-css-variable(code-block-size-collapse-collapsed-padding-bottom);
221
191
  }
222
192
 
223
193
  &.kbq-code-block__show-more_expanded {
224
- padding-top: var(
225
- --kbq-code-block-size-collapse-expanded-padding-top,
226
- map.get($tokens, code-block-size-collapse-expanded-padding-top)
227
- );
194
+ padding-top: kbq-css-variable(code-block-size-collapse-expanded-padding-top);
228
195
 
229
- margin-bottom: var(
230
- --kbq-code-block-size-collapse-expanded-padding-bottom,
231
- map.get($tokens, code-block-size-collapse-expanded-padding-bottom)
232
- );
196
+ margin-bottom: kbq-css-variable(code-block-size-collapse-expanded-padding-bottom);
233
197
  }
234
198
 
235
199
  .bg-wrapper {
236
- 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);
237
201
  }
238
202
  }
239
203
  /* stylelint-enable no-descending-specificity */
@@ -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 {