@koobiq/components 17.0.0-rc.6 → 17.0.0-rc.8

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 (256) hide show
  1. package/alert/_alert-theme.scss +19 -33
  2. package/alert/alert.component.scss +49 -141
  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 +18 -38
  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 +14 -34
  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 +23 -21
  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/form-field/form-field-ref.d.ts +2 -0
  21. package/core/forms/_forms-theme.scss +4 -7
  22. package/core/forms/_forms.scss +13 -42
  23. package/core/locales/locale-service.d.ts +1 -0
  24. package/core/option/_optgroup-theme.scss +4 -5
  25. package/core/option/_option-action-theme.scss +7 -7
  26. package/core/option/_option-theme.scss +16 -20
  27. package/core/select/common.d.ts +35 -0
  28. package/core/select/index.d.ts +1 -0
  29. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -19
  30. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +9 -8
  31. package/core/styles/common/_groups.scss +3 -5
  32. package/core/styles/common/_list.scss +14 -18
  33. package/core/styles/common/_popup.scss +5 -4
  34. package/core/styles/common/_select.scss +11 -16
  35. package/core/styles/common/_tokens.scss +30 -9
  36. package/core/styles/theming/_components-theming.scss +151 -131
  37. package/core/styles/visual/_layout.scss +14 -16
  38. package/datepicker/_datepicker-theme.scss +24 -39
  39. package/datepicker/calendar-body.scss +3 -8
  40. package/datepicker/calendar-header.scss +4 -9
  41. package/datepicker/calendar.scss +5 -16
  42. package/datepicker/datepicker-content.scss +4 -12
  43. package/datepicker/datepicker-input.scss +0 -4
  44. package/datepicker/datepicker-toggle.scss +3 -2
  45. package/divider/_divider-theme.scss +3 -1
  46. package/divider/divider.scss +9 -25
  47. package/dl/_dl-theme.scss +5 -6
  48. package/dl/dl.scss +5 -19
  49. package/dropdown/_dropdown-theme.scss +21 -21
  50. package/dropdown/dropdown-item.scss +5 -11
  51. package/dropdown/dropdown-trigger.directive.d.ts +2 -2
  52. package/dropdown/dropdown.scss +6 -14
  53. package/esm2022/alert/alert.component.mjs +2 -2
  54. package/esm2022/badge/badge.component.mjs +2 -2
  55. package/esm2022/button/button.component.mjs +13 -6
  56. package/esm2022/button-toggle/button-toggle.component.mjs +2 -2
  57. package/esm2022/checkbox/checkbox.mjs +2 -2
  58. package/esm2022/code-block/actionbar.component.mjs +2 -2
  59. package/esm2022/code-block/code-block.component.mjs +2 -2
  60. package/esm2022/core/form-field/form-field-ref.mjs +1 -1
  61. package/esm2022/core/locales/locale-service.mjs +5 -2
  62. package/esm2022/core/option/option.mjs +2 -2
  63. package/esm2022/core/select/common.mjs +120 -0
  64. package/esm2022/core/select/index.mjs +2 -1
  65. package/esm2022/core/version.mjs +2 -2
  66. package/esm2022/datepicker/calendar-header.component.mjs +1 -1
  67. package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
  68. package/esm2022/dropdown/dropdown-trigger.directive.mjs +4 -4
  69. package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
  70. package/esm2022/file-upload/single-file-upload.component.mjs +2 -2
  71. package/esm2022/form-field/form-field.mjs +2 -2
  72. package/esm2022/form-field/hint.mjs +2 -2
  73. package/esm2022/form-field/password-hint.mjs +2 -2
  74. package/esm2022/icon/icon-item.component.mjs +16 -6
  75. package/esm2022/list/list-selection.component.mjs +2 -2
  76. package/esm2022/list/list.component.mjs +2 -2
  77. package/esm2022/markdown/markdown.component.mjs +2 -2
  78. package/esm2022/navbar/navbar-item.component.mjs +2 -2
  79. package/esm2022/navbar/navbar.component.mjs +2 -2
  80. package/esm2022/navbar/vertical-navbar.component.mjs +2 -2
  81. package/esm2022/popover/popover-confirm.component.mjs +3 -3
  82. package/esm2022/popover/popover.component.mjs +3 -3
  83. package/esm2022/radio/radio.component.mjs +2 -2
  84. package/esm2022/scrollbar/scrollbar.component.mjs +2 -2
  85. package/esm2022/select/select.component.mjs +18 -114
  86. package/esm2022/select/select.module.mjs +28 -28
  87. package/esm2022/table/table.component.mjs +2 -2
  88. package/esm2022/tabs/tab-group.component.mjs +54 -12
  89. package/esm2022/tabs/tab-header.component.mjs +2 -2
  90. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
  91. package/esm2022/tags/tag-default-options.mjs +1 -1
  92. package/esm2022/tags/tag-input.mjs +17 -3
  93. package/esm2022/tags/tag-list.component.mjs +2 -2
  94. package/esm2022/tags/tag.component.mjs +2 -2
  95. package/esm2022/timepicker/timepicker.directive.mjs +10 -2
  96. package/esm2022/timezone/timezone-option.component.mjs +2 -2
  97. package/esm2022/timezone/timezone-select.component.mjs +5 -5
  98. package/esm2022/title/title.directive.mjs +2 -2
  99. package/esm2022/toast/toast.component.mjs +3 -3
  100. package/esm2022/toast/toast.service.mjs +17 -12
  101. package/esm2022/tooltip/tooltip.component.mjs +2 -2
  102. package/esm2022/tree/tree-option.component.mjs +2 -2
  103. package/esm2022/tree-select/tree-select.component.mjs +9 -37
  104. package/esm2022/tree-select/tree-select.module.mjs +31 -11
  105. package/fesm2022/koobiq-components-alert.mjs +2 -2
  106. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  107. package/fesm2022/koobiq-components-badge.mjs +2 -2
  108. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  109. package/fesm2022/koobiq-components-button-toggle.mjs +2 -2
  110. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  111. package/fesm2022/koobiq-components-button.mjs +12 -5
  112. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  113. package/fesm2022/koobiq-components-checkbox.mjs +2 -2
  114. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  115. package/fesm2022/koobiq-components-code-block.mjs +4 -4
  116. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  117. package/fesm2022/koobiq-components-core.mjs +124 -7
  118. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  119. package/fesm2022/koobiq-components-datepicker.mjs +1 -1
  120. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  121. package/fesm2022/koobiq-components-dropdown.mjs +5 -5
  122. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  123. package/fesm2022/koobiq-components-file-upload.mjs +4 -4
  124. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  125. package/fesm2022/koobiq-components-form-field.mjs +6 -6
  126. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  127. package/fesm2022/koobiq-components-icon.mjs +14 -4
  128. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  129. package/fesm2022/koobiq-components-list.mjs +4 -4
  130. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  131. package/fesm2022/koobiq-components-markdown.mjs +2 -2
  132. package/fesm2022/koobiq-components-navbar.mjs +6 -6
  133. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  134. package/fesm2022/koobiq-components-popover.mjs +4 -4
  135. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  136. package/fesm2022/koobiq-components-radio.mjs +2 -2
  137. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  138. package/fesm2022/koobiq-components-scrollbar.mjs +2 -2
  139. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  140. package/fesm2022/koobiq-components-select.mjs +46 -142
  141. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  142. package/fesm2022/koobiq-components-table.mjs +2 -2
  143. package/fesm2022/koobiq-components-tabs.mjs +56 -14
  144. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  145. package/fesm2022/koobiq-components-tags.mjs +20 -7
  146. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  147. package/fesm2022/koobiq-components-timepicker.mjs +9 -1
  148. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  149. package/fesm2022/koobiq-components-timezone.mjs +6 -6
  150. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  151. package/fesm2022/koobiq-components-title.mjs +1 -1
  152. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  153. package/fesm2022/koobiq-components-toast.mjs +19 -13
  154. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  155. package/fesm2022/koobiq-components-tooltip.mjs +2 -2
  156. package/fesm2022/koobiq-components-tree-select.mjs +37 -44
  157. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  158. package/fesm2022/koobiq-components-tree.mjs +2 -2
  159. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  160. package/file-upload/_file-upload-theme.scss +109 -68
  161. package/file-upload/file-upload.scss +0 -5
  162. package/file-upload/multiple-file-upload.component.scss +35 -99
  163. package/file-upload/single-file-upload.component.scss +12 -31
  164. package/form-field/_form-field-theme.scss +32 -34
  165. package/form-field/_hint-theme.scss +16 -19
  166. package/form-field/cleaner.scss +3 -8
  167. package/form-field/form-field.scss +11 -12
  168. package/form-field/hint.scss +5 -7
  169. package/form-field/password-toggle.scss +3 -9
  170. package/form-field/stepper.scss +4 -10
  171. package/icon/_icon-button-theme.scss +35 -35
  172. package/icon/_icon-item-theme.scss +46 -31
  173. package/icon/_icon-theme.scss +9 -15
  174. package/icon/icon-button.scss +5 -17
  175. package/icon/icon-item.component.d.ts +3 -1
  176. package/icon/icon-item.scss +12 -7
  177. package/icon/icon.scss +0 -5
  178. package/input/_input-theme.scss +2 -3
  179. package/input/input.scss +2 -1
  180. package/link/_link-theme.scss +25 -42
  181. package/list/_list-theme.scss +18 -17
  182. package/list/list.scss +3 -5
  183. package/loader-overlay/_loader-overlay-theme.scss +13 -16
  184. package/loader-overlay/loader-overlay.scss +9 -32
  185. package/markdown/_markdown-theme.scss +41 -44
  186. package/markdown/markdown.scss +38 -88
  187. package/modal/_modal-confirm.scss +2 -6
  188. package/modal/_modal-theme.scss +11 -12
  189. package/modal/modal.scss +18 -24
  190. package/navbar/_navbar-item_horizontal.scss +28 -28
  191. package/navbar/_navbar-item_vertical.scss +31 -30
  192. package/navbar/_navbar-theme.scss +21 -22
  193. package/navbar/navbar-brand.scss +24 -26
  194. package/navbar/navbar-divider.scss +4 -7
  195. package/navbar/navbar-item.scss +11 -13
  196. package/navbar/navbar.scss +2 -5
  197. package/navbar/vertical-navbar.scss +3 -5
  198. package/package.json +9 -9
  199. package/popover/_popover-theme.scss +9 -16
  200. package/popover/popover.scss +18 -24
  201. package/prebuilt-themes/dark-theme.css +1 -1
  202. package/prebuilt-themes/light-theme.css +1 -1
  203. package/progress-bar/_progress-bar-theme.scss +7 -10
  204. package/progress-bar/progress-bar.scss +6 -18
  205. package/progress-spinner/_progress-spinner-theme.scss +6 -7
  206. package/progress-spinner/progress-spinner.scss +8 -17
  207. package/radio/_radio-theme.scss +29 -37
  208. package/radio/radio.scss +20 -39
  209. package/risk-level/_risk-level-theme.scss +25 -30
  210. package/risk-level/risk-level.component.scss +5 -8
  211. package/schematics/ng-add/index.js +6 -6
  212. package/scrollbar/_scrollbar-component-theme.scss +14 -17
  213. package/scrollbar/scrollbar.component.scss +13 -20
  214. package/select/_select-theme.scss +14 -15
  215. package/select/select.component.d.ts +2 -32
  216. package/select/select.module.d.ts +1 -1
  217. package/select/select.scss +3 -10
  218. package/sidepanel/_sidepanel-theme.scss +8 -9
  219. package/sidepanel/sidepanel.scss +19 -30
  220. package/splitter/_splitter-theme.scss +3 -3
  221. package/table/_table-theme.scss +9 -8
  222. package/table/table.scss +12 -12
  223. package/tabs/_tabs-common.scss +4 -7
  224. package/tabs/_tabs-theme.scss +77 -44
  225. package/tabs/tab-group.component.d.ts +9 -3
  226. package/tabs/tab-group.scss +2 -7
  227. package/tabs/tab-header.scss +0 -4
  228. package/tabs/tab-nav-bar/tab-nav-bar.scss +2 -7
  229. package/tags/_tag-theme.scss +23 -26
  230. package/tags/tag-default-options.d.ts +1 -0
  231. package/tags/tag-input.d.ts +7 -1
  232. package/tags/tag-list.scss +6 -5
  233. package/tags/tag.scss +6 -9
  234. package/textarea/_textarea-theme.scss +2 -4
  235. package/textarea/textarea.scss +4 -6
  236. package/timepicker/timepicker.scss +2 -7
  237. package/timezone/_timezone-option-theme.scss +8 -9
  238. package/timezone/timezone-option.component.scss +5 -7
  239. package/timezone/timezone-select.component.d.ts +2 -1
  240. package/timezone/timezone-select.component.scss +2 -3
  241. package/toast/_toast-theme.scss +15 -14
  242. package/toast/toast-container.component.scss +4 -7
  243. package/toast/toast.component.scss +20 -25
  244. package/toast/toast.service.d.ts +8 -4
  245. package/toggle/_toggle-theme.scss +48 -42
  246. package/toggle/toggle.scss +9 -21
  247. package/tooltip/_tooltip-theme.scss +13 -16
  248. package/tooltip/tooltip.scss +8 -10
  249. package/tree/_tree-theme.scss +20 -22
  250. package/tree/toggle.scss +3 -5
  251. package/tree/tree-option.scss +5 -6
  252. package/tree-select/_tree-select-theme.scss +12 -14
  253. package/tree-select/tree-select.component.d.ts +4 -17
  254. package/tree-select/tree-select.module.d.ts +1 -2
  255. package/tree-select/tree-select.scss +1 -5
  256. package/core/styles/_variables.scss +0 -1
