@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
@@ -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,26 +50,24 @@ $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
- margin-top: map.get($tokens, size-m);
56
+ margin-top: mc-css-variable(size-m);
58
57
  }
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,12 +1,13 @@
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) {
7
8
  $foreground: map.get($theme, foreground);
8
9
 
9
- $icon: map.get(map.get($theme, components), icon);
10
+ $icon: map.get($theme, components, icon);
10
11
 
11
12
  $primary: map.get($icon, primary);
12
13
  $secondary: map.get($icon, secondary);
@@ -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
  }
@@ -127,38 +133,37 @@
127
133
  @mixin mc-link-theme($theme) {
128
134
  $foreground: map.get($theme, foreground);
129
135
 
130
- $link: map.get(map.get($theme, components), link);
131
-
132
- $tokens: map.get($theme, tokens);
136
+ $link: map.get($theme, components, link);
133
137
 
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
  }