@ptsecurity/mosaic 17.1.0 → 17.2.1

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 (198) hide show
  1. package/autocomplete/_autocomplete-theme.scss +4 -3
  2. package/autocomplete/autocomplete.scss +7 -11
  3. package/button/_button-base.scss +10 -10
  4. package/button/_button-theme.scss +32 -32
  5. package/button/button.scss +9 -15
  6. package/button-toggle/_button-toggle-theme.scss +32 -24
  7. package/button-toggle/button-toggle.scss +21 -60
  8. package/card/_card-theme.scss +23 -20
  9. package/card/card.component.scss +2 -1
  10. package/checkbox/_checkbox-theme.scss +33 -29
  11. package/checkbox/checkbox.scss +7 -6
  12. package/code-block/_code-block-theme.scss +203 -115
  13. package/code-block/actionbar.component.scss +5 -7
  14. package/code-block/code-block.scss +5 -6
  15. package/core/forms/_forms-theme.scss +18 -47
  16. package/core/option/_optgroup-theme.scss +5 -5
  17. package/core/option/_option-action-theme.scss +1 -4
  18. package/core/option/_option-theme.scss +8 -10
  19. package/core/option/option.scss +5 -4
  20. package/core/pop-up/pop-up-trigger.d.ts +3 -1
  21. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -11
  22. package/core/styles/_mosaic-theme.scss +3 -3
  23. package/core/styles/common/_groups.scss +3 -2
  24. package/core/styles/common/_popup.scss +5 -4
  25. package/core/styles/common/_tokens.scss +49 -0
  26. package/core/styles/theming/_alerts.scss +28 -35
  27. package/core/styles/theming/_badges.scss +39 -38
  28. package/core/styles/theming/_components-theming.scss +13 -13
  29. package/core/styles/theming/_scrollbars.scss +24 -27
  30. package/core/styles/theming/_theming.scss +10 -8
  31. package/core/styles/typography/_typography-utils.scss +1 -1
  32. package/core/styles/typography/_typography.scss +29 -28
  33. package/core/styles/visual/_layout.scss +14 -13
  34. package/datepicker/_datepicker-theme.scss +19 -21
  35. package/datepicker/calendar-body.scss +6 -9
  36. package/datepicker/calendar-header.scss +9 -26
  37. package/datepicker/calendar.scss +5 -16
  38. package/datepicker/datepicker-content.scss +2 -4
  39. package/datepicker/datepicker-input.scss +2 -1
  40. package/datepicker/datepicker-toggle.scss +3 -2
  41. package/divider/_divider-theme.scss +5 -3
  42. package/divider/divider.scss +5 -4
  43. package/dl/_dl-theme.scss +13 -37
  44. package/dl/dl.scss +13 -46
  45. package/dropdown/_dropdown-theme.scss +19 -17
  46. package/dropdown/dropdown-item.scss +7 -6
  47. package/dropdown/dropdown.scss +11 -26
  48. package/ellipsis-center/ellipsis-center.directive.d.ts +3 -2
  49. package/esm2022/button/button.component.mjs +2 -2
  50. package/esm2022/button-toggle/button-toggle.component.mjs +2 -2
  51. package/esm2022/code-block/actionbar.component.mjs +2 -2
  52. package/esm2022/code-block/code-block.component.mjs +2 -2
  53. package/esm2022/core/pop-up/pop-up-trigger.mjs +19 -11
  54. package/esm2022/core/version.mjs +2 -2
  55. package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
  56. package/esm2022/dropdown/dropdown.component.mjs +3 -3
  57. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -5
  58. package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
  59. package/esm2022/file-upload/single-file-upload.component.mjs +2 -2
  60. package/esm2022/form-field/form-field.mjs +2 -2
  61. package/esm2022/input/input-password.mjs +2 -3
  62. package/esm2022/loader-overlay/loader-overlay.component.mjs +2 -2
  63. package/esm2022/markdown/markdown.component.mjs +2 -2
  64. package/esm2022/modal/modal.component.mjs +8 -8
  65. package/esm2022/navbar/navbar-item.component.mjs +9 -9
  66. package/esm2022/navbar/navbar.component.mjs +2 -2
  67. package/esm2022/navbar/vertical-navbar.component.mjs +3 -3
  68. package/esm2022/progress-spinner/progress-spinner.component.mjs +2 -2
  69. package/esm2022/radio/radio.component.mjs +2 -2
  70. package/esm2022/select/select-option.directive.mjs +7 -5
  71. package/esm2022/select/select.component.mjs +3 -3
  72. package/esm2022/tabs/tab-header.component.mjs +2 -2
  73. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
  74. package/esm2022/timezone/timezone-option.directive.mjs +7 -5
  75. package/esm2022/timezone/timezone-select.component.mjs +2 -2
  76. package/esm2022/title/title.directive.mjs +2 -3
  77. package/esm2022/tooltip/tooltip.component.mjs +27 -12
  78. package/esm2022/tree-select/tree-select.component.mjs +3 -3
  79. package/fesm2022/ptsecurity-mosaic-button-toggle.mjs +2 -2
  80. package/fesm2022/ptsecurity-mosaic-button-toggle.mjs.map +1 -1
  81. package/fesm2022/ptsecurity-mosaic-button.mjs +2 -2
  82. package/fesm2022/ptsecurity-mosaic-button.mjs.map +1 -1
  83. package/fesm2022/ptsecurity-mosaic-code-block.mjs +4 -4
  84. package/fesm2022/ptsecurity-mosaic-code-block.mjs.map +1 -1
  85. package/fesm2022/ptsecurity-mosaic-core.mjs +19 -11
  86. package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
  87. package/fesm2022/ptsecurity-mosaic-dropdown.mjs +4 -4
  88. package/fesm2022/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  89. package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs +5 -4
  90. package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs.map +1 -1
  91. package/fesm2022/ptsecurity-mosaic-file-upload.mjs +4 -4
  92. package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  93. package/fesm2022/ptsecurity-mosaic-form-field.mjs +2 -2
  94. package/fesm2022/ptsecurity-mosaic-form-field.mjs.map +1 -1
  95. package/fesm2022/ptsecurity-mosaic-input.mjs +1 -2
  96. package/fesm2022/ptsecurity-mosaic-input.mjs.map +1 -1
  97. package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs +2 -2
  98. package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  99. package/fesm2022/ptsecurity-mosaic-markdown.mjs +2 -2
  100. package/fesm2022/ptsecurity-mosaic-markdown.mjs.map +1 -1
  101. package/fesm2022/ptsecurity-mosaic-modal.mjs +7 -7
  102. package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -1
  103. package/fesm2022/ptsecurity-mosaic-navbar.mjs +12 -12
  104. package/fesm2022/ptsecurity-mosaic-navbar.mjs.map +1 -1
  105. package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs +1 -1
  106. package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  107. package/fesm2022/ptsecurity-mosaic-radio.mjs +2 -2
  108. package/fesm2022/ptsecurity-mosaic-radio.mjs.map +1 -1
  109. package/fesm2022/ptsecurity-mosaic-select.mjs +12 -11
  110. package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -1
  111. package/fesm2022/ptsecurity-mosaic-tabs.mjs +4 -4
  112. package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -1
  113. package/fesm2022/ptsecurity-mosaic-timezone.mjs +7 -6
  114. package/fesm2022/ptsecurity-mosaic-timezone.mjs.map +1 -1
  115. package/fesm2022/ptsecurity-mosaic-title.mjs +1 -2
  116. package/fesm2022/ptsecurity-mosaic-title.mjs.map +1 -1
  117. package/fesm2022/ptsecurity-mosaic-tooltip.mjs +25 -11
  118. package/fesm2022/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  119. package/fesm2022/ptsecurity-mosaic-tree-select.mjs +2 -2
  120. package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  121. package/file-upload/_file-upload-theme.scss +87 -54
  122. package/file-upload/file-upload.scss +0 -7
  123. package/file-upload/multiple-file-upload.component.scss +23 -51
  124. package/file-upload/single-file-upload.component.scss +12 -27
  125. package/form-field/_form-field-theme.scss +45 -36
  126. package/form-field/form-field.scss +13 -14
  127. package/icon/_icon-theme.scss +27 -26
  128. package/input/_input-base.scss +3 -2
  129. package/input/_input-theme.scss +14 -14
  130. package/input/input-password.d.ts +0 -1
  131. package/input/input.scss +3 -4
  132. package/link/_link-theme.scss +35 -32
  133. package/list/_list-base.scss +4 -3
  134. package/list/_list-theme.scss +8 -8
  135. package/list/list.scss +2 -1
  136. package/loader-overlay/_loader-overlay-theme.scss +8 -8
  137. package/loader-overlay/loader-overlay.scss +7 -12
  138. package/markdown/_markdown-theme.scss +62 -44
  139. package/markdown/markdown.scss +39 -80
  140. package/modal/_modal-confirm.scss +3 -2
  141. package/modal/_modal-theme.scss +22 -23
  142. package/modal/modal.scss +20 -17
  143. package/navbar/_navbar-theme.scss +23 -22
  144. package/navbar/navbar-brand.scss +7 -9
  145. package/navbar/navbar-item.component.d.ts +4 -4
  146. package/navbar/navbar-item.scss +10 -9
  147. package/navbar/vertical-navbar.scss +4 -12
  148. package/package.json +18 -18
  149. package/popover/_popover-theme.scss +36 -36
  150. package/popover/popover.scss +15 -14
  151. package/prebuilt-themes/dark-theme.css +1 -1
  152. package/prebuilt-themes/default-theme.css +1 -1
  153. package/progress-bar/_progress-bar-theme.scss +6 -5
  154. package/progress-bar/progress-bar.scss +2 -1
  155. package/progress-spinner/_progress-spinner-theme.scss +4 -3
  156. package/progress-spinner/progress-spinner.scss +7 -12
  157. package/radio/_radio-theme.scss +33 -25
  158. package/radio/radio.scss +8 -11
  159. package/select/_select-theme.scss +15 -15
  160. package/select/select-option.directive.d.ts +3 -2
  161. package/select/select.scss +20 -43
  162. package/sidepanel/_sidepanel-theme.scss +11 -11
  163. package/sidepanel/sidepanel.scss +11 -10
  164. package/splitter/_splitter-theme.scss +5 -3
  165. package/table/_table-theme.scss +9 -9
  166. package/table/table.scss +11 -14
  167. package/tabs/_tabs-common.scss +15 -14
  168. package/tabs/_tabs-theme.scss +65 -58
  169. package/tabs/tab-group.scss +2 -1
  170. package/tabs/tab-header.scss +20 -15
  171. package/tabs/tab-nav-bar/tab-nav-bar.scss +18 -15
  172. package/tags/_tag-theme.scss +32 -29
  173. package/tags/tag-list.scss +4 -3
  174. package/tags/tag.scss +9 -8
  175. package/textarea/_textarea-base.scss +2 -4
  176. package/textarea/_textarea-theme.scss +8 -8
  177. package/textarea/textarea.scss +2 -4
  178. package/timepicker/timepicker.scss +2 -7
  179. package/timezone/_timezone-option-theme.scss +8 -8
  180. package/timezone/timezone-option.component.scss +5 -4
  181. package/timezone/timezone-option.directive.d.ts +3 -2
  182. package/title/title.directive.d.ts +0 -1
  183. package/toast/_toast-theme.scss +14 -17
  184. package/toast/toast-container.component.scss +2 -5
  185. package/toast/toast.component.scss +15 -17
  186. package/toggle/_toggle-theme.scss +23 -22
  187. package/toggle/toggle.scss +19 -21
  188. package/tooltip/_tooltip-theme.scss +27 -32
  189. package/tooltip/tooltip.component.d.ts +12 -8
  190. package/tooltip/tooltip.scss +13 -17
  191. package/tree/_tree-theme.scss +8 -8
  192. package/tree/toggle.scss +3 -5
  193. package/tree/tree-option.scss +5 -4
  194. package/tree-select/_tree-select-theme.scss +9 -9
  195. package/tree-select/tree-select.scss +18 -36
  196. package/_theming.scss +0 -10923
  197. package/_visual.scss +0 -3604
  198. package/prebuilt-visual/default-visual.css +0 -1
