@ptsecurity/mosaic 17.0.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 (201) hide show
  1. package/autocomplete/_autocomplete-theme.scss +2 -1
  2. package/autocomplete/autocomplete-trigger.directive.d.ts +7 -1
  3. package/autocomplete/autocomplete.scss +7 -11
  4. package/button/_button-base.scss +10 -10
  5. package/button/_button-theme.scss +32 -32
  6. package/button/button.scss +9 -15
  7. package/button-toggle/_button-toggle-theme.scss +32 -24
  8. package/button-toggle/button-toggle.scss +18 -57
  9. package/card/_card-theme.scss +23 -20
  10. package/card/card.component.scss +2 -1
  11. package/checkbox/_checkbox-theme.scss +33 -29
  12. package/checkbox/checkbox.scss +7 -6
  13. package/code-block/_code-block-theme.scss +201 -113
  14. package/code-block/actionbar.component.scss +5 -7
  15. package/code-block/code-block.scss +5 -6
  16. package/core/forms/_forms-theme.scss +17 -46
  17. package/core/option/_optgroup-theme.scss +5 -5
  18. package/core/option/_option-action-theme.scss +1 -4
  19. package/core/option/_option-theme.scss +8 -10
  20. package/core/option/option.scss +5 -4
  21. package/core/pop-up/pop-up-trigger.d.ts +3 -1
  22. package/core/styles/_mosaic-theme.scss +3 -3
  23. package/core/styles/common/_popup.scss +4 -3
  24. package/core/styles/common/_tokens.scss +39 -0
  25. package/core/styles/theming/_alerts.scss +16 -24
  26. package/core/styles/theming/_badges.scss +7 -8
  27. package/core/styles/theming/_components-theming.scss +4 -2
  28. package/core/styles/theming/_scrollbars.scss +17 -2
  29. package/datepicker/_datepicker-theme.scss +18 -19
  30. package/datepicker/calendar-body.scss +6 -9
  31. package/datepicker/calendar-header.scss +9 -26
  32. package/datepicker/calendar.scss +5 -16
  33. package/datepicker/datepicker-content.scss +2 -4
  34. package/datepicker/datepicker-input.scss +2 -1
  35. package/datepicker/datepicker-toggle.scss +3 -2
  36. package/divider/_divider-theme.scss +4 -2
  37. package/divider/divider.scss +5 -4
  38. package/dl/_dl-theme.scss +12 -36
  39. package/dl/dl.scss +13 -46
  40. package/dropdown/_dropdown-theme.scss +19 -17
  41. package/dropdown/dropdown-item.scss +7 -6
  42. package/dropdown/dropdown.scss +11 -26
  43. package/ellipsis-center/ellipsis-center.directive.d.ts +3 -2
  44. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +14 -2
  45. package/esm2022/button/button.component.mjs +2 -2
  46. package/esm2022/code-block/actionbar.component.mjs +2 -2
  47. package/esm2022/code-block/code-block.component.mjs +2 -2
  48. package/esm2022/core/pop-up/pop-up-trigger.mjs +19 -11
  49. package/esm2022/core/version.mjs +2 -2
  50. package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
  51. package/esm2022/dropdown/dropdown.component.mjs +3 -3
  52. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -5
  53. package/esm2022/file-upload/file-upload.module.mjs +8 -4
  54. package/esm2022/file-upload/multiple-file-upload.component.mjs +15 -34
  55. package/esm2022/file-upload/single-file-upload.component.mjs +15 -34
  56. package/esm2022/form-field/form-field.mjs +2 -2
  57. package/esm2022/input/input-password.mjs +2 -3
  58. package/esm2022/loader-overlay/loader-overlay.component.mjs +2 -2
  59. package/esm2022/markdown/markdown.component.mjs +2 -2
  60. package/esm2022/modal/modal.component.mjs +6 -6
  61. package/esm2022/navbar/navbar-item.component.mjs +9 -9
  62. package/esm2022/progress-spinner/progress-spinner.component.mjs +2 -2
  63. package/esm2022/radio/radio.component.mjs +2 -2
  64. package/esm2022/select/select-option.directive.mjs +7 -5
  65. package/esm2022/select/select.component.mjs +16 -9
  66. package/esm2022/tabs/tab-header.component.mjs +2 -2
  67. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
  68. package/esm2022/tags/tag-input.mjs +28 -8
  69. package/esm2022/timezone/timezone-option.directive.mjs +7 -5
  70. package/esm2022/timezone/timezone-select.component.mjs +2 -2
  71. package/esm2022/title/title.directive.mjs +2 -3
  72. package/esm2022/tooltip/tooltip.component.mjs +27 -12
  73. package/esm2022/tree-select/tree-select.component.mjs +21 -8
  74. package/fesm2022/ptsecurity-mosaic-autocomplete.mjs +13 -1
  75. package/fesm2022/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  76. package/fesm2022/ptsecurity-mosaic-button.mjs +2 -2
  77. package/fesm2022/ptsecurity-mosaic-button.mjs.map +1 -1
  78. package/fesm2022/ptsecurity-mosaic-code-block.mjs +4 -4
  79. package/fesm2022/ptsecurity-mosaic-code-block.mjs.map +1 -1
  80. package/fesm2022/ptsecurity-mosaic-core.mjs +19 -11
  81. package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
  82. package/fesm2022/ptsecurity-mosaic-dropdown.mjs +4 -4
  83. package/fesm2022/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  84. package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs +5 -4
  85. package/fesm2022/ptsecurity-mosaic-ellipsis-center.mjs.map +1 -1
  86. package/fesm2022/ptsecurity-mosaic-file-upload.mjs +26 -58
  87. package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  88. package/fesm2022/ptsecurity-mosaic-form-field.mjs +2 -2
  89. package/fesm2022/ptsecurity-mosaic-form-field.mjs.map +1 -1
  90. package/fesm2022/ptsecurity-mosaic-input.mjs +1 -2
  91. package/fesm2022/ptsecurity-mosaic-input.mjs.map +1 -1
  92. package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs +2 -2
  93. package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  94. package/fesm2022/ptsecurity-mosaic-markdown.mjs +2 -2
  95. package/fesm2022/ptsecurity-mosaic-markdown.mjs.map +1 -1
  96. package/fesm2022/ptsecurity-mosaic-modal.mjs +5 -5
  97. package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -1
  98. package/fesm2022/ptsecurity-mosaic-navbar.mjs +8 -8
  99. package/fesm2022/ptsecurity-mosaic-navbar.mjs.map +1 -1
  100. package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs +1 -1
  101. package/fesm2022/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  102. package/fesm2022/ptsecurity-mosaic-radio.mjs +2 -2
  103. package/fesm2022/ptsecurity-mosaic-radio.mjs.map +1 -1
  104. package/fesm2022/ptsecurity-mosaic-select.mjs +25 -17
  105. package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -1
  106. package/fesm2022/ptsecurity-mosaic-tabs.mjs +4 -4
  107. package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -1
  108. package/fesm2022/ptsecurity-mosaic-tags.mjs +26 -7
  109. package/fesm2022/ptsecurity-mosaic-tags.mjs.map +1 -1
  110. package/fesm2022/ptsecurity-mosaic-timezone.mjs +7 -6
  111. package/fesm2022/ptsecurity-mosaic-timezone.mjs.map +1 -1
  112. package/fesm2022/ptsecurity-mosaic-title.mjs +1 -2
  113. package/fesm2022/ptsecurity-mosaic-title.mjs.map +1 -1
  114. package/fesm2022/ptsecurity-mosaic-tooltip.mjs +25 -11
  115. package/fesm2022/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  116. package/fesm2022/ptsecurity-mosaic-tree-select.mjs +20 -7
  117. package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  118. package/file-upload/_file-upload-theme.scss +87 -54
  119. package/file-upload/file-upload.module.d.ts +2 -1
  120. package/file-upload/file-upload.scss +0 -15
  121. package/file-upload/multiple-file-upload.component.d.ts +4 -12
  122. package/file-upload/multiple-file-upload.component.scss +58 -54
  123. package/file-upload/single-file-upload.component.d.ts +4 -12
  124. package/file-upload/single-file-upload.component.scss +15 -24
  125. package/form-field/_form-field-theme.scss +43 -34
  126. package/form-field/form-field.scss +14 -13
  127. package/icon/_icon-theme.scss +26 -25
  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 +36 -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 +61 -43
  139. package/markdown/markdown.scss +39 -80
  140. package/modal/_modal-confirm.scss +3 -2
  141. package/modal/_modal-theme.scss +20 -21
  142. package/modal/modal.scss +18 -15
  143. package/navbar/_navbar-theme.scss +19 -18
  144. package/navbar/navbar-brand.scss +7 -9
  145. package/navbar/navbar-item.component.d.ts +4 -4
  146. package/navbar/navbar-item.scss +8 -7
  147. package/navbar/vertical-navbar.scss +4 -12
  148. package/package.json +25 -25
  149. package/popover/_popover-theme.scss +35 -35
  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 +32 -24
  158. package/radio/radio.scss +8 -11
  159. package/select/_select-theme.scss +13 -13
  160. package/select/select-option.directive.d.ts +3 -2
  161. package/select/select.component.d.ts +1 -0
  162. package/select/select.scss +19 -42
  163. package/sidepanel/_sidepanel-theme.scss +9 -9
  164. package/sidepanel/sidepanel.scss +11 -10
  165. package/splitter/_splitter-theme.scss +5 -3
  166. package/table/_table-theme.scss +9 -9
  167. package/table/table.scss +11 -14
  168. package/tabs/_tabs-common.scss +15 -14
  169. package/tabs/_tabs-theme.scss +67 -55
  170. package/tabs/tab-group.scss +2 -1
  171. package/tabs/tab-header.scss +16 -3
  172. package/tabs/tab-nav-bar/tab-nav-bar.scss +15 -2
  173. package/tags/_tag-theme.scss +30 -27
  174. package/tags/tag-input.d.ts +9 -4
  175. package/tags/tag-list.scss +4 -3
  176. package/tags/tag.scss +9 -8
  177. package/textarea/_textarea-base.scss +2 -4
  178. package/textarea/_textarea-theme.scss +8 -8
  179. package/textarea/textarea.scss +2 -4
  180. package/timepicker/timepicker.scss +2 -7
  181. package/timezone/_timezone-option-theme.scss +7 -7
  182. package/timezone/timezone-option.component.scss +5 -4
  183. package/timezone/timezone-option.directive.d.ts +3 -2
  184. package/title/title.directive.d.ts +0 -1
  185. package/toast/_toast-theme.scss +13 -16
  186. package/toast/toast-container.component.scss +2 -5
  187. package/toast/toast.component.scss +15 -17
  188. package/toggle/_toggle-theme.scss +22 -21
  189. package/toggle/toggle.scss +19 -21
  190. package/tooltip/_tooltip-theme.scss +26 -31
  191. package/tooltip/tooltip.component.d.ts +12 -8
  192. package/tooltip/tooltip.scss +13 -17
  193. package/tree/_tree-theme.scss +8 -8
  194. package/tree/toggle.scss +3 -5
  195. package/tree/tree-option.scss +5 -4
  196. package/tree-select/_tree-select-theme.scss +9 -9
  197. package/tree-select/tree-select.component.d.ts +1 -0
  198. package/tree-select/tree-select.scss +17 -35
  199. package/_theming.scss +0 -10827
  200. package/_visual.scss +0 -3541
  201. package/prebuilt-visual/default-visual.css +0 -1
