@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,98 +2,141 @@
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-file-upload-text-color($states) {
7
- &, .mc-icon, .mc-link {
8
- color: map.get($states, text);
9
- }
10
- }
11
-
12
- @mixin mc-file-upload-color($states) {
13
- background-color: map.get($states, background);
14
- border-color: map.get($states, border) !important;
15
- }
16
7
 
17
8
  @mixin mc-file-upload-theme($theme) {
18
- $file-upload: map.get(map.get($theme, components), file-upload);
19
- $single: map.get($file-upload, single);
20
- $single-states: map.get($single, states);
21
- $multiple: map.get($file-upload, multiple);
22
- $multiple-states: map.get($multiple, states);
23
- $foreground: map.get($theme, foreground);
9
+ $foreground: map-get($theme, foreground);
10
+
11
+ $file-upload: map-get($theme, components, file-upload);
12
+
13
+ $single: map-get($file-upload, single);
14
+ $single-states: map-get($single, states);
15
+
16
+ $multiple: map-get($file-upload, multiple);
17
+ $multiple-states: map-get($multiple, states);
24
18
 
25
19
  .mc-file-upload {
26
20
  .mc-focused, .mc-link.mc-focused {
27
- border: 2px solid map.get(map.get($theme, states), focused-color);
21
+ border: 2px solid mc-css-variable(states-focused-color, map-get($theme, states, focused-color));
28
22
  }
29
23
  }
30
24
 
31
25
  .mc-single-file-upload {
32
26
  .mc-file-upload {
33
- @include mc-file-upload-color(map.get($single, default));
27
+ background-color: mc-css-variable(
28
+ file-upload-single-default-background, map-get($single, default, background));
29
+ border-color: mc-css-variable(
30
+ file-upload-single-default-border, map-get($single, default, border)) !important;
34
31
 
35
32
  &.dragover {
36
- @include mc-file-upload-color(map.get($single-states, drag-n-drop));
33
+ background-color: mc-css-variable(
34
+ file-upload-single-states-drag-n-drop-background, map-get($single-states, drag-n-drop, background));
35
+ border-color: mc-css-variable(
36
+ file-upload-single-states-drag-n-drop-border, map-get($single-states, drag-n-drop, border)
37
+ ) !important;
37
38
  }
38
39
 
39
40
  &.mc-error:not(.disabled) {
40
41
  &:not(.dragover) {
41
- @include mc-file-upload-color(map.get($single-states, error));
42
+ background-color: mc-css-variable(
43
+ file-upload-single-states-error-background, map-get($single-states, error, background));
44
+ border-color: mc-css-variable(
45
+ file-upload-single-states-error-border, map-get($single-states, error, border)) !important;
42
46
  }
43
47
 
44
48
  *, .mc-icon {
45
- color: map.get($foreground, text-error);
49
+ color: mc-css-variable(foreground-text-error, map-get($foreground, text-error));
46
50
  }
47
51
  }
48
52
 
49
53
  &.disabled {
50
- @include mc-file-upload-color(map.get($single-states, disabled));
51
-
52
- @include mc-file-upload-text-color(map.get($single-states, disabled));
54
+ background-color: mc-css-variable(
55
+ file-upload-single-states-disabled-background, map-get($single-states, disabled, background));
56
+ border-color: mc-css-variable(
57
+ file-upload-single-states-disabled-border, map-get($single-states, disabled, border)) !important;
58
+
59
+ /* stylelint-disable no-descending-specificity */
60
+ &,
61
+ .mc-icon,
62
+ .mc-link {
63
+ color: mc-css-variable(
64
+ file-upload-single-states-disabled-text, map-get($single-states, disabled, text));
65
+ }
66
+ /* stylelint-enable no-descending-specificity */
53
67
  }
54
68
  }
55
69
  }
56
70
 
57
71
  .mc-multiple-file-upload {
58
72
  .mc-file-upload {
59
- @include mc-file-upload-color(map.get($multiple, default));
73
+ background-color: mc-css-variable(
74
+ file-upload-multiple-default-background, map-get($multiple, default, background));
75
+ border-color: mc-css-variable(
76
+ file-upload-multiple-default-border, map-get($multiple, default, border)) !important;
60
77
 
61
78
  .btn-upload {
62
79
  .dropzone {
63
- border-top-color: map.get(map.get($multiple, default), border);
80
+ border-top-color: mc-css-variable(
81
+ file-upload-multiple-default-border, map-get($multiple, default, border));
64
82
  }
65
83
  }
66
84
 
67
85
  .mc-file-multiple-uploaded__header {
68
- border-bottom-color: map.get(map.get($multiple, default), border);
86
+ border-bottom-color: mc-css-variable(
87
+ file-upload-multiple-default-border, map-get($multiple, default, border));
69
88
 
70
89
  &-inner {
71
- color: map.get($foreground, text-less-contrast);
90
+ color: mc-css-variable(foreground-text-less-contrast, map-get($foreground, text-less-contrast));
72
91
  }
73
92
  }
74
93
 
75
94
  &.dragover {
76
- @include mc-file-upload-color(map.get($multiple-states, drag-n-drop));
95
+ background-color: mc-css-variable(
96
+ file-upload-multiple-states-drag-n-drop-background,
97
+ map-get($multiple-states, drag-n-drop, background)
98
+ );
99
+ border-color: mc-css-variable(
100
+ file-upload-multiple-states-drag-n-drop-border, map-get($multiple-states, drag-n-drop, border)
101
+ ) !important;
77
102
 
78
103
  .mc-file-multiple-uploaded__header {
79
- border-bottom-color: map.get(map.get($multiple-states, drag-n-drop), background) !important;
104
+ border-bottom-color: mc-css-variable(
105
+ file-upload-multiple-states-drag-n-drop-background,
106
+ map-get($multiple-states, drag-n-drop, background)
107
+ ) !important;
80
108
  }
81
109
 
82
110
  &.selected {
83
111
  .dropzone {
84
- border-top-color: map.get(map.get($multiple-states, drag-n-drop), border);
112
+ border-top-color: mc-css-variable(
113
+ file-upload-multiple-states-drag-n-drop-border,
114
+ map-get($multiple-states, drag-n-drop, border)
115
+ );
85
116
  }
86
117
  }
87
118
  }
88
119
 
89
120
  &.disabled {
90
- @include mc-file-upload-color(map.get($multiple-states, disabled));
91
-
92
- @include mc-file-upload-text-color(map.get($multiple-states, disabled));
121
+ background-color: mc-css-variable(
122
+ file-upload-multiple-states-disabled-background, map-get($multiple-states, disabled, background));
123
+ border-color: mc-css-variable(
124
+ file-upload-multiple-states-disabled-border, map-get($multiple-states, disabled, border)
125
+ ) !important;
126
+
127
+ /* stylelint-disable no-descending-specificity */
128
+ &,
129
+ .mc-icon,
130
+ .mc-link {
131
+ color: mc-css-variable(
132
+ file-upload-multiple-states-disabled-text, map-get($multiple-states, disabled, text));
133
+ }
134
+ /* stylelint-enable no-descending-specificity */
93
135
 
94
136
  &.selected {
95
137
  .dropzone {
96
- border-top-color: map.get(map.get($multiple-states, disabled), border);
138
+ border-top-color: mc-css-variable(
139
+ file-upload-multiple-states-disabled-border, map-get($multiple-states, disabled, border));
97
140
  }
98
141
  }
99
142
  }
@@ -101,7 +144,7 @@
101
144
  &:not(.disabled) {
102
145
  .mc-file-upload__row.error {
103
146
  *, .mc-icon {
104
- color: map.get($foreground, text-error);
147
+ color: mc-css-variable(foreground-text-error, map-get($foreground, text-error));
105
148
  }
106
149
  }
107
150
  }
@@ -116,57 +159,47 @@
116
159
 
117
160
  .mc-single-file-upload, .mc-multiple-file-upload {
118
161
  .mc-file-upload__hint:not(.mc-error) {
119
- color: map-get($foreground, text-less-contrast);
162
+ color: mc-css-variable(foreground-text-less-contrast, map-get($foreground, text-less-contrast));
120
163
  }
121
164
  }
122
165
  }
123
166
 
124
167
 
125
168
  @mixin mc-file-upload-typography($config) {
126
- $tokens: map.get($config, tokens);
127
-
128
169
  .mc-single-file-upload {
129
- @include mc-typography-level-to-styles($config, map.get($tokens, file-upload-font-single));
170
+ @include mc-typography-css-variables(file-upload, single);
130
171
  }
131
172
 
132
173
  .mc-multiple-file-upload {
133
174
  .multiple__header {
134
- @include mc-typography-level-to-styles($config, map.get($tokens, file-upload-font-multiple-header));
175
+ @include mc-typography-css-variables(file-upload, multiple-header);
135
176
  }
136
177
 
137
178
  .multiple__caption {
138
179
  &, .mc-link {
139
- @include mc-typography-level-to-styles(
140
- $config, map.get($tokens, file-upload-font-multiple-caption)
141
- );
180
+ @include mc-typography-css-variables(file-upload, multiple-caption);
142
181
  }
143
182
  }
144
183
 
145
184
  .mc-file-multiple-uploaded__header {
146
- @include mc-typography-level-to-styles(
147
- $config,
148
- map.get($tokens, file-upload-font-multiple-uploaded-header)
149
- );
185
+ @include mc-typography-css-variables(file-upload, multiple-uploaded-header);
150
186
  }
151
187
 
152
188
  .multiple__uploaded-item {
153
- @include mc-typography-level-to-styles($config, map.get($tokens, file-upload-font-multiple-uploaded-item));
189
+ @include mc-typography-css-variables(file-upload, multiple-uploaded-item);
154
190
  }
155
191
 
156
192
  .mc-file-upload {
157
193
  .mc-list-item,
158
194
  .mc-list-option {
159
- @include mc-typography-level-to-styles(
160
- $config,
161
- map.get($tokens, file-upload-font-multiple-uploaded-item)
162
- );
195
+ @include mc-typography-css-variables(file-upload, multiple-uploaded-item);
163
196
  }
164
197
  }
165
198
  }
166
199
 
167
200
  .mc-single-file-upload, .mc-multiple-file-upload {
168
201
  .mc-file-upload__hint {
169
- @include mc-typography-level-to-styles($config, map.get($tokens, form-field-hint-font-default));
202
+ @include mc-typography-css-variables(form-field-hint, default);
170
203
  }
171
204
  }
172
205
  }
@@ -1,11 +1,4 @@
1
- @use 'sass:meta';
2
- @use 'sass:map';
3
1
 
4
- @use '../core/styles/tokens';
5
-
6
- @use '../core/styles/common';
7
-
8
- $tokens: meta.module-variables(tokens) !default;
9
2
 
10
3
  .mc-file-upload {
11
4
  box-sizing: border-box;
@@ -4,34 +4,21 @@
4
4
  @use '../core/styles/tokens';
5
5
 
6
6
  @use '../core/styles/common';
7
+ @use '../core/styles/common/tokens' as *;
8
+
7
9
 
8
10
  $tokens: meta.module-variables(tokens) !default;
9
11
 
10
12
  $multiple-default-height: 176px;
11
13
  $border-type-header: solid;
12
14
 
13
- $horizontal-padding-item: var(
14
- --mc-file-upload-size-multiple-uploaded-item-horizontal-padding,
15
- map.get($tokens, file-upload-size-multiple-uploaded-item-horizontal-padding)
16
- );
17
- $vertical-padding-item: var(
18
- --mc-file-upload-size-multiple-uploaded-item-vertical-padding,
19
- map.get($tokens, file-upload-size-multiple-uploaded-item-vertical-padding)
20
- );
15
+ $horizontal-padding-item: mc-css-variable(file-upload-size-multiple-uploaded-item-horizontal-padding);
16
+ $vertical-padding-item: mc-css-variable(file-upload-size-multiple-uploaded-item-vertical-padding);
21
17
 
22
18
  .mc-file-upload {
23
- border-radius: var(
24
- --mc-file-upload-size-multiple-border-radius,
25
- map.get($tokens, file-upload-size-multiple-border-radius)
26
- );
27
- border-width: var(
28
- --mc-file-upload-size-multiple-border-width,
29
- map.get($tokens, file-upload-size-multiple-border-width)
30
- );
31
- border-style: var(
32
- --mc-file-upload-size-multiple-border-style,
33
- map.get($tokens, file-upload-size-multiple-border-style)
34
- );
19
+ border-radius: mc-css-variable(file-upload-size-multiple-border-radius);
20
+ border-width: mc-css-variable(file-upload-size-multiple-border-width);
21
+ border-style: mc-css-variable(file-upload-size-multiple-border-style);
35
22
 
36
23
  .mc-list-option {
37
24
  padding: $horizontal-padding-item $vertical-padding-item;
@@ -57,8 +44,8 @@ $vertical-padding-item: var(
57
44
  }
58
45
 
59
46
  .mc-file-upload__size {
60
- width: map.get($tokens, size-7xl);
61
- min-width: map.get($tokens, size-7xl);
47
+ width: mc-css-variable(size-7xl);
48
+ min-width: mc-css-variable(size-7xl);
62
49
  text-align: left;
63
50
  flex-grow: 1;
64
51
  }
@@ -97,7 +84,7 @@ $vertical-padding-item: var(
97
84
  border: 2px solid transparent;
98
85
  border-bottom: unset;
99
86
  box-sizing: border-box;
100
- height: var(--mc-list-size-item-height, map.get($tokens, size-3xl));
87
+ height: mc-css-variable(size-3xl);
101
88
  }
102
89
 
103
90
  }
@@ -106,41 +93,26 @@ $vertical-padding-item: var(
106
93
  .dropzone {
107
94
  $padding-top: map.get($tokens, size-xxs);
108
95
  margin: 0;
109
- border-top-width: var(
110
- --mc-file-upload-size-multiple-border-width,
111
- map.get($tokens, file-upload-size-multiple-border-width)
112
- );
113
- border-top-style: var(
114
- --mc-file-upload-size-multiple-border-style,
115
- map.get($tokens, file-upload-size-multiple-border-style)
116
- );
96
+ border-top-width: mc-css-variable(file-upload-size-multiple-border-width);
97
+ border-top-style: mc-css-variable(file-upload-size-multiple-border-style);
117
98
  padding: calc($padding-top - 1px)
118
- map.get($tokens, size-m)
119
- map.get($tokens, size-xxs)
120
- map.get($tokens, size-m);
99
+ mc-css-variable(size-m)
100
+ mc-css-variable(size-xxs)
101
+ mc-css-variable(size-m);
121
102
  }
122
103
  }
123
104
 
124
105
  &.compact {
125
106
  &:not(.selected) {
126
- height: var(
127
- --mc-file-upload-size-single-height,
128
- map.get($tokens, file-upload-size-single-height)
129
- );
130
- padding-top: var(
131
- --mc-file-upload-size-single-vertical-padding,
132
- map.get($tokens, file-upload-size-single-vertical-padding)
133
- );
134
- padding-bottom: var(
135
- --mc-file-upload-size-single-vertical-padding,
136
- map.get($tokens, file-upload-size-single-vertical-padding)
137
- );
138
- padding-left: map.get($tokens, size-m);
107
+ height: mc-css-variable(file-upload-size-single-height);
108
+ padding-top: mc-css-variable(file-upload-size-single-vertical-padding);
109
+ padding-bottom: mc-css-variable(file-upload-size-single-vertical-padding);
110
+ padding-left: mc-css-variable(size-m);
139
111
  }
140
112
 
141
113
  .dropzone {
142
114
  .dropzone__text {
143
- margin-left: map.get($tokens, size-xs);
115
+ margin-left: mc-css-variable(size-xs);
144
116
  }
145
117
  }
146
118
  }
@@ -151,14 +123,14 @@ $vertical-padding-item: var(
151
123
 
152
124
  .dropzone {
153
125
  .dropzone__text {
154
- margin-left: map.get($tokens, size-l);
126
+ margin-left: mc-css-variable(size-l);
155
127
  }
156
128
  }
157
129
 
158
130
  .btn-upload {
159
131
  .dropzone {
160
132
  .dropzone__text {
161
- margin-left: map.get($tokens, size-xs);
133
+ margin-left: mc-css-variable(size-xs);
162
134
  }
163
135
  }
164
136
  }
@@ -176,5 +148,5 @@ $vertical-padding-item: var(
176
148
  }
177
149
 
178
150
  .mc-file-upload__hint {
179
- margin-top: var(--mc-form-field-hint-size-margin-top, map.get($tokens, form-field-hint-size-margin-top));
151
+ margin-top: mc-css-variable(form-field-hint-size-margin-top);
180
152
  }
@@ -4,39 +4,24 @@
4
4
  @use '../core/styles/tokens';
5
5
 
6
6
  @use '../core/styles/common';
7
+ @use '../core/styles/common/tokens' as *;
8
+
7
9
 
8
10
  $tokens: meta.module-variables(tokens) !default;
9
11
 
10
12
  .mc-file-upload {
11
- height: var(
12
- --mc-file-upload-size-single-height,
13
- map.get($tokens, file-upload-size-single-height)
14
- );
15
- padding-top: var(
16
- --mc-file-upload-size-single-vertical-padding,
17
- map.get($tokens, file-upload-size-single-vertical-padding)
18
- );
19
- padding-bottom: var(
20
- --mc-file-upload-size-single-vertical-padding,
21
- map.get($tokens, file-upload-size-single-vertical-padding)
22
- );
23
- padding-left: map.get($tokens, size-m);
13
+ height: mc-css-variable(file-upload-size-single-height);
14
+ padding-top: mc-css-variable(file-upload-size-single-vertical-padding);
15
+ padding-bottom: mc-css-variable(file-upload-size-single-vertical-padding);
16
+ padding-left: mc-css-variable(size-m);
24
17
 
25
- border-radius: var(
26
- --mc-file-upload-size-single-border-radius,
27
- map.get($tokens, file-upload-size-single-border-radius)
28
- );
29
- border-width: var(
30
- --mc-file-upload-size-single-border-width,
31
- map.get($tokens, file-upload-size-single-border-width));
32
- border-style: var(
33
- --mc-file-upload-size-single-border-style,
34
- map.get($tokens, file-upload-size-single-border-style)
35
- );
18
+ border-radius: mc-css-variable(file-upload-size-single-border-radius);
19
+ border-width: mc-css-variable(file-upload-size-single-border-width);
20
+ border-style: mc-css-variable(file-upload-size-single-border-style);
36
21
 
37
22
  .dropzone {
38
23
  .dropzone__text {
39
- margin-left: map.get($tokens, size-xs);
24
+ margin-left: mc-css-variable(size-xs);
40
25
  }
41
26
  }
42
27
 
@@ -49,7 +34,7 @@ $tokens: meta.module-variables(tokens) !default;
49
34
  width: 100%;
50
35
 
51
36
  .file-item__text {
52
- margin-left: map.get($tokens, size-s);
37
+ margin-left: mc-css-variable(size-s);
53
38
  width: 120px;
54
39
  flex-grow: 1;
55
40
  }
@@ -62,5 +47,5 @@ $tokens: meta.module-variables(tokens) !default;
62
47
  }
63
48
 
64
49
  .mc-file-upload__hint {
65
- margin-top: var(--mc-form-field-hint-size-margin-top, map.get($tokens, form-field-hint-size-margin-top));
50
+ margin-top: mc-css-variable(form-field-hint-size-margin-top);
66
51
  }
@@ -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,63 +20,68 @@
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 {
66
- box-shadow: 0 0 0 1px mc-color($error);
68
+ box-shadow: 0 0 0 1px mc-css-variable(error-default, mc-color($error));
67
69
  }
68
70
  }
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,62 +89,67 @@
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 {
144
- @include mc-typography-level-to-styles($config, caption);
153
+ @include mc-typography-level-to-styles_css-variables(typography, caption);
145
154
  }
146
155
  }