@@ -1,7 +1,10 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
3
 
4
- @use '../styles/typography' as *;
4
+ @use '../styles/typography/typography' as *;
5
+ @use '../styles/typography/typography-utils' as *;
6
+ @use '../styles/common/tokens' as *;
7
+
5
8
 
6
9
  @mixin mc-form-geometry($tokens) {
7
10
  .mc-form {
@@ -24,34 +27,22 @@
24
27
  $label-padding-top: calc(($form-field-size-height - $line-height) / 2);
25
28
 
26
29
  & .mc-form-row_margin {
27
- margin-bottom: var(
28
- --mc-forms-size-horizontal-row-margin-bottom,
29
- #{map.get($tokens, forms-size-horizontal-row-margin-bottom)}
30
- );
30
+ margin-bottom: mc-css-variable(forms-size-horizontal-row-margin-bottom);
31
31
  }
32
32
 
33
33
  & .mc-form__label {
34
- padding-top: var(--mc-forms-size-horizontal-label-padding-top, #{$label-padding-top});
34
+ padding-top: mc-css-variable(forms-size-horizontal-label-padding-top, #{$label-padding-top});
35
35
 
36
36
  text-align: start;
37
37
  }
38
38
 
39
39
  & .mc-form__control {
40
- padding-left: var(
41
- --mc-forms-size-horizontal-control-padding-left,
42
- #{map.get($tokens, forms-size-horizontal-control-padding-left)}
43
- );
40
+ padding-left: mc-css-variable(forms-size-horizontal-control-padding-left);
44
41
  }
45
42
 
46
43
  & .mc-form__legend {
47
- margin-top: var(
48
- --mc-forms-size-horizontal-legend-margin-top,
49
- #{map.get($tokens, forms-size-horizontal-legend-margin-top)}
50
- );
51
- margin-bottom: var(
52
- --mc-forms-size-horizontal-legend-margin-bottom,
53
- #{map.get($tokens, forms-size-horizontal-legend-margin-bottom)}
54
- );
44
+ margin-top: mc-css-variable(forms-size-horizontal-legend-margin-top);
45
+ margin-bottom: mc-css-variable(forms-size-horizontal-legend-margin-bottom);
55
46
  }
56
47
  }
57
48
 
@@ -61,21 +52,12 @@
61
52
  }
62
53
 
63
54
  & .mc-form-row_margin {
64
- margin-bottom: var(
65
- --mc-forms-size-vertical-row-margin-bottom,
66
- #{map.get($tokens, forms-size-vertical-row-margin-bottom)}
67
- );
55
+ margin-bottom: mc-css-variable(forms-size-vertical-row-margin-bottom);
68
56
  }
69
57
 
70
58
  & .mc-form__label {
71
- padding-top: var(
72
- --mc-forms-size-vertical-label-padding-top,
73
- #{map.get($tokens, forms-size-vertical-label-padding-top)}
74
- );
75
- padding-bottom: var(
76
- --mc-forms-size-vertical-label-padding-bottom,
77
- #{map.get($tokens, forms-size-vertical-label-padding-bottom)}
78
- );
59
+ padding-top: mc-css-variable(forms-size-vertical-label-padding-top);
60
+ padding-bottom: mc-css-variable(forms-size-vertical-label-padding-bottom);
79
61
 
80
62
  text-align: start;
81
63
  }
@@ -85,14 +67,8 @@
85
67
  }
86
68
 
87
69
  & .mc-form__legend {
88
- margin-top: var(
89
- --mc-forms-size-vertical-legend-margin-top,
90
- #{map.get($tokens, forms-size-vertical-legend-margin-top)}
91
- );
92
- margin-bottom: var(
93
- --mc-forms-size-vertical-legend-margin-bottom,
94
- #{map.get($tokens, forms-size-vertical-legend-margin-bottom)}
95
- );
70
+ margin-top: mc-css-variable(forms-size-vertical-legend-margin-top);
71
+ margin-bottom: mc-css-variable(forms-size-vertical-legend-margin-bottom);
96
72
  }
97
73
  }