@@ -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,5 +1,6 @@
1
+ import { KbqSelectSearch } from '@koobiq/components/core';
1
2
  import { KbqCleaner } from '@koobiq/components/form-field';
2
- import { KbqSelect, KbqSelectSearch } from '@koobiq/components/select';
3
+ import { KbqSelect } from '@koobiq/components/select';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class KbqTimezoneSelectTrigger {
5
6
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqTimezoneSelectTrigger, never>;
@@ -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-radius);
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
  }
@@ -1,16 +1,17 @@
1
1
  import { AnimationEvent } from '@angular/animations';
2
2
  import { Overlay, OverlayContainer } from '@angular/cdk/overlay';
3
- import { Injector, ComponentRef, TemplateRef, EmbeddedViewRef, InjectionToken } from '@angular/core';
3
+ import { Injector, ComponentRef, TemplateRef, EmbeddedViewRef, InjectionToken, NgZone, OnDestroy } from '@angular/core';
4
4
  import { BehaviorSubject } from 'rxjs';
5
5
  import { KbqToastComponent } from './toast.component';
6
6
  import { KbqToastData, KbqToastConfig } from './toast.type';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare const KBQ_TOAST_FACTORY: InjectionToken<unknown>;
9
9
  export declare const defaultToastConfig: KbqToastConfig;