@@ -3,17 +3,16 @@
3
3
 
4
4
  @use '../core/styles/theming/theming' as *;
5
5
  @use '../core/styles/typography/typography-utils' as *;
6
+ @use '../core/styles/common/tokens' as *;
6
7
 
7
8
 
8
9
  @mixin mc-form-field-theme($theme) {
9
10
  $foreground: map.get($theme, foreground);
10
11
  $background: map.get($theme, background);
11
12
 
12
- $primary: map.get($theme, primary);
13
- $secondary: map.get($theme, secondary);
14
13
  $error: map.get($theme, error);
15
14
 
16
- $form-field: map.get(map.get($theme, components), form-field);
15
+ $form-field: map-get($theme, components, form-field);
17
16
 
18
17
  .mc-form-field {
19
18
  & .mc-input {
@@ -21,45 +20,48 @@
21
20
  &:-webkit-autofill,
22
21
  &:-webkit-autofill:hover,
23
22
  &:-webkit-autofill:focus {
24
- -webkit-box-shadow: 0 0 0 40rem map.get($form-field, state-autofill-background) inset;
25
- -webkit-text-fill-color: map.get($foreground, text);
26
- caret-color: map-get($foreground, text);
23
+ -webkit-box-shadow: 0 0 0 40rem mc-css-variable(
24
+ form-field-state-autofill-background, map-get($form-field, state-autofill-background)) inset;
25
+ -webkit-text-fill-color: mc-css-variable(foreground-text, map-get($foreground, text));
26
+ caret-color: mc-css-variable(foreground-text, map-get($foreground, text));
27
27
  }
28
28
  }
29
29
 
30
30
  & .mc-form-field__container {
31
- background-color: map.get($form-field, background);
31
+ background-color: mc-css-variable(form-field-background, map-get($form-field, background));
32
32
  }
33
33
 
34
34
  & .mc-form-field__hint {
35
- color: map.get($foreground, text-less-contrast);
35
+ color: mc-css-variable(foreground-text-less-contrast, map-get($foreground, text-less-contrast));
36
36
  }
37
37
 
38
38
  &:not(.mc-form-field_without-borders) {
39
39
  .mc-form-field__container {
40
- border-color: map.get($form-field, border);
40
+ border-color: mc-css-variable(form-field-border, map-get($form-field, border));
41
41
  }
42
42
 
43
43
  &:hover .mc-form-field__container {
44
- border-color: map.get($form-field, state-hover-border);
44
+ border-color: mc-css-variable(form-field-state-hover-border, map-get($form-field, state-hover-border));
45
45
  }
46
46
 
47
47
  &.ng-invalid {
48
48
  & .mc-form-field__container {
49
- border-color: map.get($form-field, state-invalid-border);
50
- background-color: map.get($form-field, state-invalid-background);
49
+ border-color: mc-css-variable(
50
+ form-field-state-invalid-border, map-get($form-field, state-invalid-border));
51
+ background-color: mc-css-variable(
52
+ form-field-state-invalid-background, map-get($form-field, state-invalid-background));
51
53
 
52
54
  .mc-input,
53
55
  .mc-textarea {
54
- color: map.get($foreground, text-error);
56
+ color: mc-css-variable(foreground-text-error, map-get($foreground, text-error));
55
57
  }
56
58
  }
57
59
  }
58
60
 
59
61
  &.cdk-focused {
60
62
  &:not(.ng-invalid) .mc-form-field__container {
61
- border-color: map.get(map.get($theme, states), focused-color);
62
- box-shadow: 0 0 0 1px map.get(map.get($theme, states), focused-color);
63
+ border-color: mc-css-variable(states-focused-color, map-get($theme, states, focused-color));
64
+ box-shadow: 0 0 0 1px mc-css-variable(states-focused-color, map-get($theme, states, focused-color));
63
65
  }
64
66
 
65
67
  &.ng-invalid .mc-form-field__container {
@@ -69,15 +71,17 @@
69
71
 
70
72
  /* stylelint-disable no-descending-specificity */
71
73
  &.mc-disabled .mc-form-field__container {
72
- border-color: map.get($form-field, border);
74
+ border-color: mc-css-variable(form-field-border, map-get($form-field, border));
73
75
 
74
- background-color: map.get($background, background-disabled);
76
+ background-color: mc-css-variable(
77
+ background-background-disabled, map-get($background, background-disabled));
75
78
 
76
79
  .mc-icon,
77
80
  .mc-input,
78
81
  .mc-textarea {
79
- color: map.get($foreground, text-disabled);
80
- -webkit-text-fill-color: map.get($foreground, text-disabled);
82
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
83
+ -webkit-text-fill-color: mc-css-variable(
84
+ foreground-text-disabled, map-get($foreground, text-disabled));
81
85
  }
82
86
  }
83
87
  /* stylelint-enable no-descending-specificity */
@@ -85,59 +89,64 @@
85
89
  }
86
90
 
87
91
  .mc-hint {
92
+ $hint: map-get($theme, components, form-field-hint);
93
+
88
94
  &.mc-primary {
89
- color: mc-color($primary);
95
+ color: mc-css-variable(form-field-hint-text-color, map-get($hint, text-color));
90
96
  }
91
97
 
92
98
  &.mc-secondary {
93
- color: mc-color($secondary);
99
+ color: mc-css-variable(form-field-hint-text-color, map-get($hint, text-color));
94
100
  }
95
101
 
96
102
  &.mc-warning {
97
- color: map.get($foreground, text-warning);
103
+ color: mc-css-variable(foreground-text-warning, map-get($foreground, text-warning));
98
104
  }
99
105
 
100
106
  &.mc-error {
101
- color: map.get($foreground, text-error);
107
+ color: mc-css-variable(foreground-text-error, map-get($foreground, text-error));
102
108
  }
103
109
  }
104
110
 
105
111
  .mc-password-hint {
106
- $password-hint: map.get(map.get($theme, components), form-field-password-hint);
112
+ $password-hint: map-get($theme, components, form-field-password-hint);
107
113
 
108
- color: map.get($password-hint, text-color);
114
+ color: mc-css-variable(form-field-password-hint-text-color, map-get($password-hint, text-color));
109
115
 
110
116
  & .mc-password-hint__icon {
111
- color: map.get($password-hint, icon-color);
117
+ color: mc-css-variable(form-field-password-hint-icon-color, map-get($password-hint, icon-color));
112
118
  }
113
119
 
114
120
  &.mc-password-hint_valid {
115
- color: map.get($password-hint, state-valid-text-color);
121
+ color: mc-css-variable(
122
+ form-field-password-hint-state-valid-text-color, map-get($password-hint, state-valid-text-color));
116
123
 
117
124
  & .mc-password-hint__icon {
118
- color: map.get($password-hint, state-valid-icon-color);
125
+ color: mc-css-variable(
126
+ form-field-password-hint-state-valid-icon-color, map-get($password-hint, state-valid-icon-color));
119
127
  }
120
128
  }
121
129
 
122
130
  &.mc-password-hint_invalid {
123
- color: map.get($password-hint, state-invalid-text-color);
131
+ color: mc-css-variable(
132
+ form-field-password-hint-state-invalid-text-color, map-get($password-hint, state-invalid-text-color));
124
133
 
125
134
  & .mc-password-hint__icon {
126
- color: map.get($password-hint, state-invalid-icon-color);
135
+ color: mc-css-variable(
136
+ form-field-password-hint-state-invalid-icon-color, map-get($password-hint, state-invalid-icon-color)
137
+ );
127
138
  }
128
139
  }
129
140
  }
130
141
  }
131
142
 
132
143
  @mixin mc-form-field-typography($config) {
133
- $tokens: map.get($config, tokens);
134
-
135
144
  .mc-form-field {
136
- @include mc-typography-level-to-styles($config, map.get($tokens, form-field-font-default));
145
+ @include mc-typography-css-variables(form-field, default);
137
146
  }
138
147
 
139
148
  .mc-form-field__hint, .mc-password-hint {
140
- @include mc-typography-level-to-styles($config, map.get($tokens, form-field-hint-font-default));
149
+ @include mc-typography-css-variables(form-field-hint, default);
141
150
  }
142
151
 
143
152
  .mc-hint {
@@ -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,20 +101,22 @@ $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
 
115
114
  .mc-cleaner {
116
115
  display: flex;
116
+ align-items: center;
117
+ justify-content: center;
117
118
 
118
- 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);
119
120
  height: 100%;
120
121
 
121
122
  cursor: pointer;
@@ -152,12 +153,12 @@ mc-stepper {
152
153
  bottom: 0;
153
154
  right: 0;
154
155
 
155
- 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);
156
157
 
157
158
  .mc-stepper-step-up,
158
159
  .mc-stepper-step-down {
159
160
  cursor: pointer;
160
- 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);
161
162
  text-align: center;
162
163
  }
163
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;