@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
@@ -2,96 +2,111 @@
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-tab-item-state($state) {
8
- background: map.get($state, background);
9
- color: map.get($state, text);
8
+ @mixin kbq-tab-item-state($component, $type, $sub-type, $style-name) {
9
+ $style: map.get($component, $type, $sub-type, $style-name);
10
+
11
+ $base: tabs-tab-item-#{$type}-#{$sub-type}-#{$style-name};
12
+
13
+ background: kbq-css-variable(#{$base}-background, map.get($style, background));
14
+ color: kbq-css-variable(#{$base}-text, map.get($style, text));
10
15
 
11
16
  & .kbq-icon {
12
- color: map.get($state, icon);
17
+ color: kbq-css-variable(#{$base}-icon, map.get($style, icon));
13
18
  }
14
19
  }
15
20
 
16
- @mixin kbq-tab-item-style($tab-item) {
17
- @include kbq-tab-item-state(map.get($tab-item, default));
21
+ @mixin kbq-tab-item-style($component, $type, $sub-type) {
22
+ @include kbq-tab-item-state($component, $type, $sub-type, default);
18
23
 
19
24
  &:hover:not(.kbq-disabled) {
20
- @include kbq-tab-item-state(map.get($tab-item, hover));
25
+ @include kbq-tab-item-state($component, $type, $sub-type, states-hover);
21
26
  }
22
27
 
23
28
  &.kbq-selected {
24
- @include kbq-tab-item-state(map.get($tab-item, selected));
29
+ @include kbq-tab-item-state($component, $type, $sub-type, states-selected);
25
30
 
26
31
  &:hover {
27
- @include kbq-tab-item-state(map.get($tab-item, selected-hover));
32
+ @include kbq-tab-item-state($component, $type, $sub-type, states-selected-hover);
28
33
  }
29
34
  }
30
35
 
31
36
  &.cdk-keyboard-focused {
32
- border-color: map.get(map.get($tab-item, focused), border-color);
37
+ border-color: kbq-css-variable(
38
+ tabs-tab-item-#{$type}-#{$sub-type}-states-focused-border-color,
39
+ map.get($component, $type, $sub-type, states-focused, border-color)
40
+ );
33
41
  }
34
42
 
35
43
  &.kbq-disabled {
36
- @include kbq-tab-item-state(map.get($tab-item, disabled));
44
+ @include kbq-tab-item-state($component, $type, $sub-type, states-disabled);
37
45
 
38
46
  &.kbq-selected {
39
- @include kbq-tab-item-state(map.get($tab-item, selected-disabled));
47
+ @include kbq-tab-item-state($component, $type, $sub-type, states-selected-disabled);
40
48
  }
41
49
  }
42
50
  }
43
51
 
44
- @mixin kbq-tab-stack-style($tab-stack) {
45
- .kbq-tab-header {
46
- background: map.get($tab-stack, background);
47
- }
48
- }
49
-
50
52
  //noinspection ALL
51
53
  @mixin kbq-tabs-theme($theme) {
52
54
  $tab-item: map.get(map.get($theme, components), tab-item);
53
-
54
55
  $tab-stack: map.get(map.get($theme, components), tab-stack);
55
56
 
56
- $tab-stack_filled: map.get($tab-stack, filled);
57
- $tab-item_filled: map.get($tab-item, filled);
58
-
59
- $tab-stack_transparent: map.get($tab-stack, transparent);
60
- $tab-item_transparent: map.get($tab-item, transparent);
61
-
62
57
  .kbq-tab-group {
63
58
  &.kbq-tab-group_filled {
64
59
  &.kbq-tab-group_on-background {
65
- @include kbq-tab-stack-style(map.get($tab-stack_filled, on-background));
60
+ .kbq-tab-header {
61
+ background: kbq-css-variable(
62
+ tabs-tab-stack-filled-on-background-background,
63
+ map.get($tab-stack, filled, on-background, background)
64
+ );
65
+ }
66
66
 
67
67
  & .kbq-tab-label {
68
- @include kbq-tab-item-style(map.get($tab-item_filled, on-background));
68
+ @include kbq-tab-item-style($tab-item, filled, on-background);
69
69
  }
70
70
  }
71
71
 
72
72
  &.kbq-tab-group_on-surface {
73
- @include kbq-tab-stack-style(map.get($tab-stack_filled, on-surface));
73
+ .kbq-tab-header {
74
+ background: kbq-css-variable(
75
+ tabs-tab-stack-filled-on-surface-background,
76
+ map.get($tab-stack, filled, on-surface, background)
77
+ );
78
+ }
74
79
 
75
80
  & .kbq-tab-label {
76
- @include kbq-tab-item-style(map.get($tab-item_filled, on-background));
81
+ @include kbq-tab-item-style($tab-item, filled, on-background);
77
82
  }
78
83
  }
79
84
  }
80
85
 
81
86
  &.kbq-tab-group_transparent {
82
87
  &.kbq-tab-group_on-background {
83
- @include kbq-tab-stack-style(map.get($tab-stack_transparent, on-background));
88
+ .kbq-tab-header {
89
+ background: kbq-css-variable(
90
+ tabs-tab-stack-transparent-on-background-background,
91
+ map.get($tab-stack, transparent, on-background, background)
92
+ );
93
+ }
84
94
 
85
95
  & .kbq-tab-label {
86
- @include kbq-tab-item-style(map.get($tab-item_transparent, on-background));
96
+ @include kbq-tab-item-style($tab-item, transparent, on-background);
87
97
  }
88
98
  }
89
99
 
90
100
  &.kbq-tab-group_on-surface {
91
- @include kbq-tab-stack-style(map.get($tab-stack_transparent, on-surface));
101
+ .kbq-tab-header {
102
+ background: kbq-css-variable(
103
+ tabs-tab-stack-transparent-on-surface-background,
104
+ map.get($tab-stack, transparent, on-surface, background)
105
+ );
106
+ }
92
107
 
93
108
  & .kbq-tab-label {
94
- @include kbq-tab-item-style(map.get($tab-item_transparent, on-background));
109
+ @include kbq-tab-item-style($tab-item, transparent, on-background);
95
110
  }
96
111
  }
97
112
  }
@@ -100,36 +115,56 @@
100
115
  .kbq-tab-nav-bar {
101
116
  &.kbq-tab-nav-bar_filled {
102
117
  &.kbq-tab-nav-bar_on-background {
103
- @include kbq-tab-stack-style(map.get($tab-stack_filled, on-background));
118
+ .kbq-tab-header {
119
+ background: kbq-css-variable(
120
+ tabs-tab-stack-filled-on-background-background,
121
+ map.get($tab-stack, filled, on-background, background)
122
+ );
123
+ }
104
124
 
105
125
  & .kbq-tab-link {
106
- @include kbq-tab-item-style(map.get($tab-item_filled, on-background));
126
+ @include kbq-tab-item-style($tab-item, filled, on-background);
107
127
  }
108
128
  }
109
129
 
110
130
  &.kbq-tab-nav-bar_on-surface {
111
- @include kbq-tab-stack-style(map.get($tab-stack_filled, on-surface));
131
+ .kbq-tab-header {
132
+ background: kbq-css-variable(
133
+ tabs-tab-stack-filled-on-surface-background,
134
+ map.get($tab-stack, filled, on-surface, background)
135
+ );
136
+ }
112
137
 
113
138
  & .kbq-tab-link {
114
- @include kbq-tab-item-style(map.get($tab-item_filled, on-background));
139
+ @include kbq-tab-item-style($tab-item, filled, on-background);
115
140
  }
116
141
  }
117
142
  }
118
143
 
119
144
  &.kbq-tab-nav-bar_transparent {
120
145
  &.kbq-tab-nav-bar_on-background {
121
- @include kbq-tab-stack-style(map.get($tab-stack_transparent, on-background));
146
+ .kbq-tab-header {
147
+ background: kbq-css-variable(
148
+ tabs-tab-stack-transparent-on-background-background,
149
+ map.get($tab-stack, transparent, on-background, background)
150
+ );
151
+ }
122
152
 
123
153
  & .kbq-tab-link {
124
- @include kbq-tab-item-style(map.get($tab-item_transparent, on-background));
154
+ @include kbq-tab-item-style($tab-item, transparent, on-background);
125
155
  }
126
156
  }
127
157
 
128
158
  &.kbq-tab-nav-bar_on-surface {
129
- @include kbq-tab-stack-style(map.get($tab-stack_transparent, on-surface));
159
+ .kbq-tab-header {
160
+ background: kbq-css-variable(
161
+ tabs-tab-stack-transparent-on-surface-background,
162
+ map.get($tab-stack, transparent, on-surface, background)
163
+ );
164
+ }
130
165
 
131
166
  & .kbq-tab-link {
132
- @include kbq-tab-item-style(map.get($tab-item_transparent, on-background));
167
+ @include kbq-tab-item-style($tab-item, transparent, on-background);
133
168
  }
134
169
  }
135
170
  }
@@ -137,10 +172,8 @@
137
172
  }
138
173
 
139
174
  @mixin kbq-tabs-typography($config) {
140
- $tokens: map.get($config, tokens);
141
-
142
175
  .kbq-tab-label,
143
176
  .kbq-tab-link {
144
- @include kbq-typography-level-to-styles($config, map.get($tokens, tabs-font-text));
177
+ @include kbq-typography-css-variables(tabs, text);
145
178
  }
146
179
  }
@@ -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-tab-group {
12
10
  display: flex;
13
11
  flex-direction: column;
@@ -24,10 +22,7 @@ $tokens: meta.module-variables(tokens) !default;
24
22
  flex-direction: row;
25
23
 
26
24
  .kbq-tab-list__content {
27
- gap: var(
28
- --kbq-tabs-size-tab-stack-vertical-content-gap-vartical,
29
- map.get($tokens, tabs-size-tab-stack-vertical-content-gap-vertical)
30
- ) 0;
25
+ gap: kbq-css-variable(tabs-size-tab-stack-vertical-content-gap-vertical) 0;
31
26
  }
32
27
 
33
28
  & .kbq-tab-header__content {
@@ -4,10 +4,6 @@
4
4
  @use '../core/styles/common/vendor-prefixes';
5
5
  @use 'tabs-common' as *;
6
6
 
7
- @use '../core/styles/tokens';
8
-
9
-
10
- $tokens: meta.module-variables(tokens) !default;
11
7
 
12
8
  .kbq-tab-header {
13
9
  display: flex;
@@ -3,11 +3,9 @@
3
3
 
4
4
  @use '../tabs-common';
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-tab-link {
12
10
  vertical-align: top;
13
11
  text-decoration: none;
@@ -38,9 +36,6 @@ $tokens: meta.module-variables(tokens) !default;
38
36
  &.kbq-tab-group_vertical {
39
37
  flex-direction: column;
40
38
  flex-grow: 0;
41
- gap: var(
42
- --kbq-tabs-size-tab-stack-vertical-content-gap-vartical,
43
- map.get($tokens, tabs-size-tab-stack-vertical-content-gap-vertical)
44
- ) 0;
39
+ gap: kbq-css-variable(tabs-size-tab-stack-vertical-content-gap-vertical) 0;
45
40
  }
46
41
  }
@@ -3,74 +3,71 @@
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-tag-state($state) {
9
- background: map.get($state, background);
9
+ @mixin kbq-tag-state($component, $type, $style-name) {
10
+ $style: map.get($component, $type, $style-name);
11
+
12
+ $base: tag-#{$type}-#{$style-name};
13
+
14
+ background: kbq-css-variable(#{$base}-background, map.get($style, background));
10
15
 
11
16
  & .kbq-icon {
12
- color: map.get($state, icon);
17
+ color: kbq-css-variable(#{$base}-icon, map.get($style, icon));
13
18
  }
14
19
 
15
20
  & .kbq-tag__text {
16
- color: map.get($state, text);
21
+ color: kbq-css-variable(#{$base}-text, map.get($style, text));
17
22
  }
18
23
  }
19
24
 
20
- @mixin kbq-tag-color($tag) {
21
- $default: map.get($tag, default);
22
-
23
- @include kbq-tag-state($default);
25
+ @mixin kbq-tag-color($component, $type) {
26
+ @include kbq-tag-state($component, $type, default);
24
27
 
25
28
  &:hover,
26
29
  &.kbq-hovered {
27
- $hover: map.get($tag, hover);
28
-
29
- @include kbq-tag-state($hover);
30
+ @include kbq-tag-state($component, $type, hover);
30
31
  }
31
32
 
32
33
  &.kbq-focused {
33
- $focus: map.get($tag, focus);
34
+ @include kbq-tag-state($component, $type, focus);
34
35
 
35
- @include kbq-tag-state($focus);
36
-
37
- box-shadow: inset 0 0 0 1px map.get($focus, outline), 0 0 0 1px map.get($focus, outline);
36
+ box-shadow:
37
+ inset 0 0 0 1px kbq-css-variable(tag-#{$type}-focus-outline, map.get($component, $type, focus, outline)),
38
+ 0 0 0 1px kbq-css-variable(tag-#{$type}-focus-outline, map.get($component, $type, focus, outline));
38
39
  }
39
40
 
40
41
  &.kbq-disabled {
41
- $disabled: map.get($tag, disabled);
42
-
43
- @include kbq-tag-state($disabled);
42
+ @include kbq-tag-state($component, $type, disabled);
44
43
  }
45
44
  }
46
45
 
47
46
  @mixin kbq-tag-theme($theme) {
48
- $tag: map.get(map.get($theme, components), tag);
47
+ $tag: map.get($theme, components, tag);
49
48
 
50
49
  .kbq-tag {
51
50
  &.kbq-theme {
52
- @include kbq-tag-color(map.get($tag, theme-fade-on));
51
+ @include kbq-tag-color($tag, theme-fade-on);
53
52
  }
54
53
 
55
54
  &.kbq-contrast-fade {
56
- @include kbq-tag-color(map.get($tag, contrast-fade-on));
55
+ @include kbq-tag-color($tag, contrast-fade-on);
57
56
  }
58
57
 
59
58
  &.kbq-error {
60
- @include kbq-tag-color(map.get($tag, error-fade-on));
59
+ @include kbq-tag-color($tag, error-fade-on);
61
60
  }
62
61
  }
63
62
  }
64
63
 
65
64
  @mixin kbq-tag-typography($config) {
66
- $tokens: map.get($config, tokens);
67
-
68
65
  .kbq-tag {
69
- @include kbq-typography-level-to-styles($config, map.get($tokens, tag-font-default));
66
+ @include kbq-typography-css-variables(tag, default);
70
67
  }
71
68
 
72
69
  .kbq-tag-input {
73
- @include kbq-typography-level-to-styles($config, map.get($tokens, tag-input-font-default));
70
+ @include kbq-typography-css-variables(tag-input, default);
74
71
  }
75
72
  }
76
73
 
@@ -2,6 +2,7 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../core/styles/tokens';
5
+ @use '../core/styles/common/tokens' as *;
5
6
 
6
7
 
7
8
  $tokens: meta.module-variables(tokens) !default;
@@ -26,8 +27,8 @@ $tokens: meta.module-variables(tokens) !default;
26
27
 
27
28
  min-height: unset;
28
29
 
29
- padding-top: var(--kbq-tag-size-padding-vertical, map.get($tokens, tag-size-padding-vertical));
30
- padding-bottom: var(--kbq-tag-size-padding-vertical, map.get($tokens, tag-size-padding-vertical));
30
+ padding-top: kbq-css-variable(tag-size-padding-vertical);
31
+ padding-bottom: kbq-css-variable(tag-size-padding-vertical);
31
32
  padding-left: 4px;
32
33
  padding-right: unset;
33
34
  }
@@ -41,7 +42,7 @@ $tokens: meta.module-variables(tokens) !default;
41
42
 
42
43
  min-width: 0;
43
44
 
44
- gap: var(--kbq-tag-list-size-content-gap, map.get($tokens, tag-list-size-content-gap));
45
+ gap: kbq-css-variable(tag-list-size-content-gap);
45
46
 
46
47
  & .kbq-tag-input {
47
48
  max-width: 100%;
@@ -66,11 +67,11 @@ $tokens: meta.module-variables(tokens) !default;
66
67
  var(--kbq-tag-input-size-padding-vertical, #{$padding-vertical}) -
67
68
  var(--kbq-form-field-size-border-width, $border-width)
68
69
  )
69
- var(--kbq-tag-input-size-padding-right, map.get($tokens, tag-input-size-padding-right))
70
+ kbq-css-variable(tag-input-size-padding-right)
70
71
  calc(
71
72
  var(--kbq-tag-input-size-padding-vertical, #{$padding-vertical}) -
72
73
  var(--kbq-form-field-size-border-width, $border-width)
73
74
  )
74
- var(--kbq-tag-input-size-padding-left, map.get($tokens, tag-input-size-padding-left));
75
+ kbq-css-variable(tag-input-size-padding-left);
75
76
  }
76
77
  }
package/tags/tag.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-tag {
10
8
  position: relative;
11
9
 
@@ -14,8 +12,8 @@ $tokens: meta.module-variables(tokens) !default;
14
12
  max-width: 100%;
15
13
 
16
14
  padding:
17
- var(--kbq-tag-size-padding-vertical, map.get($tokens, tag-size-padding-vertical))
18
- var(--kbq-tag-size-padding-horizontal, map.get($tokens, tag-size-padding-horizontal));
15
+ kbq-css-variable(tag-size-padding-vertical)
16
+ kbq-css-variable(tag-size-padding-horizontal);
19
17
 
20
18
  border-radius: 4px;
21
19
 
@@ -32,8 +30,7 @@ $tokens: meta.module-variables(tokens) !default;
32
30
 
33
31
  flex-shrink: 0;
34
32
 
35
- margin-right:
36
- var(--kbq-tag-size-close-button-margin-right, map.get($tokens, tag-size-close-button-margin-right));
33
+ margin-right: kbq-css-variable(tag-size-close-button-margin-right);
37
34
 
38
35
  &:hover {
39
36
  cursor: pointer;
@@ -49,11 +46,11 @@ $tokens: meta.module-variables(tokens) !default;
49
46
  white-space: nowrap;
50
47
  overflow: hidden;
51
48
 
52
- margin: 0 var(--kbq-tag-size-content-gap-horizontal, map.get($tokens, tag-size-content-gap-horizontal));
49
+ margin: 0 kbq-css-variable(tag-size-content-gap-horizontal);
53
50
  }
54
51
 
55
52
  & .kbq-icon_left {
56
- margin-left: var(--kbq-tag-size-icon-margin-left, map.get($tokens, tag-size-icon-margin-left));
53
+ margin-left: kbq-css-variable(tag-size-icon-margin-left);
57
54
  }
58
55
  }
59
56
 
@@ -1,13 +1,11 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
 
4
- @use '../core/styles/typography/typography-utils' as *;
4
+ @use '../core/styles/common/tokens' as *;
5
5
 
6
6
 
7
7
  @mixin kbq-textarea-typography($config) {
8
- $tokens: map.get($config, tokens);
9
-
10
8
  .kbq-textarea {
11
- @include kbq-typography-level-to-styles($config, map.get($tokens, textarea-font-default));
9
+ @include kbq-typography-css-variables(textarea, default);
12
10
  }
13
11
  }
@@ -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-textarea {
10
8
  display: inline-block;
11
9
 
@@ -22,8 +20,8 @@ $tokens: meta.module-variables(tokens) !default;
22
20
  box-sizing: border-box;
23
21
 
24
22
  padding:
25
- var(--kbq-textarea-size-padding-vertical, map.get($tokens, textarea-size-padding-vertical))
26
- var(--kbq-textarea-size-padding-horizontal, map.get($tokens, textarea-size-padding-horizontal));
23
+ kbq-css-variable(textarea-size-padding-vertical)
24
+ kbq-css-variable(textarea-size-padding-horizontal);
27
25
 
28
26
  -webkit-appearance: none; // Chrome textarea height sizing fix
29
27
  vertical-align: bottom; // Chrome textarea height sizing fix
@@ -35,7 +33,7 @@ $tokens: meta.module-variables(tokens) !default;
35
33
 
36
34
  &.kbq-textarea-resizable {
37
35
  resize: vertical;
38
- min-height: var(--kbq-textarea-size-min-height, map.get($tokens, textarea-size-min-height));
36
+ min-height: kbq-css-variable(textarea-size-min-height);
39
37
  }
40
38
  }
41
39
 
@@ -1,16 +1,11 @@
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-timepicker {
10
- padding-right: calc(
11
- var(--kbq-timepicker-size-padding-right, #{map.get($tokens, timepicker-size-padding-right)}) -
12
- var(--kbq-form-field-size-border-width, #{map.get($tokens, form-field-size-border-width)})
13
- );
8
+ padding-right: kbq-css-variable(timepicker-size-padding-right);
14
9
  }
15
10
 
16
11
  .kbq-form-field-type-timepicker {
@@ -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 kbq-timezone-option-theme($theme) {
@@ -9,34 +10,32 @@
9
10
 
10
11
  .kbq-timezone-option__offset,
11
12
  .kbq-timezone-option__city {
12
- color: map.get($timezone, text);
13
+ color: kbq-css-variable(timezone-text, map.get($timezone, text));
13
14
  }
14
15
 
15
16
  .kbq-timezone-option__cities {
16
- color: map.get($timezone, caption);
17
+ color: kbq-css-variable(timezone-caption, map.get($timezone, caption));
17
18
  }
18
19
 
19
20
  .kbq-timezone-select__panel.kbq-select__panel .kbq-optgroup-label {
20
- color: map.get($timezone, optgroup-label);
21
+ color: kbq-css-variable(timezone-optgroup-label, map.get($timezone, optgroup-label));
21
22
  }
22
23
  }
23
24
 
24
25
  @mixin kbq-timezone-option-typography($config) {
25
- $tokens: map.get($config, tokens);
26
-
27
26
  .kbq-timezone-option__offset {
28
- @include kbq-typography-level-to-styles($config, map.get($tokens, timezone-option-font-offset-text));
27
+ @include kbq-typography-css-variables(timezone-option, offset-text);
29
28
  }
30
29
 
31
30
  .kbq-timezone-option__city {
32
- @include kbq-typography-level-to-styles($config, map.get($tokens, timezone-option-font-text));
31
+ @include kbq-typography-css-variables(timezone-option, text);
33
32
  }
34
33
 
35
34
  .kbq-timezone-option__cities {
36
- @include kbq-typography-level-to-styles($config, map.get($tokens, timezone-option-font-caption));
35
+ @include kbq-typography-css-variables(timezone-option, caption);
37
36
  }
38
37
 
39
38
  .kbq-timezone-select__panel.kbq-select__panel .kbq-optgroup-label {
40
- @include kbq-typography-level-to-styles($config, map.get($tokens, timezone-option-font-optgroup-label));
39
+ @include kbq-typography-css-variables(timezone-option, optgroup-label);
41
40
  }
42
41
  }
@@ -1,18 +1,16 @@
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-timezone-option.kbq-option {
10
8
  display: flex;
11
9
  flex-direction: row;
12
10
  align-items: flex-start;
13
11
 
14
- padding: var(--kbq-timezone-option-size-padding, map.get($tokens, timezone-option-size-padding));
15
- column-gap: var(--kbq-timezone-option-size-column-gap, map.get($tokens, timezone-option-size-column-gap));
12
+ padding: kbq-css-variable(timezone-option-size-padding);
13
+ column-gap: kbq-css-variable(timezone-option-size-column-gap);
16
14
  }
17
15
 
18
16
  .kbq-timezone-option__label {
@@ -30,10 +28,10 @@ $tokens: meta.module-variables(tokens) !default;
30
28
  .kbq-timezone-option__cities {
31
29
  display: -webkit-box;
32
30
  -webkit-box-orient: vertical;
33
- max-height: var(--kbq-timezone-option-size-max-height, map.get($tokens, timezone-option-size-max-height));
31
+ max-height: kbq-css-variable(timezone-option-size-max-height);
34
32
  overflow: hidden;
35
33
  }
36
34
 
37
35
  .kbq-select__panel .kbq-timezone-option {
38
- height: var(--kbq-timezone-option-size-height, map.get($tokens, timezone-option-size-height));
36
+ height: kbq-css-variable(timezone-option-size-height);
39
37
  }
@@ -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
  }