10
- export declare class KbqToastService<T extends KbqToastComponent = KbqToastComponent> {
10
+ export declare class KbqToastService<T extends KbqToastComponent = KbqToastComponent> implements OnDestroy {
11
11
  private overlay;
12
12
  private injector;
13
13
  private overlayContainer;
14
+ private ngZone;
14
15
  private toastFactory;
15
16
  private toastConfig;
16
17
  get toasts(): ComponentRef<T>[];
@@ -18,12 +19,15 @@ export declare class KbqToastService<T extends KbqToastComponent = KbqToastCompo
18
19
  readonly hovered: BehaviorSubject<boolean>;
19
20
  readonly focused: BehaviorSubject<boolean>;
20
21
  readonly animation: BehaviorSubject<AnimationEvent | null>;
22
+ timer: import("rxjs").Observable<number>;
21
23
  private containerInstance;
22
24
  private overlayRef;
23
25
  private portal;
26
+ private timerSubscription;
24
27
  private toastsDict;
25
28
  private templatesDict;
26
- constructor(overlay: Overlay, injector: Injector, overlayContainer: OverlayContainer, toastFactory: any, toastConfig: KbqToastConfig);
29
+ constructor(overlay: Overlay, injector: Injector, overlayContainer: OverlayContainer, ngZone: NgZone, toastFactory: any, toastConfig: KbqToastConfig);
30
+ ngOnDestroy(): void;
27
31
  show(data: KbqToastData, duration?: number, onTop?: boolean): {
28
32
  ref: ComponentRef<T>;
29
33
  id: number;
@@ -50,6 +54,6 @@ export declare class KbqToastService<T extends KbqToastComponent = KbqToastCompo
50
54
  private getBottomRight;
51
55
  private getCenter;
52
56
  private getGlobalOverlayPosition;
53
- static ɵfac: i0.ɵɵFactoryDeclaration<KbqToastService<any>, [null, null, null, null, { optional: true; }]>;
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<KbqToastService<any>, [null, null, null, null, null, { optional: true; }]>;
54
58
  static ɵprov: i0.ɵɵInjectableDeclaration<KbqToastService<any>>;
55
59
  }
@@ -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 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 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
  }