@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
@@ -1,13 +1,12 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
 
4
- @use '../core/styles/tokens';
4
+ @use '../core/styles/common/tokens' as *;
5
5
 
6
- $tokens: meta.module-variables(tokens) !default;
7
6
 
8
7
  .kbq-timezone-select__panel.kbq-select__panel {
9
8
  .kbq-optgroup-label {
10
9
  display: block;
11
- padding: map.get($tokens, timezone-option-size-optgroup-label-padding);
10
+ padding: kbq-css-variable(timezone-option-size-optgroup-label-padding);
12
11
  }
13
12
  }
@@ -2,53 +2,54 @@
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
- @mixin kbq-toast($toast) {
8
- box-shadow: map.get($toast, box-shadow);
8
+ @mixin kbq-toast($component, $style-name) {
9
+ $style: map.get($component, $style-name);
9
10
 
10
- background: map.get($toast, background);
11
+ box-shadow: kbq-css-variable(toast-#{$style-name}-container-box-shadow, map.get($style, box-shadow));
12
+
13
+ background: kbq-css-variable(toast-#{$style-name}-container-background, map.get($style, background));
11
14
 
12
15
  .kbq-toast__title {
13
- color: map.get($toast, title);
16
+ color: kbq-css-variable(toast-#{$style-name}-container-title, map.get($style, title));
14
17
  }
15
18
 
16
19
  .kbq-toast__text {
17
- color: map.get($toast, text);
20
+ color: kbq-css-variable(toast-#{$style-name}-container-text, map.get($style, text));
18
21
  }
19
22
  }
20
23
 
21
24
 
22
25
  @mixin kbq-toast-theme($theme) {
23
- $toast: map.get(map.get($theme, components), toast);
26
+ $toast: map.get($theme, components, toast);
24
27
 
25
28
  .kbq-toast {
26
29
  &.kbq-toast_contrast {
27
- @include kbq-toast(map.get($toast, contrast));
30
+ @include kbq-toast($toast, contrast);
28
31
  }
29
32
 
30
33
  &.kbq-toast_success {
31
- @include kbq-toast(map.get($toast, success));
34
+ @include kbq-toast($toast, success);
32
35
  }
33
36
 
34
37
  &.kbq-toast_warning {
35
- @include kbq-toast(map.get($toast, success));
38
+ @include kbq-toast($toast, success);
36
39
  }
37
40
 
38
41
  &.kbq-toast_error {
39
- @include kbq-toast(map.get($toast, error));
42
+ @include kbq-toast($toast, error);
40
43
  }
41
44
  }
42
45
  }
43
46
 
44
47
  @mixin kbq-toast-typography($config) {
45
- $tokens: map.get($config, tokens);
46
-
47
48
  .kbq-toast {
48
- @include kbq-typography-level-to-styles($config, map.get($tokens, toast-font-text));
49
+ @include kbq-typography-css-variables(toast, text);
49
50
  }
50
51
 
51
52
  .kbq-toast__title {
52
- @include kbq-typography-level-to-styles($config, map.get($tokens, toast-font-title));
53
+ @include kbq-typography-css-variables(toast, title);
53
54
  }
54
55
  }
@@ -1,10 +1,7 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
 
4
- @use '../core/styles/tokens';
5
-
6
-
7
- $tokens: meta.module-variables(tokens) !default;
4
+ @use '../core/styles/common/tokens' as *;
8
5
 
9
6
 
10
7
  .kbq-toast-container {
@@ -12,8 +9,8 @@ $tokens: meta.module-variables(tokens) !default;
12
9
  flex-direction: column;
13
10
  align-items: flex-end;
14
11
 
15
- margin-top: var(--kbq-toast-stack-size-margin-top, map.get($tokens, toast-stack-size-margin-top));
16
- margin-right: var(--kbq-toast-stack-size-margin-right, map.get($tokens, toast-stack-size-margin-right));
12
+ margin-top: kbq-css-variable(toast-stack-size-margin-top);
13
+ margin-right: kbq-css-variable(toast-stack-size-margin-right);
17
14
 
18
- gap: var(--kbq-toast-stack-size-gap, map.get($tokens, toast-stack-size-gap));
15
+ gap: kbq-css-variable(toast-stack-size-gap);
19
16
  }
@@ -1,7 +1,7 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
 
4
- @use '../core/styles/tokens';
4
+ @use '../core/styles/common/tokens' as *;
5
5
 
6
6
 
7
7
  $tokens: meta.module-variables(tokens) !default;
@@ -10,27 +10,27 @@ $tokens: meta.module-variables(tokens) !default;
10
10
  display: flex;
11
11
  box-sizing: border-box;
12
12
 
13
- width: var(--kbq-toast-size-container-width, map.get($tokens, toast-size-container-width));
13
+ width: kbq-css-variable(toast-size-container-width);
14
14
 
15
15
  height: auto;
16
16
 
17
- border-radius: var(--kbq-toast-size-container-border-radius, map.get($tokens, toast-size-container-border-radius));
17
+ border-radius: kbq-css-variable(toast-size-container-border-radius);
18
18
 
19
- padding-left: var(--kbq-toast-size-container-padding-left, map.get($tokens, toast-size-container-padding-left));
20
- padding-right: var(--kbq-toast-size-container-padding-right, map.get($tokens, toast-size-container-padding-right));
19
+ padding-left: kbq-css-variable(toast-size-container-padding-left);
20
+ padding-right: kbq-css-variable(toast-size-container-padding-right);
21
21
  }
22
22
 
23
23
  .kbq-toast__icon-container {
24
- width: var(--kbq-toast-size-icon-width, map.get($tokens, toast-size-icon-width));
25
- max-width: var(--kbq-toast-size-icon-width, map.get($tokens, toast-size-icon-width));
26
- height: var(--kbq-toast-size-icon-height, map.get($tokens, toast-size-icon-height));
27
- max-height: var(--kbq-toast-size-icon-height, map.get($tokens, toast-size-icon-height));
24
+ width: kbq-css-variable(toast-size-icon-width);
25
+ max-width: kbq-css-variable(toast-size-icon-width);
26
+ height: kbq-css-variable(toast-size-icon-height);
27
+ max-height: kbq-css-variable(toast-size-icon-height);
28
28
 
29
- border-radius: var(--kbq-toast-size-border-raius, map.get($tokens, toast-size-border-raius));
29
+ border-radius: kbq-css-variable(toast-size-border-raius);
30
30
 
31
- margin-right: var(--kbq-toast-size-icon-margin-right, map.get($tokens, toast-size-icon-margin-right));
31
+ margin-right: kbq-css-variable(toast-size-icon-margin-right);
32
32
 
33
- padding-top: var(--kbq-toast-size-content-padding-top, map.get($tokens, toast-size-content-padding-top));
33
+ padding-top: kbq-css-variable(toast-size-content-padding-top);
34
34
  }
35
35
 
36
36
  .kbq-toast__container {
@@ -39,9 +39,9 @@ $tokens: meta.module-variables(tokens) !default;
39
39
 
40
40
  flex: 1;
41
41
 
42
- padding-top: var(--kbq-toast-size-content-padding-top, map.get($tokens, toast-size-content-padding-top));
43
- padding-right: map.get($tokens, size-s);
44
- padding-bottom: var(--kbq-toast-size-content-padding-bottom, map.get($tokens, toast-size-content-padding-bottom));
42
+ padding-top: kbq-css-variable(toast-size-content-padding-top);
43
+ padding-right: kbq-css-variable(size-s);
44
+ padding-bottom: kbq-css-variable(toast-size-content-padding-bottom);
45
45
  }
46
46
 
47
47
  .kbq-toast__title {
@@ -51,7 +51,7 @@ $tokens: meta.module-variables(tokens) !default;
51
51
  }
52
52
 
53
53
  .kbq-toast__title_with-content {
54
- padding-bottom: var(--kbq-toast-size-caption-padding-bottom, map.get($tokens, toast-size-caption-padding-bottom));
54
+ padding-bottom: kbq-css-variable(toast-size-caption-padding-bottom);
55
55
  }
56
56
 
57
57
  .kbq-toast__text {
@@ -68,17 +68,12 @@ $tokens: meta.module-variables(tokens) !default;
68
68
  .kbq-toast__actions {
69
69
  display: flex;
70
70
 
71
- padding-top: var(--kbq-toast-size-button-stack-padding-top, map.get($tokens, toast-size-button-stack-padding-top));
71
+ padding-top: kbq-css-variable(toast-size-button-stack-padding-top);
72
72
 
73
- gap: var(
74
- --kbq-toast-size-button-stack-content-gap-horizontal,
75
- map.get($tokens, toast-size-button-stack-content-gap-horizontal)
76
- );
73
+ gap: kbq-css-variable(toast-size-button-stack-content-gap-horizontal);
77
74
  }
78
75
 
79
76
  .kbq-toast__close-button {
80
- margin-top: var(--kbq-toast-size-close-button-margin-top, map.get($tokens, toast-size-close-button-margin-top));
81
- margin-right: var(
82
- --kbq-toast-size-close-button-margin-right, map.get($tokens, toast-size-close-button-margin-right)
83
- );
77
+ margin-top: kbq-css-variable(toast-size-close-button-margin-top);
78
+ margin-right: kbq-css-variable(toast-size-close-button-margin-right);
84
79
  }
@@ -3,104 +3,110 @@
3
3
 
4
4
  @use '../core/styles/theming/theming' as *;
5
5
  @use '../core/styles/typography/typography-utils' as *;
6
+ @use '../core/styles/common/tokens' as *;
6
7
 
7
8
 
8
- @mixin kbq-toggle-state($state) {
9
+ @mixin kbq-toggle-state($component, $type, $state-name) {
10
+ $state: map.get($component, $type, $state-name);
11
+ $base: toggle-#{$type}-#{$state-name};
12
+
9
13
  .kbq-toggle-bar {
10
- border-color: map.get($state, border);
11
- background: map.get($state, background);
14
+ border-color: kbq-css-variable(#{$base}-border, map.get($state, border));
15
+ background: kbq-css-variable(#{$base}-background, map.get($state, background));
12
16
  }
13
17
 
14
18
  .kbq-toggle__circle {
15
- background: map.get($state, circle-background);
16
- }
17
- }
18
-
19
- @mixin kbq-toggle-focused-state($state) {
20
- & .kbq-toggle-bar {
21
- border-color: map.get($state, focus-outline);
22
- box-shadow: 0 0 0 1px map.get($state, focus-outline);
19
+ background: kbq-css-variable(#{$base}-circle-background, map.get($state, circle-background));
23
20
  }
24
21
  }
25
22
 
26
- @mixin kbq-toggle-color($toggle) {
27
- @include kbq-toggle-state(map.get($toggle, default));
23
+ @mixin kbq-toggle-color($component, $type) {
24
+ @include kbq-toggle-state($component, $type, default);
28
25
 
29
26
  &:hover {
30
- @include kbq-toggle-state(map.get($toggle, hover));
27
+ @include kbq-toggle-state($component, $type, states-hover);
31
28
  }
32
29
 
33
30
  &.kbq-active {
34
- @include kbq-toggle-state(map.get($toggle, checked));
31
+ @include kbq-toggle-state($component, $type, states-checked);
35
32
  }
36
33
 
37
34
  &.kbq-active:hover {
38
- @include kbq-toggle-state(map.get($toggle, checked-hover));
35
+ @include kbq-toggle-state($component, $type, states-checked-hover);
39
36
  }
40
37
 
41
38
  &.cdk-keyboard-focused {
42
- $focused: map.get($toggle, focused);
43
-
44
- @include kbq-toggle-state($focused);
45
- @include kbq-toggle-focused-state($focused);
39
+ @include kbq-toggle-state($component, $type, states-focused);
40
+
41
+ & .kbq-toggle-bar {
42
+ border-color: kbq-css-variable(
43
+ toggle-#{$type}-states-focused-focus-outline,
44
+ map.get($component, $type, states-focused, focus-outline)
45
+ );
46
+ box-shadow: 0 0 0 1px kbq-css-variable(
47
+ toggle-#{$type}-states-focused-focus-outline,
48
+ map.get($component, $type, states-focused, focus-outline)
49
+ );
50
+ }
46
51
  }
47
52
 
48
53
  &.kbq-active.cdk-keyboard-focused {
49
- $checked-focused: map.get($toggle, checked-focused);
50
-
51
- @include kbq-toggle-state($checked-focused);
52
- @include kbq-toggle-focused-state($checked-focused);
54
+ @include kbq-toggle-state($component, $type, states-checked-focused);
55
+
56
+ & .kbq-toggle-bar {
57
+ border-color: kbq-css-variable(
58
+ toggle-#{$type}-states-checked-focused-focus-outline,
59
+ map.get($component, $type, states-checked-focused, focus-outline)
60
+ );
61
+ box-shadow: 0 0 0 1px kbq-css-variable(
62
+ toggle-#{$type}-states-checked-focused-focus-outline,
63
+ map.get($component, $type, states-checked-focused, focus-outline)
64
+ );
65
+ }
53
66
  }
54
67
 
55
68
  &.kbq-disabled,
56
69
  &.kbq-active.kbq-disabled {
57
- @include kbq-toggle-state(map.get($toggle, disabled));
70
+ @include kbq-toggle-state($component, $type, states-disabled);
58
71
  }
59
72
  }
60
73
 
61
74
  @mixin kbq-toggle-theme($theme) {
62
- $foreground: map.get($theme, foreground);
63
-
64
- $toggle: map.get(map.get($theme, components), toggle);
65
-
66
- $toggle-theme: map.get($toggle, theme);
67
- $toggle-error: map.get($toggle, error);
75
+ $toggle: map.get($theme, components, toggle);
68
76
 
69
77
  .kbq-toggle {
70
- color: map.get($foreground, contrast);
78
+ color: kbq-css-variable(foreground-contrast, map.get($theme, foreground, contrast));
71
79
 
72
- @include kbq-toggle-color($toggle-theme);
80
+ @include kbq-toggle-color($toggle, theme);
73
81
 
74
82
  &.kbq-error {
75
- @include kbq-toggle-color($toggle-error);
83
+ @include kbq-toggle-color($toggle, error);
76
84
  }
77
85
  }
78
86
  }
79
87
 
80
88
  @mixin kbq-toggle-typography($config) {
81
- $tokens: map.get($config, tokens);
82
-
83
89
  .kbq-toggle:not(.kbq-toggle_big) {
84
- @include kbq-typography-level-to-styles($config, map.get($tokens, toggle-font-normal-label));
90
+ @include kbq-typography-css-variables(toggle, normal-label);
85
91
 
86
92
  & .kbq-hint {
87
- @include kbq-typography-level-to-styles($config, map.get($tokens, toggle-font-normal-caption));
93
+ @include kbq-typography-css-variables(toggle, normal-caption);
88
94
  }
89
95
 
90
96
  & .kbq-toggle-bar-container {
91
- height: kbq-line-height($config, map.get($tokens, toggle-font-normal-label));
97
+ @include kbq-css-font-variable(toggle, normal-caption, line-height, font-);
92
98
  }
93
99
  }
94
100
 
95
101
  .kbq-toggle.kbq-toggle_big {
96
- @include kbq-typography-level-to-styles($config, map.get($tokens, toggle-font-big-label));
102
+ @include kbq-typography-css-variables(toggle, big-label);
97
103
 
98
104
  & .kbq-hint {
99
- @include kbq-typography-level-to-styles($config, map.get($tokens, toggle-font-big-caption));
105
+ @include kbq-typography-css-variables(toggle, big-caption);
100
106
  }
101
107
 
102
108
  & .kbq-toggle-bar-container {
103
- height: kbq-line-height($config, map.get($tokens, toggle-font-big-label));
109
+ @include kbq-css-font-variable(toggle, big-label, line-height, font-);
104
110
  }
105
111
  }
106
112
  }
@@ -1,7 +1,7 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
 
4
- @use '../core/styles/tokens';
4
+ @use '../core/styles/common/tokens' as *;
5
5
 
6
6
 
7
7
  $tokens: meta.module-variables(tokens) !default;
@@ -50,15 +50,12 @@ $tokens: meta.module-variables(tokens) !default;
50
50
  radius: 8px;
51
51
  }
52
52
 
53
- height: var(--kbq-toggle-size-normal-height, map.get($tokens, toggle-size-normal-height));
54
- width: var(--kbq-toggle-size-normal-width, map.get($tokens, toggle-size-normal-width));
53
+ height: kbq-css-variable(toggle-size-normal-height);
54
+ width: kbq-css-variable(toggle-size-normal-width);
55
55
  }
56
56
 
57
57
  .kbq-hint {
58
- margin-top: var(
59
- --kbq-toggle-size-normal-vertical-content-padding,
60
- map.get($tokens, toggle-size-normal-vertical-content-padding)
61
- );
58
+ margin-top: kbq-css-variable(toggle-size-normal-vertical-content-padding);
62
59
  }
63
60
  }
64
61
 
@@ -69,31 +66,22 @@ $tokens: meta.module-variables(tokens) !default;
69
66
  flex: 1;
70
67
 
71
68
  &.left {
72
- margin-right: var(
73
- --kbq-toggle-size-normal-horizontal-content-padding,
74
- map.get($tokens, toggle-size-normal-horizontal-content-padding)
75
- );
69
+ margin-right: kbq-css-variable(toggle-size-normal-horizontal-content-padding);
76
70
  }
77
71
 
78
72
  &.right {
79
- margin-left: var(
80
- --kbq-toggle-size-normal-horizontal-content-padding,
81
- map.get($tokens, toggle-size-normal-horizontal-content-padding)
82
- );
73
+ margin-left: kbq-css-variable(toggle-size-normal-horizontal-content-padding);
83
74
  }
84
75
  }
85
76
 
86
77
  .kbq-toggle.kbq-toggle_big {
87
78
  & .kbq-toggle-bar {
88
- height: var(--kbq-toggle-size-big-height, map.get($tokens, toggle-size-big-height));
89
- width: var(--kbq-toggle-size-big-width, map.get($tokens, toggle-size-big-width));
79
+ height: kbq-css-variable(toggle-size-big-height);
80
+ width: kbq-css-variable(toggle-size-big-width);
90
81
  }
91
82
 
92
83
  & .kbq-hint {
93
- margin-top: var(
94
- --kbq-toggle-size-big-vertical-content-padding,
95
- map.get($tokens, toggle-size-big-vertical-content-padding)
96
- );
84
+ margin-top: kbq-css-variable(toggle-size-big-vertical-content-padding);
97
85
  }
98
86
  }
99
87
 
@@ -3,47 +3,44 @@
3
3
 
4
4
  @use '../core/pop-up/pop-up' as *;
5
5
  @use '../core/styles/typography/typography-utils' as *;
6
+ @use '../core/styles/common/tokens' as *;
6
7
 
7
8
 
8
- @mixin kbq-tooltip-color($tooltip) {
9
- box-shadow: map.get($tooltip, shadow);
9
+ @mixin kbq-tooltip-color($component, $style-name) {
10
+ $style: map.get($component, $style-name);
11
+
12
+ box-shadow: kbq-css-variable(tooltip-#{$style-name}-shadow, map.get($style, shadow));
10
13
 
11
14
  & .kbq-tooltip__inner {
12
- color: map.get($tooltip, text);
15
+ color: kbq-css-variable(tooltip-#{$style-name}-text, map.get($style, text));
13
16
 
14
- background-color: map.get($tooltip, background);
17
+ background-color: kbq-css-variable(tooltip-#{$style-name}-background, map.get($style, background));
15
18
  }
16
19
 
17
20
  & .kbq-tooltip__arrow {
18
- background-color: map.get($tooltip, background);
19
- box-shadow: map.get($tooltip, shadow);
21
+ background-color: kbq-css-variable(tooltip-#{$style-name}-background, map.get($style, background));
22
+ box-shadow: kbq-css-variable(tooltip-#{$style-name}-shadow, map.get($style, shadow));
20
23
  }
21
24
  }
22
25
 
23
26
  @mixin kbq-tooltip-theme($theme) {
24
27
  $tooltip: map.get(map.get($theme, components), tooltip);
25
28
 
26
- $theme-fade-off: map.get($tooltip, theme-fade-off);
27
- $contrast-fade-off: map.get($tooltip, contrast-fade-off);
28
- $contrast-fade-on: map.get($tooltip, contrast-fade-on);
29
-
30
29
  .kbq-tooltip.kbq-theme {
31
- @include kbq-tooltip-color($theme-fade-off);
30
+ @include kbq-tooltip-color($tooltip, theme-fade-off);
32
31
  }
33
32
 
34
33
  .kbq-tooltip.kbq-contrast {
35
- @include kbq-tooltip-color($contrast-fade-off);
34
+ @include kbq-tooltip-color($tooltip, contrast-fade-off);
36
35
  }
37
36
 
38
37
  .kbq-tooltip.kbq-contrast-fade {
39
- @include kbq-tooltip-color($contrast-fade-on);
38
+ @include kbq-tooltip-color($tooltip, contrast-fade-on);
40
39
  }
41
40
  }
42
41
 
43
42
  @mixin kbq-tooltip-typography($config) {
44
- $tokens: map.get($config, tokens);
45
-
46
43
  .kbq-tooltip {
47
- @include kbq-typography-level-to-styles($config, map.get($tokens, tooltip-font-default));
44
+ @include kbq-typography-css-variables(tooltip, default);
48
45
  }
49
46
  }
@@ -3,42 +3,40 @@
3
3
 
4
4
  @use '../core/pop-up/pop-up';
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
  $trigger-margin: 8px;
12
10
 
13
11
 
14
12
  .kbq-tooltip__inner {
15
- border-radius: var(--kbq-tooltip-size-border-radius, map.get($tokens, tooltip-size-border-radius));
13
+ border-radius: kbq-css-variable(tooltip-size-border-radius);
16
14
  word-break: break-word;
17
15
  }
18
16
 
19
17
  .kbq-tooltip {
20
18
  box-sizing: border-box;
21
19
 
22
- border-radius: var(--kbq-tooltip-size-border-radius, map.get($tokens, tooltip-size-border-radius));
20
+ border-radius: kbq-css-variable(tooltip-size-border-radius);
23
21
 
24
22
  white-space: pre-line;
25
23
 
26
24
  @include pop-up.popup-margins(kbq-tooltip, $trigger-margin);
27
25
 
28
- max-width: var(--kbq-tooltip-size-max-width, map.get($tokens, tooltip-size-max-width));
26
+ max-width: kbq-css-variable(tooltip-size-max-width);
29
27
 
30
28
  .kbq-tooltip__inner {
31
29
  padding:
32
- var(--kbq-tooltip-size-padding-vertical, map.get($tokens, tooltip-size-padding-vertical))
33
- var(--kbq-tooltip-size-padding-horizontal, map.get($tokens, tooltip-size-padding-horizontal));
30
+ kbq-css-variable(tooltip-size-padding-vertical)
31
+ kbq-css-variable(tooltip-size-padding-horizontal);
34
32
  }
35
33
  }
36
34
 
37
35
  .kbq-tooltip__arrow {
38
36
  position: absolute;
39
37
 
40
- width: var(--kbq-tooltip-size-arrow-size, map.get($tokens, tooltip-size-arrow-size));
41
- height: var(--kbq-tooltip-size-arrow-size, map.get($tokens, tooltip-size-arrow-size));
38
+ width: kbq-css-variable(tooltip-size-arrow-size);
39
+ height: kbq-css-variable(tooltip-size-arrow-size);
42
40
 
43
41
  transform: rotate(45deg);
44
42
 
@@ -3,30 +3,28 @@
3
3
 
4
4
  @use '../core/styles/theming/theming' as *;
5
5
  @use '../core/styles/typography/typography-utils' as *;
6
+ @use '../core/styles/common/tokens' as *;
6
7
 
7
8
 
8
- @mixin kbq-tree-option($state) {
9
- background: map.get($state, container-background);
9
+ @mixin kbq-tree-option($component, $state-name) {
10
+ $state: map.get($component, $state-name);
11
+
12
+ background: kbq-css-variable(tree-#{$state-name}-container-background, map.get($state, container-background));
10
13
 
11
14
  .kbq-option-text {
12
- color: map.get($state, text);
15
+ color: kbq-css-variable(tree-#{$state-name}-text, map.get($state, text));
13
16
  }
14
17
 
15
- // todo выглядит как баг
16
- //.kbq-icon {
17
- // color: map.get($state, icon);
18
- //}
19
-
20
18
  .kbq-tree-node-toggle .kbq-icon {
21
- color: map.get($state, tree-toggle);
19
+ color: kbq-css-variable(tree-#{$state-name}-tree-toggle, map.get($state, tree-toggle));
22
20
  }
23
21
 
24
22
  .kbq-option-action .kbq-icon {
25
- color: map.get($state, action-button);
23
+ color: kbq-css-variable(tree-#{$state-name}-action-button, map.get($state, action-button));
26
24
  }
27
25
 
28
26
  .kbq-option-caption {
29
- color: map.get($state, caption);
27
+ color: kbq-css-variable(tree-#{$state-name}-caption, map.get($state, caption));
30
28
  }
31
29
  }
32
30
 
@@ -37,29 +35,31 @@
37
35
  }
38
36
 
39
37
  .kbq-tree-option {
40
- $tree-item: map.get(map.get($theme, components), tree-item);
38
+ $tree-item: map.get($theme, components, tree-item);
41
39
 
42
- @include kbq-tree-option(map.get($tree-item, default));
40
+ @include kbq-tree-option($tree-item, default);
43
41
 
44
42
  &:hover:not(.kbq-disabled) {
45
- @include kbq-tree-option(map.get($tree-item, hover));
43
+ @include kbq-tree-option($tree-item, states-hover);
46
44
  }
47
45
 
48
46
  &.kbq-focused,
49
47
  &.kbq-active {
50
- border-color: map.get(map.get($tree-item, focused), focus-outline);
48
+ border-color: kbq-css-variable(
49
+ tree-states-focused-focus-outline, map.get($tree-item, states-focused, focus-outline)
50
+ );
51
51
  }
52
52
 
53
53
  &.kbq-selected {
54
- @include kbq-tree-option(map.get($tree-item, selected));
54
+ @include kbq-tree-option($tree-item, states-selected);
55
55
 
56
56
  &:hover:not(.kbq-disabled) {
57
- @include kbq-tree-option(map.get($tree-item, selected-hover));
57
+ @include kbq-tree-option($tree-item, states-selected-hover);
58
58
  }
59
59
  }
60
60
 
61
61
  &.kbq-disabled {
62
- @include kbq-tree-option(map.get($tree-item, disabled));
62
+ @include kbq-tree-option($tree-item, states-disabled);
63
63
 
64
64
  & .kbq-icon {
65
65
  cursor: default;
@@ -69,13 +69,11 @@
69
69
  }
70
70
 
71
71
  @mixin kbq-tree-typography($config) {
72
- $tokens: map.get($config, tokens);
73
-
74
72
  .kbq-tree-option {
75
- @include kbq-typography-level-to-styles($config, map.get($tokens, tree-font-text));
73
+ @include kbq-typography-css-variables(tree, text);
76
74
  }
77
75
 
78
76
  .kbq-tree-option-caption {
79
- @include kbq-typography-level-to-styles($config, map.get($tokens, tree-font-caption));
77
+ @include kbq-typography-css-variables(tree, caption);
80
78
  }
81
79
  }
package/tree/toggle.scss CHANGED
@@ -1,11 +1,9 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
 
4
- @use '../core/styles/tokens';
4
+ @use '../core/styles/common/tokens' as *;
5
5
 
6
6
 
7
- $tokens: meta.module-variables(tokens) !default;
8
-
9
7
  .kbq-tree-node-toggle {
10
8
  display: flex;
11
9
  align-items: center;
@@ -14,8 +12,8 @@ $tokens: meta.module-variables(tokens) !default;
14
12
 
15
13
  height: 100%;
16
14
 
17
- padding-left: var(--kbq-tree-size-toggle-padding, map.get($tokens, tree-size-toggle-padding));
18
- padding-right: var(--kbq-tree-size-toggle-padding, map.get($tokens, tree-size-toggle-padding));
15
+ padding-left: kbq-css-variable(tree-size-toggle-padding);
16
+ padding-right: kbq-css-variable(tree-size-toggle-padding);
19
17
 
20
18
  cursor: pointer;
21
19
 
@@ -41,7 +41,7 @@ export declare class KbqTreeBase<T> implements AfterContentChecked, CollectionVi
41
41
  /**
42
42
  * Provides a stream containing the latest data array to render. Influenced by the tree's
43
43
  * stream of view window (what dataNodes are currently on screen).
44
- * Data source can be an observable of data array, or a dara array to render.
44
+ * Data source can be an observable of data array, or a data array to render.
45
45
  */
46
46
  get dataSource(): DataSource<T> | Observable<T[]> | T[];
47
47
  set dataSource(dataSource: DataSource<T> | Observable<T[]> | T[]);