98
74
 
@@ -105,10 +81,7 @@
105
81
  flex-direction: row;
106
82
 
107
83
  & .mc-form__row:not(:first-child) {
108
- padding-left: var(
109
- --mc-forms-size-vertical-control-padding-left,
110
- #{map.get($tokens, forms-size-vertical-control-padding-left)}
111
- );
84
+ padding-left: mc-css-variable(forms-size-vertical-control-padding-left);
112
85
  }
113
86
  }
114
87
  }
@@ -118,7 +91,7 @@
118
91
 
119
92
  $foreground: map.get($theme, foreground);
120
93
 
121
- $forms: map.get(map.get($theme, components), forms);
94
+ $forms: map.get($theme, components, forms);
122
95
 
123
96
  .mc-form__label {
124
97
  color: map.get($forms, label);
@@ -130,13 +103,11 @@
130
103
  }
131
104
 
132
105
  @mixin mc-forms-typography($config) {
133
- $tokens: map.get($config, tokens);
134
-
135
106
  .mc-form__label {
136
- @include mc-typography-level-to-styles($config, map.get($tokens, forms-font-default-label));
107
+ @include mc-typography-css-variables(forms, default-label);
137
108
  }
138
109
 
139
110
  .mc-form__legend {
140
- @include mc-typography-level-to-styles($config, map.get($tokens, forms-font-default-legend));
111
+ @include mc-typography-css-variables(forms, default-legend);
141
112
  }
142
113
  }
