@ptsecurity/mosaic 17.1.0 → 17.2.0

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 (181) hide show
  1. package/autocomplete/_autocomplete-theme.scss +2 -1
  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 +18 -57
  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 +201 -113
  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 +17 -46
  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/styles/_mosaic-theme.scss +3 -3
  22. package/core/styles/common/_popup.scss +4 -3
  23. package/core/styles/common/_tokens.scss +39 -0
  24. package/core/styles/theming/_alerts.scss +16 -24
  25. package/core/styles/theming/_badges.scss +7 -8
  26. package/datepicker/_datepicker-theme.scss +18 -19
  27. package/datepicker/calendar-body.scss +6 -9
  28. package/datepicker/calendar-header.scss +9 -26
  29. package/datepicker/calendar.scss +5 -16
  30. package/datepicker/datepicker-content.scss +2 -4
  31. package/datepicker/datepicker-input.scss +2 -1
  32. package/datepicker/datepicker-toggle.scss +3 -2
  33. package/divider/_divider-theme.scss +4 -2
  34. package/divider/divider.scss +5 -4
  35. package/dl/_dl-theme.scss +12 -36
  36. package/dl/dl.scss +13 -46
  37. package/dropdown/_dropdown-theme.scss +19 -17
  38. package/dropdown/dropdown-item.scss +7 -6
  39. package/dropdown/dropdown.scss +11 -26
  40. package/ellipsis-center/ellipsis-center.directive.d.ts +3 -2
  41. package/esm2022/button/button.component.mjs +2 -2
  42. package/esm2022/code-block/actionbar.component.mjs +2 -2
  43. package/esm2022/code-block/code-block.component.mjs +2 -2
  44. package/esm2022/core/pop-up/pop-up-trigger.mjs +19 -11
  45. package/esm2022/core/version.mjs +2 -2
  46. package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
  47. package/esm2022/dropdown/dropdown.component.mjs +3 -3
  48. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -5
  49. package/esm2022/file-upload/multiple-file-upload.component.mjs +2 -2
  50. package/esm2022/file-upload/single-file-upload.component.mjs +2 -2
  51. package/esm2022/form-field/form-field.mjs +2 -2
  52. package/esm2022/input/input-password.mjs +2 -3
  53. package/esm2022/loader-overlay/loader-overlay.component.mjs +2 -2
  54. package/esm2022/markdown/markdown.component.mjs +2 -2
  55. package/esm2022/modal/modal.component.mjs +6 -6
  56. package/esm2022/navbar/navbar-item.component.mjs +9 -9
  57. package/esm2022/progress-spinner/progress-spinner.component.mjs +2 -2
  58. package/esm2022/radio/radio.component.mjs +2 -2
  59. package/esm2022/select/select-option.directive.mjs +7 -5
  60. package/esm2022/select/select.component.mjs +3 -3
  61. package/esm2022/timezone/timezone-option.directive.mjs +7 -5
  62. package/esm2022/timezone/timezone-select.component.mjs +2 -2
  63. package/esm2022/title/title.directive.mjs +2 -3
  64. package/esm2022/tooltip/tooltip.component.mjs +27 -12
  65. package/esm2022/tree-select/tree-select.component.mjs +3 -3
  66. package/fesm2022/ptsecurity-mosaic-button.mjs +2 -2
  67. package/fesm2022/ptsecurity-mosaic-button.mjs.map +1 -1
  68. package/fesm2022/ptsecurity-mosaic-code-block.mjs +4 -4
  69. package/fesm2022/ptsecurity-mosaic-code-block.mjs.map +1 -1
  70. package/fesm2022/ptsecurity-mosaic-core.mjs +19 -11
  71. package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
  72. package/fesm2022/ptsecurity-mosaic-dropdown.mjs +4 -4
  73. package/fesm2022/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  74. package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs +5 -4
  75. package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs.map +1 -1
  76. package/fesm2022/ptsecurity-mosaic-file-upload.mjs +4 -4
  77. package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  78. package/fesm2022/ptsecurity-mosaic-form-field.mjs +2 -2
  79. package/fesm2022/ptsecurity-mosaic-form-field.mjs.map +1 -1
  80. package/fesm2022/ptsecurity-mosaic-input.mjs +1 -2
  81. package/fesm2022/ptsecurity-mosaic-input.mjs.map +1 -1
  82. package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs +2 -2
  83. package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  84. package/fesm2022/ptsecurity-mosaic-markdown.mjs +2 -2
  85. package/fesm2022/ptsecurity-mosaic-markdown.mjs.map +1 -1
  86. package/fesm2022/ptsecurity-mosaic-modal.mjs +5 -5
  87. package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -1
  88. package/fesm2022/ptsecurity-mosaic-navbar.mjs +8 -8
  89. package/fesm2022/ptsecurity-mosaic-navbar.mjs.map +1 -1
  90. package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs +1 -1
  91. package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  92. package/fesm2022/ptsecurity-mosaic-radio.mjs +2 -2
  93. package/fesm2022/ptsecurity-mosaic-radio.mjs.map +1 -1
  94. package/fesm2022/ptsecurity-mosaic-select.mjs +12 -11
  95. package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -1
  96. package/fesm2022/ptsecurity-mosaic-timezone.mjs +7 -6
  97. package/fesm2022/ptsecurity-mosaic-timezone.mjs.map +1 -1
  98. package/fesm2022/ptsecurity-mosaic-title.mjs +1 -2
  99. package/fesm2022/ptsecurity-mosaic-title.mjs.map +1 -1
  100. package/fesm2022/ptsecurity-mosaic-tooltip.mjs +25 -11
  101. package/fesm2022/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  102. package/fesm2022/ptsecurity-mosaic-tree-select.mjs +2 -2
  103. package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  104. package/file-upload/_file-upload-theme.scss +87 -54
  105. package/file-upload/file-upload.scss +0 -7
  106. package/file-upload/multiple-file-upload.component.scss +14 -42
  107. package/file-upload/single-file-upload.component.scss +9 -24
  108. package/form-field/_form-field-theme.scss +43 -34
  109. package/form-field/form-field.scss +12 -13
  110. package/icon/_icon-theme.scss +26 -25
  111. package/input/_input-base.scss +3 -2
  112. package/input/_input-theme.scss +14 -14
  113. package/input/input-password.d.ts +0 -1
  114. package/input/input.scss +3 -4
  115. package/link/_link-theme.scss +34 -31
  116. package/list/_list-base.scss +4 -3
  117. package/list/_list-theme.scss +8 -8
  118. package/list/list.scss +2 -1
  119. package/loader-overlay/_loader-overlay-theme.scss +8 -8
  120. package/loader-overlay/loader-overlay.scss +7 -12
  121. package/markdown/_markdown-theme.scss +61 -43
  122. package/markdown/markdown.scss +39 -80
  123. package/modal/_modal-confirm.scss +3 -2
  124. package/modal/_modal-theme.scss +20 -21
  125. package/modal/modal.scss +18 -15
  126. package/navbar/_navbar-theme.scss +19 -18
  127. package/navbar/navbar-brand.scss +7 -9
  128. package/navbar/navbar-item.component.d.ts +4 -4
  129. package/navbar/navbar-item.scss +8 -7
  130. package/navbar/vertical-navbar.scss +4 -12
  131. package/package.json +7 -7
  132. package/popover/_popover-theme.scss +35 -35
  133. package/popover/popover.scss +15 -14
  134. package/prebuilt-themes/dark-theme.css +1 -1
  135. package/prebuilt-themes/default-theme.css +1 -1
  136. package/progress-bar/_progress-bar-theme.scss +6 -5
  137. package/progress-bar/progress-bar.scss +2 -1
  138. package/progress-spinner/_progress-spinner-theme.scss +4 -3
  139. package/progress-spinner/progress-spinner.scss +7 -12
  140. package/radio/_radio-theme.scss +32 -24
  141. package/radio/radio.scss +8 -11
  142. package/select/_select-theme.scss +13 -13
  143. package/select/select-option.directive.d.ts +3 -2
  144. package/select/select.scss +19 -42
  145. package/sidepanel/_sidepanel-theme.scss +9 -9
  146. package/sidepanel/sidepanel.scss +11 -10
  147. package/splitter/_splitter-theme.scss +5 -3
  148. package/table/_table-theme.scss +9 -9
  149. package/table/table.scss +11 -14
  150. package/tabs/_tabs-common.scss +15 -14
  151. package/tabs/_tabs-theme.scss +63 -56
  152. package/tabs/tab-group.scss +2 -1
  153. package/tabs/tab-header.scss +5 -4
  154. package/tabs/tab-nav-bar/tab-nav-bar.scss +4 -3
  155. package/tags/_tag-theme.scss +30 -27
  156. package/tags/tag-list.scss +4 -3
  157. package/tags/tag.scss +9 -8
  158. package/textarea/_textarea-base.scss +2 -4
  159. package/textarea/_textarea-theme.scss +8 -8
  160. package/textarea/textarea.scss +2 -4
  161. package/timepicker/timepicker.scss +2 -7
  162. package/timezone/_timezone-option-theme.scss +7 -7
  163. package/timezone/timezone-option.component.scss +5 -4
  164. package/timezone/timezone-option.directive.d.ts +3 -2
  165. package/title/title.directive.d.ts +0 -1
  166. package/toast/_toast-theme.scss +13 -16
  167. package/toast/toast-container.component.scss +2 -5
  168. package/toast/toast.component.scss +15 -17
  169. package/toggle/_toggle-theme.scss +22 -21
  170. package/toggle/toggle.scss +19 -21
  171. package/tooltip/_tooltip-theme.scss +26 -31
  172. package/tooltip/tooltip.component.d.ts +12 -8
  173. package/tooltip/tooltip.scss +13 -17
  174. package/tree/_tree-theme.scss +8 -8
  175. package/tree/toggle.scss +3 -5
  176. package/tree/tree-option.scss +5 -4
  177. package/tree-select/_tree-select-theme.scss +9 -9
  178. package/tree-select/tree-select.scss +17 -35
  179. package/_theming.scss +0 -10923
  180. package/_visual.scss +0 -3604
  181. package/prebuilt-visual/default-visual.css +0 -1
