@koobiq/components 17.0.0-rc.6 → 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 (193) hide show
  1. package/alert/_alert-theme.scss +19 -33
  2. package/alert/alert.component.scss +41 -136
  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/_code-block-theme.scss +27 -26
  18. package/code-block/actionbar.component.scss +7 -18
  19. package/code-block/code-block.scss +21 -66
  20. package/core/forms/_forms-theme.scss +4 -7
  21. package/core/forms/_forms.scss +13 -42
  22. package/core/option/_optgroup-theme.scss +4 -5
  23. package/core/option/_option-action-theme.scss +7 -7
  24. package/core/option/_option-theme.scss +16 -20
  25. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -19
  26. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +9 -8
  27. package/core/styles/common/_groups.scss +3 -5
  28. package/core/styles/common/_list.scss +14 -18
  29. package/core/styles/common/_popup.scss +5 -4
  30. package/core/styles/common/_select.scss +11 -16
  31. package/core/styles/common/_tokens.scss +30 -9
  32. package/core/styles/theming/_components-theming.scss +151 -131
  33. package/core/styles/visual/_layout.scss +14 -16
  34. package/datepicker/_datepicker-theme.scss +24 -39
  35. package/datepicker/calendar-body.scss +3 -8
  36. package/datepicker/calendar-header.scss +4 -9
  37. package/datepicker/calendar.scss +5 -16
  38. package/datepicker/datepicker-content.scss +4 -12
  39. package/datepicker/datepicker-input.scss +0 -4
  40. package/datepicker/datepicker-toggle.scss +3 -2
  41. package/divider/_divider-theme.scss +3 -1
  42. package/divider/divider.scss +9 -25
  43. package/dl/_dl-theme.scss +5 -6
  44. package/dl/dl.scss +5 -19
  45. package/dropdown/_dropdown-theme.scss +21 -21
  46. package/dropdown/dropdown-item.scss +3 -11
  47. package/dropdown/dropdown.scss +6 -14
  48. package/esm2022/alert/alert.component.mjs +2 -2
  49. package/esm2022/button/button.component.mjs +13 -6
  50. package/esm2022/code-block/actionbar.component.mjs +2 -2
  51. package/esm2022/code-block/code-block.component.mjs +2 -2
  52. package/esm2022/core/version.mjs +2 -2
  53. package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
  54. package/esm2022/file-upload/single-file-upload.component.mjs +2 -2
  55. package/esm2022/form-field/form-field.mjs +2 -2
  56. package/esm2022/icon/icon-item.component.mjs +16 -6
  57. package/esm2022/markdown/markdown.component.mjs +2 -2
  58. package/esm2022/navbar/navbar-item.component.mjs +2 -2
  59. package/esm2022/navbar/navbar.component.mjs +2 -2
  60. package/esm2022/navbar/vertical-navbar.component.mjs +2 -2
  61. package/esm2022/popover/popover-confirm.component.mjs +3 -3
  62. package/esm2022/popover/popover.component.mjs +3 -3
  63. package/esm2022/scrollbar/scrollbar.component.mjs +2 -2
  64. package/esm2022/select/select.component.mjs +3 -3
  65. package/esm2022/tabs/tab-group.component.mjs +2 -2
  66. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
  67. package/esm2022/timepicker/timepicker.directive.mjs +10 -2
  68. package/esm2022/timezone/timezone-select.component.mjs +2 -2
  69. package/esm2022/title/title.directive.mjs +2 -2
  70. package/esm2022/toast/toast.component.mjs +3 -3
  71. package/esm2022/tree-select/tree-select.component.mjs +3 -3
  72. package/fesm2022/koobiq-components-alert.mjs +2 -2
  73. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  74. package/fesm2022/koobiq-components-button.mjs +12 -5
  75. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  76. package/fesm2022/koobiq-components-code-block.mjs +4 -4
  77. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  78. package/fesm2022/koobiq-components-core.mjs +1 -1
  79. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  80. package/fesm2022/koobiq-components-file-upload.mjs +4 -4
  81. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  82. package/fesm2022/koobiq-components-form-field.mjs +2 -2
  83. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  84. package/fesm2022/koobiq-components-icon.mjs +14 -4
  85. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  86. package/fesm2022/koobiq-components-markdown.mjs +2 -2
  87. package/fesm2022/koobiq-components-navbar.mjs +6 -6
  88. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  89. package/fesm2022/koobiq-components-popover.mjs +4 -4
  90. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  91. package/fesm2022/koobiq-components-scrollbar.mjs +2 -2
  92. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  93. package/fesm2022/koobiq-components-select.mjs +2 -2
  94. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  95. package/fesm2022/koobiq-components-tabs.mjs +4 -4
  96. package/fesm2022/koobiq-components-timepicker.mjs +9 -1
  97. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  98. package/fesm2022/koobiq-components-timezone.mjs +2 -2
  99. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  100. package/fesm2022/koobiq-components-title.mjs +1 -1
  101. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  102. package/fesm2022/koobiq-components-toast.mjs +2 -2
  103. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  104. package/fesm2022/koobiq-components-tree-select.mjs +2 -2
  105. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  106. package/file-upload/_file-upload-theme.scss +109 -68
  107. package/file-upload/file-upload.scss +0 -5
  108. package/file-upload/multiple-file-upload.component.scss +32 -98
  109. package/file-upload/single-file-upload.component.scss +12 -31
  110. package/form-field/_form-field-theme.scss +32 -34
  111. package/form-field/_hint-theme.scss +16 -19
  112. package/form-field/cleaner.scss +3 -8
  113. package/form-field/form-field.scss +11 -12
  114. package/form-field/hint.scss +3 -7
  115. package/form-field/password-toggle.scss +3 -9
  116. package/form-field/stepper.scss +4 -10
  117. package/icon/_icon-button-theme.scss +35 -35
  118. package/icon/_icon-item-theme.scss +46 -31
  119. package/icon/_icon-theme.scss +9 -15
  120. package/icon/icon-button.scss +5 -17
  121. package/icon/icon-item.component.d.ts +3 -1
  122. package/icon/icon-item.scss +12 -7
  123. package/icon/icon.scss +0 -5
  124. package/input/_input-theme.scss +2 -3
  125. package/input/input.scss +2 -1
  126. package/link/_link-theme.scss +25 -42
  127. package/list/_list-theme.scss +18 -17
  128. package/list/list.scss +0 -4
  129. package/loader-overlay/_loader-overlay-theme.scss +13 -16
  130. package/loader-overlay/loader-overlay.scss +9 -32
  131. package/markdown/_markdown-theme.scss +41 -44
  132. package/markdown/markdown.scss +38 -88
  133. package/modal/_modal-confirm.scss +2 -6
  134. package/modal/_modal-theme.scss +11 -12
  135. package/modal/modal.scss +18 -24
  136. package/navbar/_navbar-item_horizontal.scss +24 -27
  137. package/navbar/_navbar-item_vertical.scss +28 -27
  138. package/navbar/_navbar-theme.scss +21 -22
  139. package/navbar/navbar-brand.scss +24 -26
  140. package/navbar/navbar-divider.scss +4 -7
  141. package/navbar/navbar-item.scss +5 -13
  142. package/navbar/navbar.scss +2 -5
  143. package/navbar/vertical-navbar.scss +3 -5
  144. package/package.json +9 -9
  145. package/popover/_popover-theme.scss +9 -16
  146. package/popover/popover.scss +18 -24
  147. package/prebuilt-themes/dark-theme.css +1 -1
  148. package/prebuilt-themes/light-theme.css +1 -1
  149. package/progress-bar/_progress-bar-theme.scss +7 -10
  150. package/progress-bar/progress-bar.scss +6 -18
  151. package/progress-spinner/_progress-spinner-theme.scss +6 -7
  152. package/progress-spinner/progress-spinner.scss +8 -17
  153. package/radio/_radio-theme.scss +29 -37
  154. package/radio/radio.scss +17 -38
  155. package/risk-level/_risk-level-theme.scss +25 -30
  156. package/risk-level/risk-level.component.scss +5 -8
  157. package/schematics/ng-add/index.js +6 -6
  158. package/scrollbar/_scrollbar-component-theme.scss +14 -17
  159. package/scrollbar/scrollbar.component.scss +7 -20
  160. package/select/_select-theme.scss +14 -15
  161. package/select/select.scss +3 -10
  162. package/sidepanel/_sidepanel-theme.scss +8 -9
  163. package/sidepanel/sidepanel.scss +19 -30
  164. package/splitter/_splitter-theme.scss +3 -3
  165. package/table/_table-theme.scss +9 -8
  166. package/table/table.scss +12 -12
  167. package/tabs/_tabs-common.scss +4 -7
  168. package/tabs/_tabs-theme.scss +77 -44
  169. package/tabs/tab-group.scss +2 -7
  170. package/tabs/tab-header.scss +0 -4
  171. package/tabs/tab-nav-bar/tab-nav-bar.scss +2 -7
  172. package/tags/_tag-theme.scss +23 -26
  173. package/tags/tag-list.scss +6 -5
  174. package/tags/tag.scss +6 -9
  175. package/textarea/_textarea-theme.scss +2 -4
  176. package/textarea/textarea.scss +4 -6
  177. package/timepicker/timepicker.scss +2 -7
  178. package/timezone/_timezone-option-theme.scss +8 -9
  179. package/timezone/timezone-option.component.scss +5 -7
  180. package/timezone/timezone-select.component.scss +2 -3
  181. package/toast/_toast-theme.scss +15 -14
  182. package/toast/toast-container.component.scss +4 -7
  183. package/toast/toast.component.scss +20 -25
  184. package/toggle/_toggle-theme.scss +48 -42
  185. package/toggle/toggle.scss +9 -21
  186. package/tooltip/_tooltip-theme.scss +13 -16
  187. package/tooltip/tooltip.scss +8 -10
  188. package/tree/_tree-theme.scss +20 -22
  189. package/tree/toggle.scss +3 -5
  190. package/tree/tree-option.scss +5 -6
  191. package/tree-select/_tree-select-theme.scss +11 -13
  192. package/tree-select/tree-select.scss +0 -4
  193. package/core/styles/_variables.scss +0 -1