@@ -2,23 +2,23 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../styles/typography' as *;
5
+ @use '../styles/common/tokens' as *;
6
+
5
7
 
6
8
  @mixin mc-optgroup-theme($theme) {
7
9
  $foreground: map.get($theme, foreground);
8
10
 
9
11
  .mc-optgroup-label {
10
- color: map.get($foreground, text);
12
+ color: mc-css-variable(foreground-text, map.get($foreground, text));
11
13
  }
12
14
 
13
15
  .mc-disabled .mc-optgroup-label {
14
- color: map.get($foreground, text-disabled);
16
+ color: mc-css-variable(foreground-text-disabled, map.get($foreground, text-disabled));
15
17
  }
16
18
  }
17
19
 
18
20
  @mixin mc-optgroup-typography($config) {
19
- $tokens: map.get($config, tokens);
20
-
21
21
  .mc-optgroup-label {
22
- @include mc-typography-level-to-styles($config, map.get($tokens, optgroup-font-default));
22
+ @include mc-typography-css-variables(optgroup, default);
23
23
  }
24
24
  }
@@ -5,16 +5,13 @@
5
5
 
6
6
 
7
7
  @mixin mc-option-action-theme($theme) {
8
- $foreground: map.get($theme, foreground);
9
- $background: map.get($theme, background);
10
-
11
8
  $secondary: map.get($theme, secondary);
12
9
 
13
10
  $is-dark: map.get($theme, is-dark);
14
11
 
15
12
  .mc-option-action {
16
13
  &.cdk-keyboard-focused {
17
- border-color: map.get(map.get($theme, states), focused-color);
14
+ border-color: map.get($theme, states, focused-color);
18
15
  }
19
16
 
20
17
  &:active,
@@ -2,42 +2,40 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../styles/typography' as *;
5
+ @use '../styles/common/tokens' as *;
6
+
5
7
 
6
8
  @mixin mc-option-theme($theme) {
7
9
  $foreground: map.get($theme, foreground);
8
10
  $background: map.get($theme, background);
9
11
 
10
- $primary: map.get($theme, primary);
11
-
12
12
  .mc-option {
13
- color: map.get($foreground, text);
13
+ color: mc-css-variable(foreground-text, map.get($foreground, text));
14
14
 
15
15
  &:hover:not(.mc-disabled) {
16
16
  .mc-option-overlay {
17
- background: map.get($background, overlay-hover);
17
+ background: mc-css-variable(background-overlay-hover, map.get($background, overlay-hover));
18
18
  }
19
19
  }
20
20
 
21
21
  &.mc-active {
22
- border-color: map.get(map.get($theme, states), focused-color);
22
+ border-color: mc-css-variable(states-focused-color, map.get($theme, states, focused-color));
23
23
  }
24
24
 
25
25
  &.mc-selected {
26
- background: map.get(map.get($theme, states), selected-color);
26
+ background: mc-css-variable(states-selected-color, map.get($theme, states, selected-color));
27
27
  }
28
28
 
29
29
  &.mc-disabled {
30
30
  background: transparent;
31
31
 
32
- color: map.get($foreground, text-disabled);
32
+ color: mc-css-variable(foreground-text-disabled, map.get($foreground, text-disabled));
33
33
  }
34
34
  }
35
35
  }
36
36
 
37
37
  @mixin mc-option-typography($config) {
38
- $tokens: map.get($config, tokens);
39
-
40
38
  .mc-option {
41
- @include mc-typography-level-to-styles($config, map.get($tokens, option-font-default));
39
+ @include mc-typography-css-variables(option, default);
42
40
  }
43
41
  }
@@ -2,6 +2,7 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../styles/tokens';
5
+ @use '../styles/common/tokens' as *;
5
6
 
6
7
 
7
8
  $tokens: meta.module-variables(tokens) !default;
@@ -17,16 +18,16 @@ $tokens: meta.module-variables(tokens) !default;
17
18
 
18
19
  max-width: 100%;
19
20
 
20
- height: var(--mc-option-size-height, map.get($tokens, option-size-height));
21
+ height: mc-css-variable(option-size-height);
21
22
 
22
- border: var(--mc-option-size-border-width, map.get($tokens, option-size-border-width)) solid transparent;
23
+ border: mc-css-variable(option-size-border-width) solid transparent;
23
24
 
24
25
  cursor: pointer;
25
26
 
26
27
  outline: none;
27
28
 
28
- padding-left: var(--mc-option-size-horizontal-padding, map.get($tokens, option-size-horizontal-padding));
29
- padding-right: var(--mc-option-size-horizontal-padding, map.get($tokens, option-size-horizontal-padding));
29
+ padding-left: mc-css-variable(option-size-horizontal-padding);
30
+ padding-right: mc-css-variable(option-size-horizontal-padding);
30
31
 
31
32
  -webkit-tap-highlight-color: transparent;
32
33
 
@@ -33,12 +33,13 @@ export declare abstract class McPopUpTrigger<T> {
33
33
  protected overlayRef: OverlayRef | null;
34
34
  protected portal: ComponentPortal<T>;
35
35
  protected instance: any | null;
36
- protected listeners: Map<string, EventListenerOrEventListenerObject>;
36
+ protected listeners: Map<string, EventListener>;
37
37
  protected closingActionsSubscription: Subscription;
38
38
  protected readonly availablePositions: {
39
39
  [key: string]: ConnectionPositionPair;
40
40
  };
41
41
  protected readonly destroyed: Subject<void>;
42
+ protected triggerName: string;
42
43
  protected constructor(overlay: Overlay, elementRef: ElementRef, ngZone: NgZone, scrollDispatcher: ScrollDispatcher, hostView: ViewContainerRef, scrollStrategy: any, direction?: Directionality | undefined);
43
44
  abstract updateClassMap(newPlacement?: string): void;
44
45
  abstract updateData(): void;
@@ -63,6 +64,7 @@ export declare abstract class McPopUpTrigger<T> {
63
64
  protected getPriorityPlacementStrategy(value: string | string[]): ConnectionPositionPair[];
64
65
  protected getPrioritizedPositions(): ConnectionPositionPair[];
65
66
  protected clearListeners(): void;
67
+ private createListener;
66
68
  private addEventListener;
67
69
  private removeEventListener;
68
70
  private subscribeOnClosingActions;
@@ -1,19 +1,23 @@
1
1
  @use 'sass:map';
2
2
 
3
+ @use '../../styles/common/tokens' as *;
3
4
 
4
- @mixin mc-pseudo-checkbox-color($states) {
5
- border-color: map.get($states, border);
5
+
6
+ @mixin mc-pseudo-checkbox-color($component, $style-name) {
7
+ $style: map.get($component, $style-name);
8
+
9
+ border-color: mc-css-variable(checkbox-#{$style-name}-border, map.get($style, border));
6
10
 
7
11
  & .mc-checkbox-checkmark,
8
12
  & .mc-checkbox-mixedmark {
9
- color: map.get($states, color);
13
+ color: mc-css-variable(checkbox-#{$style-name}-color, map.get($style, color));
10
14
  }
11
15
 
12
16
  &.mc-checked,
13
17
  &.mc-indeterminate {
14
- border-color: map.get($states, checked, border);
18
+ border-color: mc-css-variable(checkbox-#{$style-name}-checked-border, map.get($style, checked, border));
15
19
 
16
- background: map.get($states, checked, background);
20
+ background: mc-css-variable(checkbox-#{$style-name}-checked-background, map.get($style, checked, background));
17
21
  }
18
22
  }
19
23
 
@@ -21,27 +25,28 @@
21
25
  $foreground: map.get($theme, foreground);
22
26
  $background: map.get($theme, background);
23
27
 
24
- $checkbox: map.get(map.get($theme, components), checkbox);
28
+ $checkbox: map.get($theme, components, checkbox);
25
29
 
26
30
  .mc-pseudo-checkbox {
27
31
  &.mc-primary {
28
- @include mc-pseudo-checkbox-color(map.get($checkbox, default));
32
+ @include mc-pseudo-checkbox-color($checkbox, default);
29
33
  }
30
34
 
31
35
  &.mc-error {
32
- @include mc-pseudo-checkbox-color(map.get($checkbox, error));
36
+ @include mc-pseudo-checkbox-color($checkbox, error);
33
37
  }
34
38
 
35
39
  &.mc-disabled,
36
40
  &.mc-primary.mc-disabled,
37
41
  &.mc-error.mc-disabled {
38
- border-color: map.get($foreground, border);
42
+ border-color: mc-css-variable(foreground-border, map.get($foreground, border));
39
43
 
40
- background-color: map.get($background, background-disabled);
44
+ background-color: mc-css-variable(
45
+ background-background-disabled, map.get($background, background-disabled));
41
46
 
42
47
  & .mc-checkbox-checkmark,
43
48
  & .mc-checkbox-mixedmark {
44
- color: map.get($foreground, text-disabled);
49
+ color: mc-css-variable(foreground-text-disabled, map.get($foreground, text-disabled));
45
50
  }
46
51
  }
47
52
  }
@@ -102,13 +102,13 @@
102
102
  }
103
103
 
104
104
 
105
- @mixin mosaic-typography($config: null, $md-config: null) {
105
+ @mixin mosaic-typography($tokens, $config: null, $md-config: null) {
106
106
  @if $config == null {
107
- $config: mc-typography-config();
107
+ $config: mc-typography-config($tokens);
108
108
  }
109
109
 
110
110
  @if $md-config == null {
111
- $md-config: mc-markdown-typography-config();
111
+ $md-config: mc-markdown-typography-config($tokens);
112
112
  }
113
113
 
114
114
  @include mc-base-typography($config);
@@ -2,6 +2,7 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../tokens';
5
+ @use '../common/tokens' as *;
5
6
 
6
7
 
7
8
  $tokens: meta.module-variables(tokens) !default;
@@ -82,7 +83,7 @@ $tokens: meta.module-variables(tokens) !default;
82
83
  &:first-child:not(:last-child) {
83
84
  @include border-bottom-radius(0);
84
85
 
85
- border-top-right-radius: var(--mc-button-size-border-radius, map.get($tokens, button-size-border-radius));
86
+ border-top-right-radius: mc-css-variable(button-size-border-radius);
86
87
 
87
88
  > .mc-form-field__container {
88
89
  @include border-bottom-radius(0);
@@ -92,7 +93,7 @@ $tokens: meta.module-variables(tokens) !default;
92
93
  &:last-child:not(:first-child) {
93
94
  @include border-top-radius(0);
94
95
 
95
- border-bottom-left-radius: var(--mc-button-size-border-radius, map.get($tokens, button-size-border-radius));
96
+ border-bottom-left-radius: mc-css-variable(button-size-border-radius);
96
97
 
97
98
  > .mc-form-field__container {
98
99
  @include border-top-radius(0);
@@ -1,11 +1,12 @@
1
1
  @use 'sass:map';
2
+ @use '../common/tokens' as *;
2
3
 
3
4
 
4
5
  @mixin popup-params($theme) {
5
- $popup: map.get(map.get($theme, components), popup);
6
+ $popup: map.get($theme, components, popup);
6
7
 
7
- box-shadow: map.get($popup, shadow);
8
- border-color: map.get($popup, border);
8
+ box-shadow: mc-css-variable(popup-shadow, map-get($popup, shadow));
9
+ border-color: mc-css-variable(popup-border, map-get($popup, border));
9
10
 
10
- background-color: map.get($popup, background);
11
+ background-color: mc-css-variable(popup-background, map-get($popup, background));
11
12
  }
@@ -0,0 +1,49 @@
1
+ @use 'sass:map';
2
+ @use 'sass:meta';
3
+ @use 'sass:string';
4
+ @use 'sass:list';
5
+
6
+ @use '../tokens';
7
+
8
+
9
+ $tokens: meta.module-variables(tokens);
10
+
11
+
12
+ @function mc-css-variable($name, $value: null) {
13
+ @if $value {
14
+ @return var(--mc-#{$name}, $value);
15
+ } @else {
16
+ @return var(--mc-#{$name}, map.get($tokens, $name));
17
+ }
18
+ }
19
+
20
+ @function getToken($name) {
21
+ @return map.get($tokens, $name);
22
+ }
23
+
24
+ @mixin mc-css-font-variable($component, $component-property, $font-property, $font) {
25
+ #{$font-property}: var(
26
+ --mc-#{$component}-#{$font}#{$component-property}-#{$font-property},
27
+ map.get($tokens, #{$component}-#{$font}#{$component-property}-#{$font-property})
28
+ );
29
+ }
30
+
31
+ @mixin mc-typography-css-variables($component, $property) {
32
+ @include mc-css-font-variable($component, $property, font-size, font-);
33
+ @include mc-css-font-variable($component, $property, font-weight, font-);
34
+ @include mc-css-font-variable($component, $property, line-height, font-);
35
+ @include mc-css-font-variable($component, $property, font-family, font-);
36
+ @include mc-css-font-variable($component, $property, text-transform, font-);
37
+ @include mc-css-font-variable($component, $property, font-feature-settings, font-);
38
+ @include mc-css-font-variable($component, $property, letter-spacing, font-);
39
+ }
40
+
41
+ @mixin mc-typography-level-to-styles_css-variables($component, $property) {
42
+ @include mc-css-font-variable($component, $property, font-size, '');
43
+ @include mc-css-font-variable($component, $property, font-weight, '');
44
+ @include mc-css-font-variable($component, $property, line-height, '');
45
+ @include mc-css-font-variable($component, $property, font-family, '');
46
+ @include mc-css-font-variable($component, $property, text-transform, '');
47
+ @include mc-css-font-variable($component, $property, font-feature-settings, '');
48
+ @include mc-css-font-variable($component, $property, letter-spacing, '');
49
+ }
@@ -2,6 +2,7 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../typography/typography-utils' as *;
5
+ @use '../common/tokens' as *;
5
6
 
6
7
  .mc-alert {
7
8
  display: flex;
@@ -51,83 +52,77 @@
51
52
  }
52
53
  }
53
54
 
54
- @mixin alert-theme($alert) {
55
- background-color: map.get($alert, background);
56
- border-color: map.get($alert, border);
55
+ @mixin alert-theme($component, $style-name) {
56
+ $style: map.get($component, $style-name);
57
+
58
+ background-color: mc-css-variable(alert-#{$style-name}-background, map.get($style, background));
59
+ border-color: mc-css-variable(alert-#{$style-name}-border, map.get($style, border));
57
60
 
58
61
  .mc-icon.mc-alert__icon {
59
- color: map.get($alert, icon);
62
+ color: mc-css-variable(alert-#{$style-name}-icon, map.get($style, icon));
60
63
  }
61
64
  }
62
65
 
63
66
  @mixin mc-alert-theme($theme) {
64
67
  $foreground: map.get($theme, foreground);
65
68
 
66
- $alert: map.get(map.get($theme, components), alert);
67
-
68
- $is-dark: map.get($theme, is-dark);
69
+ $alert: map.get($theme, components, alert);
69
70
 
70
71
  .mc-alert__close:focus {
71
72
  outline: none;
72
73
  }
73
74
 
74
75
  .mc-alert {
75
- color: map.get($foreground, text);
76
+ color: mc-css-variable(foreground-text, map.get($foreground, text));
76
77
 
77
78
  @include mc-alert-geometry(map.get($theme, tokens));
78
79
  }
79
80
 
80
81
  .mc-alert_error {
81
- @include alert-theme(map.get($alert, error));
82
+ @include alert-theme($alert, error);
82
83
  }
83
84
 
84
85
  .mc-alert_warning {
85
- @include alert-theme(map.get($alert, warning));
86
+ @include alert-theme($alert, warning);
86
87
  }
87
88
 
88
89
  .mc-alert_success {
89
- @include alert-theme(map.get($alert, success));
90
+ @include alert-theme($alert, success);
90
91
  }
91
92
 
92
93
  .mc-alert_info {
93
- @include alert-theme(map.get($alert, info));
94
+ @include alert-theme($alert, info);
94
95
  }
95
96
 
96
97
  .mc-alert:not(.mc-alert_error):not(.mc-alert_warning):not(.mc-alert_success):not(.mc-alert_info) {
97
- @include alert-theme(map.get($alert, default));
98
+ @include alert-theme($alert, default);
98
99
  }
99
100
  }
100
101
 
101
102
  @mixin mc-alert-geometry($tokens) {
102
- border: var(--mc-alert-size-border-width, map.get($tokens, alert-size-border-width)) solid transparent;
103
- border-radius: var(--mc-alert-size-border-radius, map.get($tokens, alert-size-border-radius));
103
+ border: mc-css-variable(alert-size-border-width) solid transparent;
104
+ border-radius: mc-css-variable(alert-size-border-radius);
104
105
 
105
106
  .mc-alert__icon {
106
- margin-right: var(--mc-alert-size-icon-margin, map.get($tokens, alert-size-icon-margin));
107
+ margin-right: mc-css-variable(alert-size-icon-margin);
107
108
  }
108
109
 
109
110
  padding: {
110
- right: calc(
111
- var(--mc-alert-size-horizontal-padding, #{map.get($tokens, alert-size-horizontal-padding)}) -
112
- var(--mc-alert-size-border-width, #{map.get($tokens, alert-size-border-width)})
113
- );
114
- left: calc(
115
- var(--mc-alert-size-horizontal-padding, #{map.get($tokens, alert-size-horizontal-padding)}) -
116
- var(--mc-alert-size-border-width, #{map.get($tokens, alert-size-border-width)})
117
- );
111
+ right: mc-css-variable(alert-size-horizontal-padding);
112
+ left: mc-css-variable(alert-size-horizontal-padding);
118
113
  };
119
114
 
120
115
  &:not(.mc-alert_small) {
121
116
  padding: {
122
- top: var(--mc-alert-size-vertical-padding, map.get($tokens, alert-size-vertical-padding));
123
- bottom: var(--mc-alert-size-vertical-padding, map.get($tokens, alert-size-vertical-padding));
117
+ top: mc-css-variable(alert-size-vertical-padding);
118
+ bottom: mc-css-variable(alert-size-vertical-padding);
124
119
  };
125
120
  }
126
121
 
127
122
  &.mc-alert_small {
128
123
  padding: {
129
- top: var(--mc-alert-size-small-vertical-padding, map.get($tokens, alert-size-small-vertical-padding));
130
- bottom: var(--mc-alert-size-small-vertical-padding, map.get($tokens, alert-size-small-vertical-padding));
124
+ top: mc-css-variable(alert-size-small-vertical-padding);
125
+ bottom: mc-css-variable(alert-size-small-vertical-padding);
131
126
  };
132
127
  }
133
128
 
@@ -140,25 +135,23 @@
140
135
  }
141
136
 
142
137
  @mixin mc-alert-typography($config) {
143
- $tokens: map-get($config, tokens);
144
-
145
138
  .mc-alert:not(.mc-alert_small) {
146
- @include mc-typography-level-to-styles($config, map.get($tokens, alert-font-default-body));
139
+ @include mc-typography-css-variables(alert, default-body);
147
140
 
148
141
  header {
149
- @include mc-typography-level-to-styles($config, map.get($tokens, alert-font-default-header));
142
+ @include mc-typography-css-variables(alert, default-header);
150
143
  }
151
144
  }
152
145
 
153
146
  .mc-alert.mc-alert_small {
154
- @include mc-typography-level-to-styles($config, map.get($tokens, alert-font-small-body));
147
+ @include mc-typography-css-variables(alert, small-body);
155
148
 
156
149
  header {
157
- @include mc-typography-level-to-styles($config, map.get($tokens, alert-font-small-header));
150
+ @include mc-typography-css-variables(alert, small-header);
158
151
  }
159
152
 
160
153
  .mc-link__text {
161
- @include mc-typography-level-to-styles($config, map.get($tokens, alert-font-small-body));
154
+ @include mc-typography-css-variables(alert, small-body);
162
155
  }
163
156
  }
164
157