@@ -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;
@@ -13,7 +14,7 @@ $tokens: meta.module-variables(tokens) !default;
13
14
 
14
15
  &,
15
16
  .mc-input {
16
- border-radius: var(--mc-form-field-size-border-radius, map.get($tokens, form-field-size-border-radius));
17
+ border-radius: mc-css-variable(form-field-size-border-radius);
17
18
  }
18
19
 
19
20
  &:hover {
@@ -27,7 +28,7 @@ $tokens: meta.module-variables(tokens) !default;
27
28
 
28
29
  .mc-form-field-type-input-password {
29
30
  & .mc-input {
30
- padding-right: var(--mc-form-field-size-button-width, map.get($tokens, form-field-size-button-width));
31
+ padding-right: mc-css-variable(form-field-size-button-width);
31
32
  }
32
33
  }
33
34
 
@@ -49,9 +50,7 @@ $tokens: meta.module-variables(tokens) !default;
49
50
  left: 0;
50
51
  }
51
52
 
52
- margin-top: var(
53
- --mc-form-field-password-hint-size-margin-top, map.get($tokens, form-field-password-hint-size-margin-top)
54
- );
53
+ margin-top: mc-css-variable(form-field-password-hint-size-margin-top);
55
54
 
56
55
  &:first-child {
57
56
  margin-top: map.get($tokens, size-m);
@@ -59,16 +58,16 @@ $tokens: meta.module-variables(tokens) !default;
59
58
  }