@@ -3,11 +3,9 @@
3
3
 
4
4
  @use '../core/styles/common/button';
5
5
 
6
- @use '../core/styles/tokens';
6
+ @use '../core/styles/common/tokens' as *;
7
7
 
8
8
 
9
- $tokens: meta.module-variables(tokens) !default;
10
-
11
9
  %kbq-button-base {
12
10
  @include button.kbq-button-reset();
13
11
 
@@ -21,8 +19,8 @@ $tokens: meta.module-variables(tokens) !default;
21
19
 
22
20
  margin: 0; /* Safari */
23
21
 
24
- height: var(--kbq-button-size-height, map.get($tokens, button-size-height));
25
- min-height: var(--kbq-button-size-height, map.get($tokens, button-size-height));
22
+ height: kbq-css-variable(button-size-height);
23
+ min-height: kbq-css-variable(button-size-height);
26
24
 
27
25
  white-space: nowrap;
28
26
 
@@ -31,8 +29,8 @@ $tokens: meta.module-variables(tokens) !default;
31
29
 
32
30
  vertical-align: baseline;
33
31
 
34
- border: var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width)) solid transparent;
35
- border-radius: var(--kbq-button-size-border-radius, map.get($tokens, button-size-border-radius));
32
+ border: kbq-css-variable(button-size-border-width) solid transparent;
33
+ border-radius: kbq-css-variable(button-size-border-radius);
36
34
 
37
35
  &::-moz-focus-inner {
38
36
  border: 0;
@@ -56,14 +54,10 @@ $tokens: meta.module-variables(tokens) !default;
56
54
  }
57
55
 
58
56
  & .kbq-icon_left {
59
- margin-right: var(
60
- --kbq-button-size-content-padding, map.get($tokens, button-size-content-padding)
61
- );
57
+ margin-right: kbq-css-variable(button-size-content-padding);
62
58
  }
63
59
 
64
60
  & .kbq-icon_right {
65
- margin-left: var(
66
- --kbq-button-size-content-padding, map.get($tokens, button-size-content-padding)
67
- );
61
+ margin-left: kbq-css-variable(button-size-content-padding);
68
62
  }
69
63
  }
@@ -2,6 +2,7 @@
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
  @mixin _icon($left-icon, $right-icon) {
@@ -18,85 +19,43 @@
18
19
  }
19
20
  }
20
21
 
21
- @mixin kbq-filled-button($params) {
22
- border-color: map.get($params, border);
23
- color: map.get($params, foreground);
24
- background: map.get($params, background);
22
+ @mixin kbq-button-type($component, $type, $sub-type) {
23
+ $style: map.get($component, $type, $sub-type);
24
+ $base-path: button-#{$type}-#{$sub-type};
25
25
 
26
- @include _icon(map.get($params, left-icon), map.get($params, right-icon));
26
+ border-color: kbq-css-variable(#{$base-path}-border, map.get($style, border));
27
+ color: kbq-css-variable(#{$base-path}-foreground, map.get($style, foreground));
28
+ background: kbq-css-variable(#{$base-path}-background, map.get($style, background));
27
29
 
28
- &:hover:not(.kbq-disabled),
29
- &.kbq-hover:not(.kbq-disabled) {
30
- background: map.get($params, states_hover_background);
31
- }
32
-
33
- &:active:not(.kbq-disabled),
34
- &.kbq-active:not(.kbq-disabled) {
35
- background: map.get($params, states_active_background);
36
- }
37
-
38
- &.kbq-disabled {
39
- color: map.get($params, states_disabled_foreground);
40
- background: map.get($params, states_disabled_background);
41
-
42
- @include _icon(map.get($params, states_disabled_left-icon), map.get($params, states_disabled_left-icon));
43
- }
44
- }
45
-
46
- @mixin kbq-outline-button($params) {
47
- border-color: map.get($params, border);
48
- color: map.get($params, foreground);
49
- background: map.get($params, background);
50
-
51
- @include _icon(map.get($params, left-icon), map.get($params, right-icon));
30
+ @include _icon(
31
+ kbq-css-variable(#{$base-path}-left-icon, map.get($style, left-icon)),
32
+ kbq-css-variable(#{$base-path}-right-icon, map.get($style, right-icon))
33
+ );
52
34
 
53
35
  &:hover:not(.kbq-disabled),
54
36
  &.kbq-hover:not(.kbq-disabled) {
55
- background: map.get($params, states_hover_background);
37
+ background: kbq-css-variable(#{$base-path}-states-hover-background, map.get($style, states-hover-background));
56
38
  }
57
39
 
58
40
  &:active:not(.kbq-disabled),
59
41
  &.kbq-active:not(.kbq-disabled) {
60
- background: map.get($params, states_active_background);
42
+ background: kbq-css-variable(#{$base-path}-states-active-background, map.get($style, states-active-background));
61
43
  }
62
44
 
63
45
  &.kbq-disabled {
64
- border-color: map.get($params, states_disabled_border);
65
- color: map.get($params, states_disabled_foreground);
66
-
67
- @include _icon(map.get($params, states_disabled_left-icon), map.get($params, states_disabled_left-icon));
68
- }
69
- }
70
-
71
- @mixin kbq-transparent-button($params) {
72
- border-color: map.get($params, border);
73
- color: map.get($params, foreground);
74
- background: map.get($params, background);
75
-
76
- @include _icon(map.get($params, left-icon), map.get($params, right-icon));
77
-
78
- &:hover:not(.kbq-disabled),
79
- &.kbq-hover:not(.kbq-disabled) {
80
- background: map.get($params, states_hover_background);
81
- }
82
-
83
- &:active:not(.kbq-disabled),
84
- &.kbq-active:not(.kbq-disabled) {
85
- background: map.get($params, states_active_background);
86
- }
87
-
88
- &.kbq-disabled {
89
- border-color: map.get($params, states_disabled_border);
90
- color: map.get($params, states_disabled_foreground);
91
-
92
- @include _icon(map.get($params, states_disabled_left-icon), map.get($params, states_disabled_left-icon));
46
+ color: kbq-css-variable(#{$base-path}-states-disabled-foreground, map.get($style, states-disabled-foreground));
47
+ background: kbq-css-variable(
48
+ #{$base-path}-states-disabled-background, map.get($style, states-disabled-background)
49
+ );
50
+
51
+ @include _icon(
52
+ kbq-css-variable(#{$base-path}-states-disabled-left-icon, map.get($style, states-disabled-left-icon)),
53
+ kbq-css-variable(#{$base-path}-states-disabled-right-icon, map.get($style, states-disabled-right-icon))
54
+ );
93
55
  }
94
56
  }
95
57
 
96
58
  @mixin kbq-button-theme($theme) {
97
- $primary: map.get($theme, theme);
98
- $background: map.get($theme, background);
99
-
100
59
  $button: map.get(map.get($theme, components), button);
101
60
 
102
61
  .kbq-button-overlay {
@@ -109,43 +68,31 @@
109
68
 
110
69
  &.kbq-button_filled {
111
70
  &.kbq-contrast {
112
- $filled-contrast: map.get(map.get($button, filled), contrast-fade-off);
113
-
114
- @include kbq-filled-button($filled-contrast);
71
+ @include kbq-button-type($button, filled, contrast-fade-off);
115
72
  }
116
73
 
117
74
  &.kbq-contrast-fade {
118
- $filled-fade-contrast: map.get(map.get($button, filled), contrast-fade-on);
119
-
120
- @include kbq-filled-button($filled-fade-contrast);
75
+ @include kbq-button-type($button, filled, contrast-fade-on);
121
76
  }
122
77
  }
123
78
 
124
79
  &.kbq-button_outline {
125
80
  &.kbq-theme-fade {
126
- $outline-theme-fade-on: map.get(map.get($button, outline), theme-fade-on);
127
-
128
- @include kbq-outline-button($outline-theme-fade-on);
81
+ @include kbq-button-type($button, outline, theme-fade-on);
129
82
  }
130
83
 
131
84
  &.kbq-contrast-fade {
132
- $outline-contrast-fade-on: map.get(map.get($button, outline), contrast-fade-on);
133
-
134
- @include kbq-outline-button($outline-contrast-fade-on);
85
+ @include kbq-button-type($button, outline, contrast-fade-on);
135
86
  }
136
87
  }
137
88
 
138
89
  &.kbq-button_transparent {
139
90
  &.kbq-theme {
140
- $transparent-theme: map.get(map.get($button, transparent), theme);
141
-
142
- @include kbq-transparent-button($transparent-theme);
91
+ @include kbq-button-type($button, transparent, theme);
143
92
  }
144
93
 
145
94
  &.kbq-contrast {
146
- $transparent-contrast: map.get(map.get($button, transparent), contrast);
147
-
148
- @include kbq-transparent-button($transparent-contrast);
95
+ @include kbq-button-type($button, transparent, contrast);
149
96
  }
150
97
  }
151
98
 
@@ -160,11 +107,9 @@
160
107
  }
161
108
 
162
109
  @mixin kbq-button-typography($config) {
163
- $tokens: map.get($config, tokens);
164
-
165
110
  .kbq-button,
166
111
  .kbq-button-icon {
167
- @include kbq-typography-level-to-styles($config, map.get($tokens, button-font-default));
112
+ @include kbq-typography-css-variables(button, default);
168
113
  }
169
114
 
170
115
  .kbq-button-icon.kbq-button-wrapper {
@@ -173,4 +118,3 @@
173
118
  }
174
119
  }
175
120
  }
176
-
@@ -1,6 +1,6 @@
1
1
  import { FocusMonitor } from '@angular/cdk/a11y';
2
2
  import { ChangeDetectorRef, ElementRef, OnDestroy, Renderer2, QueryList, AfterContentInit } from '@angular/core';
3
- import { CanColor, CanDisable, CanColorCtor, HasTabIndexCtor } from '@koobiq/components/core';
3
+ import { CanColor, CanDisable, CanColorCtor, HasTabIndexCtor, KbqTitleTextRef } from '@koobiq/components/core';
4
4
  import { KbqIcon } from '@koobiq/components/icon';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare enum KbqButtonStyles {
@@ -32,10 +32,11 @@ export declare class KbqButtonBase {
32
32
  }
33
33
  /** @docs-private */
34
34
  export declare const KbqButtonMixinBase: HasTabIndexCtor & CanColorCtor & typeof KbqButtonBase;
35
- export declare class KbqButton extends KbqButtonMixinBase implements OnDestroy, CanDisable, CanColor {
35
+ export declare class KbqButton extends KbqButtonMixinBase implements OnDestroy, CanDisable, CanColor, KbqTitleTextRef {
36
36
  private focusMonitor;
37
37
  private styler;
38
38
  hasFocus: boolean;
39
+ textElement: ElementRef;
39
40
  get kbqStyle(): string;
40
41
  set kbqStyle(value: string | KbqButtonStyles);
41
42
  private _kbqStyle;
@@ -4,6 +4,7 @@
4
4
  @use 'button-base' as *;
5
5
 
6
6
  @use '../core/styles/tokens';
7
+ @use '../core/styles/common/tokens' as *;
7
8
 
8
9
 
9
10
  $tokens: meta.module-variables(tokens) !default;
@@ -13,22 +14,18 @@ $tokens: meta.module-variables(tokens) !default;
13
14
 
14
15
  // base padding + compensation (4px) - border-width (2px)
15
16
  padding-left: calc(
16
- var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) +
17
- 4px -
18
- var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
17
+ var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) + 4px
19
18
  );
20
19
  padding-right: calc(
21
- var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) +
22
- 4px -
23
- var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
20
+ var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding)) + 4px
24
21
  );
25
22
 
26
23
  &.kbq-button-icon_left {
27
- padding-left: var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding));
24
+ padding-left: kbq-css-variable(button-size-horizontal-padding);
28
25
  }
29
26
 
30
27
  &.kbq-button-icon_right {
31
- padding-right: var(--kbq-button-size-horizontal-padding, map.get($tokens, button-size-horizontal-padding));
28
+ padding-right: kbq-css-variable(button-size-horizontal-padding);
32
29
  }
33
30
  }
34
31
 
@@ -39,15 +36,9 @@ $tokens: meta.module-variables(tokens) !default;
39
36
  .kbq-button-icon {
40
37
  @extend %kbq-button-base;
41
38
 
42
- padding-left: calc(
43
- var(--kbq-button-icon-size-horizontal-padding, map.get($tokens, button-icon-size-horizontal-padding)) -
44
- var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
45
- );
39
+ padding-left: kbq-css-variable(button-icon-size-horizontal-padding);
46
40
 
47
- padding-right: calc(
48
- var(--kbq-button-icon-size-horizontal-padding, map.get($tokens, button-icon-size-horizontal-padding)) -
49
- var(--kbq-button-size-border-width, map.get($tokens, button-size-border-width))
50
- );
41
+ padding-right: kbq-css-variable(button-icon-size-horizontal-padding);
51
42
  }
52
43
 
53
44
  .kbq-button-overlay {
@@ -3,18 +3,18 @@
3
3
 
4
4
  @use '../core/styles/typography/typography-utils' as *;
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;
9
+ @mixin kbq-button-toggle-state($component, $state-name) {
10
+ $state: map.get($component, $state-name);
10
11
 
11
- @mixin kbq-button-toggle-color($state) {
12
- background: map.get($state, background);
12
+ background: kbq-css-variable(button-toggle-item-#{$state-name}-background, map.get($state, background));
13
13
 
14
- color: map.get($state, text);
14
+ color: kbq-css-variable(button-toggle-item-#{$state-name}-text, map.get($state, text));
15
15
 
16
16
  & .kbq-icon {
17
- color: map.get($state, icon);
17
+ color: kbq-css-variable(button-toggle-item-#{$state-name}-icon, map.get($state, icon));
18
18
  }
19
19
  }
20
20
 
@@ -22,43 +22,43 @@ $tokens: meta.module-variables(tokens) !default;
22
22
  $button-toggle: map.get(map.get($theme, components), button-toggle);
23
23
 
24
24
  .kbq-button-toggle-group {
25
- $container: map.get($button-toggle, container);
26
-
27
- background: map.get($container, background);
25
+ background: kbq-css-variable(
26
+ button-toggle-container-background, map.get($button-toggle, container, background)
27
+ );
28
28
 
29
29
  .kbq-button-toggle {
30
30
  $button: map.get($button-toggle, item);
31
31
 
32
32
  & > .kbq-button,
33
33
  & > .kbq-icon-button {
34
- @include kbq-button-toggle-color(map.get($button, default));
34
+ @include kbq-button-toggle-state($button, default);
35
35
 
36
36
  &:hover:not(.kbq-disabled) {
37
- @include kbq-button-toggle-color(map.get($button, hover));
37
+ @include kbq-button-toggle-state($button, states-hover);
38
38
  }
39
39
 
40
40
  &:active:not(.kbq-disabled) {
41
- @include kbq-button-toggle-color(map.get($button, active));
41
+ @include kbq-button-toggle-state($button, states-active);
42
42
  }
43
43
 
44
44
  &.kbq-selected:not(.kbq-disabled) {
45
- @include kbq-button-toggle-color(map.get($button, selected));
45
+ @include kbq-button-toggle-state($button, states-selected);
46
46
 
47
47
  &:hover {
48
- @include kbq-button-toggle-color(map.get($button, selected-hover));
48
+ @include kbq-button-toggle-state($button, states-selected-hover);
49
49
  }
50
50
 
51
51
  &:active {
52
- @include kbq-button-toggle-color(map.get($button, selected-active));
52
+ @include kbq-button-toggle-state($button, states-selected-active);
53
53
  }
54
54
  }
55
55
 
56
56
  &.kbq-disabled {
57
- @include kbq-button-toggle-color(map.get($button, disabled));
57
+ @include kbq-button-toggle-state($button, states-disabled);
58
58
  }
59
59
 
60
60
  &.kbq-disabled.kbq-selected {
61
- @include kbq-button-toggle-color(map.get($button, selected-disabled));
61
+ @include kbq-button-toggle-state($button, states-selected-disabled);
62
62
  }
63
63
 
64
64
  &.cdk-keyboard-focused {
@@ -71,7 +71,7 @@ $tokens: meta.module-variables(tokens) !default;
71
71
 
72
72
  @mixin kbq-button-toggle-typography($config) {
73
73
  .kbq-button-toggle .kbq-button-toggle-wrapper {
74
- @include kbq-typography-level-to-styles($config, map.get($tokens, button-toggle-font-item));
74
+ @include kbq-typography-css-variables(button-toggle, item);
75
75
  }
76
76
  }
77
77
 
@@ -4,6 +4,7 @@
4
4
  @use '../core/styles/common';
5
5
 
6
6
  @use '../core/styles/tokens';
7
+ @use '../core/styles/common/tokens' as *;
7
8
 
8
9
 
9
10
  $tokens: meta.module-variables(tokens) !default;
@@ -14,25 +15,13 @@ $tokens: meta.module-variables(tokens) !default;
14
15
  flex-direction: row;
15
16
  align-items: center;
16
17
 
17
- gap: var(
18
- --kbq-button-toggle-size-container-content-gap-horizontal,
19
- map.get($tokens, button-toggle-size-container-content-gap-horizontal)
20
- );
18
+ gap: kbq-css-variable(button-toggle-size-container-content-gap-horizontal);
21
19
 
22
- border-radius: var(
23
- --kbq-button-toggle-size-container-border-radius,
24
- map.get($tokens, button-toggle-size-container-border-radius)
25
- );
20
+ border-radius: kbq-css-variable(button-toggle-size-container-border-radius);
26
21
 
27
22
  padding:
28
- var(
29
- --kbq-button-toggle-size-container-padding-vertical,
30
- map.get($tokens, button-toggle-size-container-padding-vertical)
31
- )
32
- var(
33
- --kbq-button-toggle-size-container-padding-horizontal,
34
- map.get($tokens, button-toggle-size-container-padding-horizontal)
35
- );
23
+ kbq-css-variable(button-toggle-size-container-padding-vertical)
24
+ kbq-css-variable(button-toggle-size-container-padding-horizontal);
36
25
 
37
26
  .kbq-button-toggle {
38
27
  display: flex;
@@ -43,17 +32,11 @@ $tokens: meta.module-variables(tokens) !default;
43
32
  $padding-horizontal: map.get($tokens, button-toggle-size-item-padding-horizontal);
44
33
  $outline-width: map.get($tokens, button-toggle-size-item-focus-outline-width);
45
34
 
46
- border-radius: var(
47
- --kbq-button-toggle-size-item-border-radius,
48
- map.get($tokens, button-toggle-size-item-border-radius)
49
- );
35
+ border-radius: kbq-css-variable(button-toggle-size-item-border-radius);
50
36
 
51
37
  > .kbq-button,
52
38
  > .kbq-button-icon {
53
- border-radius: var(
54
- --kbq-button-toggle-size-item-border-radius,
55
- map.get($tokens, button-toggle-size-item-border-radius)
56
- );
39
+ border-radius: kbq-css-variable(button-toggle-size-item-border-radius);
57
40
 
58
41
  padding:
59
42
  calc(var(--kbq-button-toggle-size-item-padding-vertical, $padding-vertical) - $outline-width)
@@ -73,10 +56,7 @@ $tokens: meta.module-variables(tokens) !default;
73
56
 
74
57
  width: 100%;
75
58
 
76
- gap: var(
77
- --kbq-button-toggle-size-item-content-gap-horizontal,
78
- map.get($tokens, button-toggle-size-item-content-gap-horizontal)
79
- );
59
+ gap: kbq-css-variable(button-toggle-size-item-content-gap-horizontal);
80
60
  }
81
61
  }
82
62
  }
@@ -105,10 +85,7 @@ $tokens: meta.module-variables(tokens) !default;
105
85
  > .kbq-button-icon {
106
86
  width: 100%;
107
87
 
108
- border-radius: var(
109
- --kbq-button-toggle-size-item-border-radius,
110
- map.get($tokens, button-toggle-size-item-border-radius)
111
- );
88
+ border-radius: kbq-css-variable(button-toggle-size-item-border-radius);
112
89
  }
113
90
  }
114
91
  }
@@ -1,15 +1,19 @@
1
1
  @use 'sass:map';
2
2
 
3
+ @use '../core/styles/common/tokens' as *;
4
+
5
+
6
+ @mixin kbq-card-style($component, $style-name) {
7
+ $style: map.get($component, $style-name);
3
8
 
4
- @mixin kbq-card-type($card) {
5
9
  box-shadow:
6
- inset -1px 0 0 0 map.get($card, shadow),
7
- inset 0 1px 0 0 map.get($card, shadow),
8
- inset 0 -1px 0 0 map.get($card, shadow);
10
+ inset -1px 0 0 0 kbq-css-variable(card-#{$style-name}-shadow, map.get($style, shadow)),
11
+ inset 0 1px 0 0 kbq-css-variable(card-#{$style-name}-shadow, map.get($style, shadow)),
12
+ inset 0 -1px 0 0 kbq-css-variable(card-#{$style-name}-shadow, map.get($style, shadow));
9
13
 
10
- background-color: map.get($card, background);
14
+ background-color: kbq-css-variable(card-#{$style-name}-background, map.get($style, background));
11
15
 
12
- border-left-color: map.get($card, vertical-line);
16
+ border-left-color: kbq-css-variable(card-#{$style-name}-vertical-line, map.get($style, vertical-line));
13
17
  }
14
18
 
15
19
  @mixin kbq-card-theme($theme) {
@@ -19,43 +23,41 @@
19
23
  $card: map.get(map.get($theme, components), card);
20
24
  $popup: map.get(map.get($theme, components), popup);
21
25
 
22
- $is-dark: map.get($theme, is-dark);
23
-
24
26
  .kbq-card {
25
- color: map.get($foreground, contrast);
27
+ color: kbq-css-variable(foreground-contrast, map.get($foreground, contrast));
26
28
 
27
29
  &.kbq-card_error {
28
- @include kbq-card-type(map.get($card, error));
30
+ @include kbq-card-style($card, error);
29
31
  }
30
32
 
31
33
  &.kbq-card_warning {
32
- @include kbq-card-type(map.get($card, warning));
34
+ @include kbq-card-style($card, warning);
33
35
  }
34
36
 
35
37
  &.kbq-card_success {
36
- @include kbq-card-type(map.get($card, success));
38
+ @include kbq-card-style($card, success);
37
39
  }
38
40
 
39
41
  &.kbq-card_info {
40
- @include kbq-card-type(map.get($card, info));
42
+ @include kbq-card-style($card, info);
41
43
  }
42
44
 
43
45
  &.kbq-card_white {
44
- background-color: map.get($popup, background);
46
+ background-color: kbq-css-variable(popup-background, map.get($popup, background));
45
47
  }
46
48
 
47
49
  &.kbq-selected {
48
- background-color: map.get(map.get($theme, states), selected-color);
50
+ background-color: kbq-css-variable(states-selected-color, map.get($theme, states, selected-color));
49
51
  }
50
52
 
51
53
  &:not(.kbq-card_readonly):hover {
52
54
  .kbq-card__overlay {
53
- background: map.get($background, overlay-hover);
55
+ background: kbq-css-variable(background-overlay-hover, map.get($background, overlay-hover));
54
56
  }
55
57
  }
56
58
 
57
59
  &.cdk-keyboard-focused {
58
- box-shadow: 0 0 0 2px map.get(map.get($theme, states), focused-color);
60
+ box-shadow: 0 0 0 2px kbq-css-variable(states-focused-color, map.get($theme, states, focused-color));
59
61
  }
60
62
  }
61
63
  }
@@ -3,11 +3,9 @@
3
3
 
4
4
  @use '../core/styles/common/layout';
5
5
 
6
- @use '../core/styles/tokens';
6
+ @use '../core/styles/common/tokens' as *;
7
7
 
8
8
 
9
- $tokens: meta.module-variables(tokens) !default;
10
-
11
9
  .kbq-card {
12
10
  position: relative;
13
11
  box-sizing: border-box;
@@ -22,7 +20,7 @@ $tokens: meta.module-variables(tokens) !default;
22
20
  }
23
21
 
24
22
  border-left: {
25
- width: var(--kbq-card-size-vertical-line, map.get($tokens, card-size-vertical-line));
23
+ width: kbq-css-variable(card-size-vertical-line);
26
24
  style: solid;
27
25
  color: transparent;
28
26
  };