60
59
 
61
60
  .mc-form-field__hint > .mc-hint {
62
- margin-top: var(--mc-form-field-hint-size-margin-top, map.get($tokens, form-field-hint-size-margin-top));
61
+ margin-top: mc-css-variable(form-field-hint-size-margin-top);
63
62
  }
64
63
 
65
64
  .mc-form-field__container {
66
65
  position: relative;
67
66
 
68
- border-width: var(--mc-form-field-size-border-width, map.get($tokens, form-field-size-border-width));
67
+ border-width: mc-css-variable(form-field-size-border-width);
69
68
  border-style: solid;
70
69
  border-color: transparent;
71
- border-radius: var(--mc-form-field-size-border-radius, map.get($tokens, form-field-size-border-radius));
70
+ border-radius: mc-css-variable(form-field-size-border-radius);
72
71
  }
73
72
 
74
73
  .mc-form-field_without-borders .mc-form-field__container {
@@ -102,13 +101,13 @@ $tokens: meta.module-variables(tokens) !default;
102
101
  .mc-form-field_has-cleaner,
103
102
  .mc-form-field_has-stepper {
104
103
  .mc-input {
105
- padding-right: var(--mc-form-field-size-button-width, map.get($tokens, form-field-size-button-width));
104
+ padding-right: mc-css-variable(form-field-size-button-width);
106
105
  }
107
106
  }
108
107
 
109
108
  .mc-form-field_has-prefix {
110
109
  .mc-input {
111
- padding-left: var(--mc-form-field-size-button-width, map.get($tokens, form-field-size-button-width));
110
+ padding-left: mc-css-variable(form-field-size-button-width);
112
111
  }
113
112
  }
114
113
 
@@ -117,7 +116,7 @@ $tokens: meta.module-variables(tokens) !default;
117
116
  align-items: center;
118
117
  justify-content: center;
119
118
 
120
- width: var(--mc-form-field-size-button-width, map.get($tokens, form-field-size-button-width));
119
+ width: mc-css-variable(form-field-size-button-width);
121
120
  height: 100%;
122
121
 
123
122
  cursor: pointer;
@@ -154,12 +153,12 @@ mc-stepper {
154
153
  bottom: 0;
155
154
  right: 0;
156
155
 
157
- width: var(--mc-form-field-size-button-width, map.get($tokens, form-field-size-button-width));
156
+ width: mc-css-variable(form-field-size-button-width);
158
157
 
159
158
  .mc-stepper-step-up,
160
159
  .mc-stepper-step-down {
161
160
  cursor: pointer;
162
- width: var(--mc-form-field-size-button-width, map.get($tokens, form-field-size-button-width));
161
+ width: mc-css-variable(form-field-size-button-width);
163
162
  text-align: center;
164
163
  }
165
164
 
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
 
3
3
  @use '../core/styles/theming/theming' as *;
4
+ @use '../core/styles/common/tokens' as *;
4
5
 
5
6
 
6
7
  @mixin mc-icon-theme($theme) {
@@ -17,31 +18,31 @@
17
18
 
18
19
  // Дефолтные серые иконки default-icon: лупа в поле, иконки дропдаунов v, все иконки вне полей.
19
20
  .mc-icon {
20
- color: mc-color($foreground, icon);
21
+ color: mc-css-variable(foreground-icon, map-get($foreground, icon));
21
22
 
22
23
  &.mc-primary {
23
- color: map.get($primary, default);
24
+ color: mc-css-variable(icon-primary-default, map-get($primary, default));
24
25
  }
25
26
 
26
27
  &.mc-secondary {
27
- color: map.get($secondary, default);
28
+ color: mc-css-variable(icon-secondary-default, map-get($secondary, default));
28
29
  }
29
30
 
30
31
  &.mc-error {
31
- color: map.get($error, default);
32
+ color: mc-css-variable(icon-error-default, map-get($error, default));
32
33
  }
33
34
 
34
35
 
35
36
  &.mc-info {
36
- color: map.get($info, default);
37
+ color: mc-css-variable(icon-info-default, map-get($info, default));
37
38
  }
38
39
 
39
40
  &.mc-warning {
40
- color: map.get($warning, default);
41
+ color: mc-css-variable(icon-warning-default, map-get($warning, default));
41
42
  }
42
43
 
43
44
  &.mc-success {
44
- color: map.get($success, default);
45
+ color: mc-css-variable(icon-success-default, map-get($success, default));
45
46
  }
46
47
 
47
48
  &[disabled],
@@ -56,96 +57,96 @@
56
57
  &.mc-primary {
57
58
  &:active,
58
59
  &.mc-active {
59
- color: map.get($primary, state-active);
60
+ color: mc-css-variable(icon-states-primary-state-active, map-get($primary, state-active));
60
61
  }
61
62
 
62
63
  &:not([disabled], .mc-disabled):hover {
63
- color: map.get($primary, state-hover);
64
+ color: mc-css-variable(icon-states-primary-state-hover, map-get($primary, state-hover));
64
65
  }
65
66
 
66
67
  &[disabled],
67
68
  &.mc-disabled {
68
- color: map.get($primary, state-disabled);
69
+ color: mc-css-variable(icon-states-primary-state-disabled, map-get($primary, state-disabled));
69
70
  }
70
71
  }
71
72
 
72
73
  &.mc-secondary {
73
74
  &:active,
74
75
  &.mc-active {
75
- color: map.get($secondary, state-active);
76
+ color: mc-css-variable(icon-states-secondary-state-active, map-get($secondary, state-active));
76
77
  }
77
78
 
78
79
  &:not([disabled], .mc-disabled):hover {
79
- color: map.get($secondary, state-hover);
80
+ color: mc-css-variable(icon-states-secondary-state-hover, map-get($secondary, state-hover));
80
81
  }
81
82
 
82
83
  &[disabled],
83
84
  &.mc-disabled {
84
- color: map.get($secondary, state-disabled);
85
+ color: mc-css-variable(icon-states-secondary-state-disabled, map-get($secondary, state-disabled));
85
86
  }
86
87
  }
87
88
 
88
89
  &.mc-error {
89
90
  &:active,
90
91
  &.mc-active {
91
- color: map.get($error, state-active);
92
+ color: mc-css-variable(icon-states-error-state-active, map-get($error, state-active));
92
93
  }
93
94
 
94
95
  &:not([disabled], .mc-disabled):hover {
95
- color: map.get($error, state-hover);
96
+ color: mc-css-variable(icon-states-error-state-hover, map-get($error, state-hover));
96
97
  }
97
98
 
98
99
  &[disabled],
99
100
  &.mc-disabled {
100
- color: map.get($error, state-disabled);
101
+ color: mc-css-variable(icon-states-error-state-disabled, map-get($error, state-disabled));
101
102
  }
102
103
  }
103
104
 
104
105
  &.mc-info {
105
106
  &:active,
106
107
  &.mc-active {
107
- color: map.get($info, state-active);
108
+ color: mc-css-variable(icon-states-info-state-active, map-get($info, state-active));
108
109
  }
109
110
 
110
111
  &:not([disabled], .mc-disabled):hover {
111
- color: map.get($info, state-hover);
112
+ color: mc-css-variable(icon-states-info-state-hover, map-get($info, state-hover));
112
113
  }
113
114
 
114
115
  &[disabled],
115
116
  &.mc-disabled {
116
- color: map.get($info, state-disabled);
117
+ color: mc-css-variable(icon-states-info-state-disabled, map-get($info, state-disabled));
117
118
  }
118
119
  }
119
120
 
120
121
  &.mc-warning {
121
122
  &:active,
122
123
  &.mc-active {
123
- color: map.get($warning, state-active);
124
+ color: mc-css-variable(icon-states-warning-state-active, map-get($warning, state-active));
124
125
  }
125
126
 
126
127
  &:not([disabled], .mc-disabled):hover {
127
- color: map.get($warning, state-hover);
128
+ color: mc-css-variable(icon-states-warning-state-hover, map-get($warning, state-hover));
128
129
  }
129
130
 
130
131
  &[disabled],
131
132
  &.mc-disabled {
132
- color: map.get($warning, state-disabled);
133
+ color: mc-css-variable(icon-states-warning-state-disabled, map-get($warning, state-disabled));
133
134
  }
134
135
  }
135
136
 
136
137
  &.mc-success {
137
138
  &:active,
138
139
  &.mc-active {
139
- color: map.get($success, state-active);
140
+ color: mc-css-variable(icon-states-success-state-active, map-get($success, state-active));
140
141
  }
141
142
 
142
143
  &:not([disabled], .mc-disabled):hover {
143
- color: map.get($success, state-hover);
144
+ color: mc-css-variable(icon-states-success-state-hover, map-get($success, state-hover));
144
145
  }
145
146
 
146
147
  &[disabled],
147
148
  &.mc-disabled {
148
- color: map.get($success, state-disabled);
149
+ color: mc-css-variable(icon-states-success-state-disabled, map-get($success, state-disabled));
149
150
  }
150
151
  }
151
152
  }
@@ -4,6 +4,7 @@
4
4
  @use '../core/styles/common/input';
5
5
 
6
6
  @use '../core/styles/tokens';
7
+ @use '../core/styles/common/tokens' as *;
7
8
 
8
9
 
9
10
  $tokens: meta.module-variables(tokens) !default;
@@ -11,11 +12,11 @@ $tokens: meta.module-variables(tokens) !default;
11
12
  %mc-input-field-base {
12
13
  @include input.mc-reset-input();
13
14
 
14
- width: var(--mc-input-size-width, map.get($tokens, input-size-width));
15
+ width: mc-css-variable(input-size-width);
15
16
  min-height: calc(
16
17
  var(--mc-form-field-size-height, map.get($tokens, form-field-size-height)) -
17
18
  (var(--mc-form-field-size-border-width, map.get($tokens, form-field-size-border-width)) * 2)
18
19
  );
19
20
 
20
- padding: var(--mc-input-size-padding, map.get($tokens, input-size-padding));
21
+ padding: mc-css-variable(input-size-padding);
21
22
  }
@@ -2,59 +2,59 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../core/styles/typography/typography-utils' as *;
5
+ @use '../core/styles/common/tokens' as *;
6
+
5
7
 
6
8
  @mixin mc-input-theme($theme) {
7
9
  $foreground: map.get($theme, foreground);
8
10
 
9
11
  .mc-input {
10
- color: map.get($foreground, text);
12
+ color: mc-css-variable(foreground-text, map-get($foreground, text));
11
13
 
12
14
  &::placeholder {
13
- color: map.get($foreground, text-disabled);
15
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
14
16
  }
15
17
 
16
18
  &::-ms-input-placeholder {
17
- color: map.get($foreground, text-disabled);
19
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
18
20
  }
19
21
 
20
22
  &::-webkit-input-placeholder {
21
- color: map.get($foreground, text-disabled);
23
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
22
24
  }
23
25
  }
24
26
 
25
27
  .mc-password-toggle {
26
- color: map.get($foreground, icon);
28
+ color: mc-css-variable(foreground-icon, map-get($foreground, icon));
27
29
 
28
30
  &:hover {
29
- color: map.get($foreground, text);
31
+ color: mc-css-variable(foreground-text, map-get($foreground, text));
30
32
  }
31
33
 
32
34
  &[disabled] {
33
35
  cursor: default;
34
36
 
35
- color: map.get($foreground, text-disabled);
37
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
36
38
  }
37
39
 
38
40
  &.cdk-keyboard-focused {
39
- border-color: map.get(map.get($theme, states), focused-color);
40
- box-shadow: 0 0 0 1px map.get(map.get($theme, states), focused-color);
41
+ border-color: mc-css-variable(states-focused-color, map-get($theme, states, focused-color));
42
+ box-shadow: 0 0 0 1px mc-css-variable(states-focused-color, map-get($theme, states, focused-color));
41
43
  }
42
44
  }
43
45
  }
44
46
 
45
47
  @mixin mc-input-typography($config) {
46
- $tokens: map.get($config, tokens);
47
-
48
48
  .mc-input {
49
- @include mc-typography-level-to-styles($config, map.get($tokens, input-font-default));
49
+ @include mc-typography-css-variables(input, default);
50
50
  }
51
51
 
52
52
  .mc-input.mc-input_monospace,
53
53
  .mc-input.mc-input-password {
54
- @include mc-typography-level-to-styles($config, map.get($tokens, input-font-monospace));
54
+ @include mc-typography-css-variables(input, monospace);
55
55
  }
56
56
 
57
57
  .mc-input.mc-input-password::placeholder {
58
- @include mc-typography-level-to-styles($config, map.get($tokens, input-font-default));
58
+ @include mc-typography-css-variables(input, default);
59
59
  }
60
60
  }
@@ -10,7 +10,6 @@ import { Subject } from 'rxjs';
10
10
  import { McInputMixinBase } from './input';
11
11
  import * as i0 from "@angular/core";
12
12
  export declare class McPasswordToggle extends McTooltipTrigger implements OnDestroy {
13
- private focusMonitor;
14
13
  private formField;
15
14
  get content(): string | TemplateRef<any>;
16
15
  set content(content: string | TemplateRef<any>);
package/input/input.scss CHANGED
@@ -4,6 +4,7 @@
4
4
  @use 'input-base' as *;
5
5
 
6
6
  @use '../core/styles/tokens';
7
+ @use '../core/styles/common/tokens' as *;
7
8
 
8
9
 
9
10
  $tokens: meta.module-variables(tokens) !default;
@@ -52,10 +53,8 @@ input.mc-input::placeholder {
52
53
 
53
54
  cursor: pointer;
54
55
 
55
- border-top-right-radius: var(--mc-form-field-size-border-radius, map.get($tokens, form-field-size-border-radius));
56
- border-bottom-right-radius: var(
57
- --mc-form-field-size-border-radius, map.get($tokens, form-field-size-border-radius)
58
- );
56
+ border-top-right-radius: mc-css-variable(form-field-size-border-radius);
57
+ border-bottom-right-radius: mc-css-variable(form-field-size-border-radius);
59
58
 
60
59
  &::-moz-focus-inner {
61
60
  border: 0;
@@ -2,11 +2,13 @@
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
- @mixin mc-link($foreground, $link, $tokens) {
7
+
8
+ @mixin mc-link($foreground, $link) {
7
9
  display: inline-block;
8
10
 
9
- color: map.get($link, text);
11
+ color: mc-css-variable(link-text, map-get($link, text));
10
12
  text-decoration: none;
11
13
  cursor: pointer;
12
14
 
@@ -18,28 +20,31 @@
18
20
 
19
21
  /* stylelint-disable no-descending-specificity */
20
22
  &:hover {
21
- color: map.get($link, state-hover-text);
23
+ color: mc-css-variable(link-state-hover-text, map-get($link, state-hover-text));
22
24
  transition: color 0ms;
23
25
 
24
26
  &.mc-text-only,
25
27
  &.mc-text-with-icon .mc-link__text {
26
- border-bottom-color: map.get($link, state-hover-border-bottom);
28
+ border-bottom-color: mc-css-variable(
29
+ link-state-hover-border-bottom, map-get($link, state-hover-border-bottom));
27
30
  }
28
31
 
29
32
  & .mc-icon {
30
- color: map.get($link, state-hover-text);
33
+ color: mc-css-variable(link-state-hover-text, map-get($link, state-hover-text));
31
34
  }
32
35
  }
33
36
 
34
37
  &:active,
35
38
  &.mc-active {
36
- color: map.get($link, state-active-text);
39
+ color: mc-css-variable(link-state-active-text, map-get($link, state-active-text));
37
40
  }
38
41
 
39
42
  &.cdk-keyboard-focused {
40
- outline: map.get($link, state-focused-outline) solid map.get($tokens, link-size-state-focused-outline-width);
43
+ outline: mc-css-variable(
44
+ link-state-focused-outline, map-get($link, state-focused-outline)
45
+ ) solid mc-css-variable(link-size-state-focused-outline-width);
41
46
 
42
- outline-offset: map.get($tokens, link-size-state-focused-outline-offset);
47
+ outline-offset: mc-css-variable(link-size-state-focused-outline-offset);
43
48
  }
44
49
 
45
50
  & .mc-icon {
@@ -50,16 +55,16 @@
50
55
  &.mc-text-with-icon .mc-link__text {
51
56
  border-bottom-style: solid;
52
57
  border-bottom-width: 1px;
53
- border-bottom-color: map.get($link, border-bottom);
58
+ border-bottom-color: mc-css-variable(link-border-bottom, map-get($link, border-bottom));
54
59
  }
55
60
 
56
61
  &.mc-text-with-icon .mc-link__text {
57
62
  &:not(:first-child) {
58
- margin-left: map.get($tokens, link-size-default-icon-margin);
63
+ margin-left: mc-css-variable(link-size-default-icon-margin);
59
64
  }
60
65
 
61
66
  &:not(:last-child) {
62
- margin-right: map.get($tokens, link-size-default-icon-margin);
67
+ margin-right: mc-css-variable(link-size-default-icon-margin);
63
68
  }
64
69
  }
65
70
 
@@ -74,7 +79,8 @@
74
79
  &:hover {
75
80
  &.mc-text-only,
76
81
  &.mc-text-with-icon .mc-link__text {
77
- border-bottom-color: map.get($link, state-hover-border-bottom);
82
+ border-bottom-color: mc-css-variable(
83
+ link-state-hover-border-bottom, map-get($link, state-hover-border-bottom));
78
84
  }
79
85
  }
80
86
 
@@ -96,28 +102,28 @@
96
102
  &.mc-link_caption {
97
103
  &.mc-text-with-icon .mc-link__text {
98
104
  &:not(:first-child) {
99
- margin-left: map.get($tokens, link-size-caption-icon-margin);
105
+ margin-left: mc-css-variable(link-size-caption-icon-margin);
100
106
  }
101
107
 
102
108
  &:not(:last-child) {
103
- margin-right: map.get($tokens, link-size-caption-icon-margin);
109
+ margin-right: mc-css-variable(link-size-caption-icon-margin);
104
110
  }
105
111
  }
106
112
  }
107
113
 
108
114
  &[disabled] {
109
- color: map.get($foreground, text-disabled);
115
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
110
116
 
111
117
  cursor: default;
112
118
  pointer-events: none;
113
119
 
114
120
  &.mc-text-only,
115
121
  &.mc-text-with-icon .mc-link__text {
116
- border-bottom-color: map.get($link, border-bottom);
122
+ border-bottom-color: mc-css-variable(link-border-bottom, map-get($link, border-bottom));
117
123
  }
118
124
 
119
125
  & .mc-icon {
120
- color: map.get($foreground, text-disabled);
126
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
121
127
  }
122
128
  /* stylelint-enable no-descending-specificity */
123
129
  }
@@ -129,36 +135,35 @@
129
135
 
130
136
  $link: map.get(map.get($theme, components), link);
131
137
 
132
- $tokens: map.get($theme, tokens);
133
-
134
138
  .mc-link:not(.mc-link_use-visited) {
135
139
  &:visited {
136
- color: map.get($link, text);
140
+ color: mc-css-variable(link-text, map-get($link, text));
137
141
  }
138
142
 
139
- @include mc-link($foreground, $link, $tokens);
143
+ @include mc-link($foreground, $link);
140
144
  }
141
145
 
142
146
  .mc-link.mc-link_use-visited {
143
147
  &:visited {
144
- color: map.get($link, state-visited-text);
148
+ color: mc-css-variable(link-state-visited-text, map-get($link, state-visited-text));
145
149
 
146
150
  &.mc-text-only,
147
151
  &.mc-text-with-icon .mc-link__text {
148
- border-bottom-color: map.get($link, state-visited-border-bottom);
152
+ border-bottom-color: mc-css-variable(
153
+ link-state-visited-border-bottom, map-get($link, state-visited-border-bottom));
149
154
  }
150
155
 
151
156
  & .mc-icon {
152
- color: map.get($link, state-visited-text);
157
+ color: mc-css-variable(link-state-visited-text, map-get($link, state-visited-text));
153
158
  }
154
159
  }
155
160
 
156
- @include mc-link($foreground, $link, $tokens);
161
+ @include mc-link($foreground, $link);
157
162
  }
158
163
 
159
164
  @media print {
160
165
  .mc-link_print:not([disabled]) {
161
- color: map.get($foreground, text);
166
+ color: mc-css-variable(foreground-text, map-get($foreground, text));
162
167
 
163
168
  &.mc-text-only,
164
169
  &.mc-text-with-icon .mc-link__text {
@@ -166,7 +171,7 @@
166
171
  }
167
172
 
168
173
  &::after {
169
- color: map.get($foreground, text);
174
+ color: mc-css-variable(foreground-text, map-get($foreground, text));
170
175
 
171
176
  content: ":\a" attr(print);
172
177
  white-space: pre;
@@ -176,13 +181,11 @@
176
181
  }
177
182
 
178
183
  @mixin mc-link-typography($config) {
179
- $tokens: map.get($config, tokens);
180
-
181
184
  .mc-link {
182
- @include mc-typography-level-to-styles($config, map.get($tokens, link-font-default));
185
+ @include mc-typography-css-variables(link, default);
183
186
  }
184
187
 
185
188
  .mc-link.mc-link_caption {
186
- @include mc-typography-level-to-styles($config, map.get($tokens, link-font-caption));
189
+ @include mc-typography-css-variables(link, caption);
187
190
  }
188
191
  }
@@ -6,6 +6,7 @@
6
6
  @use '../core/styles/tokens';
7
7
 
8
8
  @use '../core/styles/common';
9
+ @use '../core/styles/common/tokens' as *;
9
10
 
10
11
 
11
12
  $tokens: meta.module-variables(tokens) !default;
@@ -18,16 +19,16 @@ $tokens: meta.module-variables(tokens) !default;
18
19
  align-items: center;
19
20
 
20
21
  box-sizing: border-box;
21
- height: var(--mc-list-size-item-height, map.get($tokens, list-size-item-height));
22
+ height: mc-css-variable(list-size-item-height);
22
23
 
23
24
  border: 2px solid transparent;
24
25
 
25
- padding-left: var(--mc-list-size-horizontal-padding, map.get($tokens, list-size-horizontal-padding));
26
+ padding-left: mc-css-variable(list-size-horizontal-padding);
26
27
 
27
28
  .mc-list-text {
28
29
  @include list.mc-line-wrapper-base();
29
30
 
30
- padding-right: var(--mc-list-size-horizontal-padding, map.get($tokens, list-size-horizontal-padding));
31
+ padding-right: mc-css-variable(list-size-horizontal-padding);
31
32
  display: inline-block;
32
33
  @include common.mc-truncate-line();
33
34
  }
@@ -2,6 +2,8 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../core/styles/typography/typography-utils' as *;
5
+ @use '../core/styles/common/tokens' as *;
6
+
5
7
 
6
8
  @mixin mc-list-theme($theme) {
7
9
  $foreground: map.get($theme, foreground);
@@ -9,38 +11,36 @@
9
11
 
10
12
  .mc-list-item,
11
13
  .mc-list-option {
12
- color: map.get($foreground, text);
14
+ color: mc-css-variable(foreground-text, map-get($foreground, text));
13
15
  }
14
16
 
15
17
  .mc-list-option {
16
18
  outline: none;
17
19
 
18
20
  &:hover {
19
- background: map.get($background, overlay-hover);
21
+ background: mc-css-variable(background-overlay-hover, map-get($background, overlay-hover));
20
22
  }
21
23
 
22
24
  &.mc-focused {
23
- border-color: map.get(map.get($theme, states), focused-color);
25
+ border-color: mc-css-variable(states-focused-color, map-get($theme, states, focused-color));
24
26
  }
25
27
 
26
28
  &.mc-selected {
27
- background: map.get(map.get($theme, states), selected-color);
29
+ background: mc-css-variable(states-selected-color, map-get($theme, states, selected-color));
28
30
  }
29
31
 
30
32
  &.mc-disabled,
31
33
  &[disabled] {
32
34
  background: transparent;
33
35
 
34
- color: map.get($foreground, text-disabled);
36
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
35
37
  }
36
38
  }
37
39
  }
38
40
 
39
41
  @mixin mc-list-typography($config) {
40
- $tokens: map.get($config, tokens);
41
-
42
42
  .mc-list-item,
43
43
  .mc-list-option {
44
- @include mc-typography-level-to-styles($config, map.get($tokens, list-font-item));
44
+ @include mc-typography-css-variables(list, item);
45
45
  }
46
46
  }
package/list/list.scss CHANGED
@@ -5,6 +5,7 @@
5
5
  @use '../core/styles/common/list';
6
6
 
7
7
  @use '../core/styles/tokens';
8
+ @use '../core/styles/common/tokens' as *;
8
9
 
9
10
 
10
11
  $tokens: meta.module-variables(tokens) !default;
@@ -31,7 +32,7 @@ $tokens: meta.module-variables(tokens) !default;
31
32
 
32
33
  & .mc-pseudo-checkbox,
33
34
  & .mc-icon {
34
- margin-right: var(--mc-list-size-icon-right-margin, map.get($tokens, list-size-icon-right-margin));
35
+ margin-right: mc-css-variable(list-size-icon-right-margin);
35
36
  }
36
37
 
37
38
  & .mc-option-action {