@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
@@ -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,27 +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
- &:active {
35
- color: map.get($link, state-active-text);
37
+ &:active,
38
+ &.mc-active {
39
+ color: mc-css-variable(link-state-active-text, map-get($link, state-active-text));
36
40
  }
37
41
 
38
42
  &.cdk-keyboard-focused {
39
- 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);
40
46
 
41
- outline-offset: map.get($tokens, link-size-state-focused-outline-offset);
47
+ outline-offset: mc-css-variable(link-size-state-focused-outline-offset);
42
48
  }
43
49
 
44
50
  & .mc-icon {
@@ -49,16 +55,16 @@
49
55
  &.mc-text-with-icon .mc-link__text {
50
56
  border-bottom-style: solid;
51
57
  border-bottom-width: 1px;
52
- border-bottom-color: map.get($link, border-bottom);
58
+ border-bottom-color: mc-css-variable(link-border-bottom, map-get($link, border-bottom));
53
59
  }
54
60
 
55
61
  &.mc-text-with-icon .mc-link__text {
56
62
  &:not(:first-child) {
57
- margin-left: map.get($tokens, link-size-default-icon-margin);
63
+ margin-left: mc-css-variable(link-size-default-icon-margin);
58
64
  }
59
65
 
60
66
  &:not(:last-child) {
61
- margin-right: map.get($tokens, link-size-default-icon-margin);
67
+ margin-right: mc-css-variable(link-size-default-icon-margin);
62
68
  }
63
69
  }
64
70
 
@@ -73,7 +79,8 @@
73
79
  &:hover {
74
80
  &.mc-text-only,
75
81
  &.mc-text-with-icon .mc-link__text {
76
- 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));
77
84
  }
78
85
  }
79
86
 
@@ -95,28 +102,28 @@
95
102
  &.mc-link_caption {
96
103
  &.mc-text-with-icon .mc-link__text {
97
104
  &:not(:first-child) {
98
- margin-left: map.get($tokens, link-size-caption-icon-margin);
105
+ margin-left: mc-css-variable(link-size-caption-icon-margin);
99
106
  }
100
107
 
101
108
  &:not(:last-child) {
102
- margin-right: map.get($tokens, link-size-caption-icon-margin);
109
+ margin-right: mc-css-variable(link-size-caption-icon-margin);
103
110
  }
104
111
  }
105
112
  }
106
113
 
107
114
  &[disabled] {
108
- color: map.get($foreground, text-disabled);
115
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
109
116
 
110
117
  cursor: default;
111
118
  pointer-events: none;
112
119
 
113
120
  &.mc-text-only,
114
121
  &.mc-text-with-icon .mc-link__text {
115
- border-bottom-color: map.get($link, border-bottom);
122
+ border-bottom-color: mc-css-variable(link-border-bottom, map-get($link, border-bottom));
116
123
  }
117
124
 
118
125
  & .mc-icon {
119
- color: map.get($foreground, text-disabled);
126
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
120
127
  }
121
128
  /* stylelint-enable no-descending-specificity */
122
129
  }
@@ -128,36 +135,35 @@
128
135
 
129
136
  $link: map.get(map.get($theme, components), link);
130
137
 
131
- $tokens: map.get($theme, tokens);
132
-
133
138
  .mc-link:not(.mc-link_use-visited) {
134
139
  &:visited {
135
- color: map.get($link, text);
140
+ color: mc-css-variable(link-text, map-get($link, text));
136
141
  }
137
142
 
138
- @include mc-link($foreground, $link, $tokens);
143
+ @include mc-link($foreground, $link);
139
144
  }
140
145
 
141
146
  .mc-link.mc-link_use-visited {
142
147
  &:visited {
143
- color: map.get($link, state-visited-text);
148
+ color: mc-css-variable(link-state-visited-text, map-get($link, state-visited-text));
144
149
 
145
150
  &.mc-text-only,
146
151
  &.mc-text-with-icon .mc-link__text {
147
- 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));
148
154
  }
149
155
 
150
156
  & .mc-icon {
151
- color: map.get($link, state-visited-text);
157
+ color: mc-css-variable(link-state-visited-text, map-get($link, state-visited-text));
152
158
  }
153
159
  }
154
160
 
155
- @include mc-link($foreground, $link, $tokens);
161
+ @include mc-link($foreground, $link);
156
162
  }
157
163
 
158
164
  @media print {
159
165
  .mc-link_print:not([disabled]) {
160
- color: map.get($foreground, text);
166
+ color: mc-css-variable(foreground-text, map-get($foreground, text));
161
167
 
162
168
  &.mc-text-only,
163
169
  &.mc-text-with-icon .mc-link__text {
@@ -165,7 +171,7 @@
165
171
  }
166
172
 
167
173
  &::after {
168
- color: map.get($foreground, text);
174
+ color: mc-css-variable(foreground-text, map-get($foreground, text));
169
175
 
170
176
  content: ":\a" attr(print);
171
177
  white-space: pre;
@@ -175,13 +181,11 @@
175
181
  }
176
182
 
177
183
  @mixin mc-link-typography($config) {
178
- $tokens: map.get($config, tokens);
179
-
180
184
  .mc-link {
181
- @include mc-typography-level-to-styles($config, map.get($tokens, link-font-default));
185
+ @include mc-typography-css-variables(link, default);
182
186
  }
183
187
 
184
188
  .mc-link.mc-link_caption {
185
- @include mc-typography-level-to-styles($config, map.get($tokens, link-font-caption));
189
+ @include mc-typography-css-variables(link, caption);
186
190
  }
187
191
  }
@@ -6,6 +6,7 @@
6
6
  @use '../core/styles/tokens';
7
7
 
8
8
  @use '../core/styles/common';
9
+ @use '../core/styles/common/tokens' as *;
9
10
 
10
11
 
11
12
  $tokens: meta.module-variables(tokens) !default;
@@ -18,16 +19,16 @@ $tokens: meta.module-variables(tokens) !default;
18
19
  align-items: center;
19
20
 
20
21
  box-sizing: border-box;
21
- height: var(--mc-list-size-item-height, map.get($tokens, list-size-item-height));
22
+ height: mc-css-variable(list-size-item-height);
22
23
 
23
24
  border: 2px solid transparent;
24
25
 
25
- padding-left: var(--mc-list-size-horizontal-padding, map.get($tokens, list-size-horizontal-padding));
26
+ padding-left: mc-css-variable(list-size-horizontal-padding);
26
27
 
27
28
  .mc-list-text {
28
29
  @include list.mc-line-wrapper-base();
29
30
 
30
- padding-right: var(--mc-list-size-horizontal-padding, map.get($tokens, list-size-horizontal-padding));
31
+ padding-right: mc-css-variable(list-size-horizontal-padding);
31
32
  display: inline-block;
32
33
  @include common.mc-truncate-line();
33
34
  }
@@ -2,6 +2,8 @@
2
2
  @use 'sass:map';
3
3
 
4
4
  @use '../core/styles/typography/typography-utils' as *;
5
+ @use '../core/styles/common/tokens' as *;
6
+
5
7
 
6
8
  @mixin mc-list-theme($theme) {
7
9
  $foreground: map.get($theme, foreground);
@@ -9,38 +11,36 @@
9
11
 
10
12
  .mc-list-item,
11
13
  .mc-list-option {
12
- color: map.get($foreground, text);
14
+ color: mc-css-variable(foreground-text, map-get($foreground, text));
13
15
  }
14
16
 
15
17
  .mc-list-option {
16
18
  outline: none;
17
19
 
18
20
  &:hover {
19
- background: map.get($background, overlay-hover);
21
+ background: mc-css-variable(background-overlay-hover, map-get($background, overlay-hover));
20
22
  }
21
23
 
22
24
  &.mc-focused {
23
- border-color: map.get(map.get($theme, states), focused-color);
25
+ border-color: mc-css-variable(states-focused-color, map-get($theme, states, focused-color));
24
26
  }
25
27
 
26
28
  &.mc-selected {
27
- background: map.get(map.get($theme, states), selected-color);
29
+ background: mc-css-variable(states-selected-color, map-get($theme, states, selected-color));
28
30
  }
29
31
 
30
32
  &.mc-disabled,
31
33
  &[disabled] {
32
34
  background: transparent;
33
35
 
34
- color: map.get($foreground, text-disabled);
36
+ color: mc-css-variable(foreground-text-disabled, map-get($foreground, text-disabled));
35
37
  }
36
38
  }
37
39
  }
38
40
 
39
41
  @mixin mc-list-typography($config) {
40
- $tokens: map.get($config, tokens);
41
-
42
42
  .mc-list-item,
43
43
  .mc-list-option {
44
- @include mc-typography-level-to-styles($config, map.get($tokens, list-font-item));
44
+ @include mc-typography-css-variables(list, item);
45
45
  }
46
46
  }
package/list/list.scss CHANGED
@@ -5,6 +5,7 @@
5
5
  @use '../core/styles/common/list';
6
6
 
7
7
  @use '../core/styles/tokens';
8
+ @use '../core/styles/common/tokens' as *;
8
9
 
9
10
 
10
11
  $tokens: meta.module-variables(tokens) !default;
@@ -31,7 +32,7 @@ $tokens: meta.module-variables(tokens) !default;
31
32
 
32
33
  & .mc-pseudo-checkbox,
33
34
  & .mc-icon {
34
- margin-right: var(--mc-list-size-icon-right-margin, map.get($tokens, list-size-icon-right-margin));
35
+ margin-right: mc-css-variable(list-size-icon-right-margin);
35
36
  }
36
37
 
37
38
  & .mc-option-action {
@@ -2,32 +2,32 @@
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-loader-overlay-theme($theme) {
7
- $loader-overlay: map.get(map.get($theme, components), loader-overlay);
9
+ $loader-overlay: map-get(map-get($theme, components), loader-overlay);
8
10
 
9
11
  .mc-loader-overlay {
10
- background: map.get($loader-overlay, background);
12
+ background: mc-css-variable(loader-overlay-background, map-get($loader-overlay, background));
11
13
  }
12
14
 
13
15
  .mc-loader-overlay-text {
14
- color: map.get($loader-overlay, text);
16
+ color: mc-css-variable(loader-overlay-text, map-get($loader-overlay, text));
15
17
  }
16
18
 
17
19
  .mc-loader-overlay-caption {
18
- color: map.get($loader-overlay, caption);
20
+ color: mc-css-variable(loader-overlay-caption, map-get($loader-overlay, caption));
19
21
  }
20
22
  }
21
23
 
22
24
  @mixin mc-loader-overlay-typography($config) {
23
- $tokens: map.get($config, tokens);
24
-
25
25
  .mc-loader-overlay-text {
26
- @include mc-typography-level-to-styles($config, map.get($tokens, loader-overlay-font-text));
26
+ @include mc-typography-css-variables(loader-overlay, text);
27
27
  }
28
28
 
29
29
  .mc-loader-overlay-caption {
30
- @include mc-typography-level-to-styles($config, map.get($tokens, loader-overlay-font-caption));
30
+ @include mc-typography-css-variables(loader-overlay, caption);
31
31
  }
32
32
  }
33
33
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  @use '../core/styles/tokens';
5
5
  @use '../core/styles/variables';
6
+ @use '../core/styles/common/tokens' as *;
6
7
 
7
8
 
8
9
  $tokens: meta.module-variables(tokens) !default;
@@ -41,34 +42,28 @@ $tokens: meta.module-variables(tokens) !default;
41
42
  justify-content: unset;
42
43
 
43
44
  & .mc-loader-overlay__container {
44
- margin-top: var(
45
- --mc-loader-overlay-size-fixed-top-padding,
46
- map.get($tokens, loader-overlay-size-fixed-top-padding)
47
- );
45
+ margin-top: mc-css-variable(loader-overlay-size-fixed-top-padding);
48
46
  }
49
47
  }
50
48
 
51
49
  &.mc-loader-overlay_center:not(.mc-loader-overlay_empty) .mc-loader-overlay__container {
52
50
  transform: translateY(
53
- var(
54
- --mc-loader-overlay-size-center-optical-compensation,
55
- map.get($tokens, loader-overlay-size-center-optical-compensation)
56
- ));
51
+ mc-css-variable(loader-overlay-size-center-optical-compensation));
57
52
  }
58
53
  }
59
54
 
60
55
  .mc-loader-overlay-text {
61
- margin-top: map.get($tokens, size-s);
56
+ margin-top: mc-css-variable(size-s);
62
57
 
63
- max-width: map.get($tokens, loader-overlay-size-text-max-width);
58
+ max-width: mc-css-variable(loader-overlay-size-text-max-width);
64
59
 
65
60
  text-align: center;
66
61
  }
67
62
 
68
63
  .mc-loader-overlay-caption {
69
- margin-top: map.get($tokens, size-3xs);
64
+ margin-top: mc-css-variable(size-3xs);
70
65
 
71
- max-width: map.get($tokens, loader-overlay-size-text-max-width);
66
+ max-width: mc-css-variable(loader-overlay-size-text-max-width);
72
67
 
73
68
  text-align: center;
74
69
  }
@@ -2,138 +2,156 @@
2
2
 
3
3
  @use '../core/styles/theming/theming' as *;
4
4
  @use '../core/styles/typography/typography-utils' as *;
5
+ @use '../core/styles/common/tokens' as *;
6
+
5
7
 
6
8
  @mixin mc-markdown-theme($theme) {
7
9
  $foreground: map.get($theme, foreground);
8
10
  $background: map.get($theme, background);
9
11
 
10
12
  $markdown: map.get(map.get($theme, components), markdown);
11
- $tokens: map.get($theme, tokens);
12
13
 
13
14
  .mc-markdown {
14
- color: map.get($foreground, text);
15
- background: map.get($background, background);;
15
+ color: mc-css-variable(foreground-text, map-get($foreground, text));
16
+ background: mc-css-variable(background-background, map-get($background, background));
16
17
 
17
18
  // h1, h2, h3, h4, h5, h6
18
19
  @for $i from 1 through 6 {
19
20
  .mc-markdown__h#{$i} {
20
- color: map.get($markdown, h#{$i}-color);
21
+ color: mc-css-variable(markdown-h#{$i}-color, map-get($markdown, h#{$i}-color));
21
22
  }
22
23
  }
23
24
 
24
25
  .mc-markdown__p {
25
- color: map.get($markdown, p-color);
26
+ color: mc-css-variable(markdown-p-color, map-get($markdown, p-color));
26
27
  }
27
28
 
28
29
  .mc-markdown__ul,
29
30
  .mc-markdown__ol {
30
- color: map.get($markdown, list-color);
31
+ color: mc-css-variable(markdown-list-color, map-get($markdown, list-color));
31
32
  }
32
33
 
33
34
  .mc-markdown__blockquote {
34
- color: map.get($markdown, blockquote-text);
35
- background: map.get($markdown, blockquote-background);
36
- border-color: map.get($markdown, blockquote-border);
37
- border-left-color: map.get($markdown, blockquote-line);
35
+ color: mc-css-variable(markdown-blockquote-text, map-get($markdown, blockquote-text));
36
+ background: mc-css-variable(markdown-blockquote-background, map-get($markdown, blockquote-background));
37
+ border-color: mc-css-variable(markdown-blockquote-border, map-get($markdown, blockquote-border));
38
+ border-left-color: mc-css-variable(markdown-blockquote-line, map-get($markdown, blockquote-line));
38
39
  }
39
40
 
40
41
  .mc-markdown__pre,
41
42
  .mc-markdown__p > .mc-markdown__code {
42
- color: map.get($markdown, code-text);
43
- background-color: map.get($markdown, code-background);
44
- border-color: map.get($markdown, code-border);
43
+ color: mc-css-variable(markdown-code-text, map-get($markdown, code-text));
44
+ background-color: mc-css-variable(markdown-code-background, map-get($markdown, code-background));
45
+ border-color: mc-css-variable(markdown-code-border, map-get($markdown, code-border));
45
46
  }
46
47
 
47
48
  .mc-markdown__a {
48
- color: map.get($markdown, link-text);
49
- border-bottom-color: map.get($markdown, link-border-bottom);
49
+ color: mc-css-variable(markdown-link-text, map-get($markdown, link-text));
50
+ border-bottom-color: mc-css-variable(markdown-link-border-bottom, map-get($markdown, link-border-bottom));
50
51
 
51
52
  &:visited {
52
- color: map.get($markdown, link-state-visited-text);
53
- border-bottom-color: map.get($markdown, link-state-visited-border-bottom);
53
+ color: mc-css-variable(markdown-link-state-visited-text, map-get($markdown, link-state-visited-text));
54
+ border-bottom-color: mc-css-variable(
55
+ markdown-link-state-visited-border-bottom, map-get($markdown, link-state-visited-border-bottom));
54
56
  }
55
57
 
56
58
  &:hover {
57
- color: map.get($markdown, link-state-hover-text);
59
+ color: mc-css-variable(markdown-link-state-hover-text, map-get($markdown, link-state-hover-text));
58
60
  transition: color 0ms;
59
- border-bottom-color: map.get($markdown, link-state-hover-border-bottom);
61
+ border-bottom-color: mc-css-variable(
62
+ markdown-link-state-hover-border-bottom, map-get($markdown, link-state-hover-border-bottom));
60
63
  }
61
64
 
62
65
  &:active {
63
- color: map.get($markdown, link-state-active-text);
66
+ color: mc-css-variable(markdown-link-state-active-text, map-get($markdown, link-state-active-text));
64
67
  }
65
68
 
66
69
  &:focus {
67
70
  outline:
68
- map.get($markdown, link-state-focused-outline)
71
+ mc-css-variable(markdown-link-state-focused-outline, map-get($markdown, link-state-focused-outline))
69
72
  solid
70
- map.get($tokens, markdown-link-size-state-focused-outline-width);
73
+ mc-css-variable(markdown-link-size-state-focused-outline-width);
71
74
 
72
- outline-offset: map.get($tokens, markdown-link-size-state-focused-outline-offset);
75
+ outline-offset: mc-css-variable(markdown-link-size-state-focused-outline-offset);
73
76
  }
74
77
  }
75
78
 
76
79
  .mc-markdown__img + em {
77
- color: map.get($markdown, image-caption-text);
80
+ color: mc-css-variable(markdown-image-caption-text, map-get($markdown, image-caption-text));
78
81
  }
79
82
 
80
83
  .mc-markdown__hr {
81
- border-bottom-color: map.get($markdown, hr-color);
84
+ border-bottom-color: mc-css-variable(markdown-hr-color, map-get($markdown, hr-color));
82
85
  }
83
86
 
84
87
  .mc-markdown__table > .mc-markdown__thead {
85
- color: map.get($markdown, table-header);
86
- border-bottom-color: map.get($markdown, table-border);
88
+ color: mc-css-variable(markdown-table-header, map-get($markdown, table-header));
89
+ border-bottom-color: mc-css-variable(markdown-table-border, map-get($markdown, table-border));
87
90
  }
88
91
 
89
92
  .mc-markdown__table > .mc-markdown__tbody {
90
- color: map.get($markdown, table-body);
93
+ color: mc-css-variable(markdown-table-body, map-get($markdown, table-body));
91
94
  }
92
95
  }
93
96
  }
94
97
 
95
98
  @mixin mc-markdown-typography($config) {
96
- $tokens: map.get($config, tokens);
97
-
98
99
  .mc-markdown {
99
- // h1, h2, h3, h4, h5, h6
100
- @for $i from 1 through 6 {
101
- .mc-markdown__h#{$i} {
102
- @include mc-typography-level-to-styles($config, map.get($tokens, markdown-h#{$i}-font-default));
103
- }
100
+ .mc-markdown__h1 {
101
+ @include mc-typography-css-variables(markdown-h1, default);
102
+ }
103
+
104
+ .mc-markdown__h2 {
105
+ @include mc-typography-css-variables(markdown-h2, default);
106
+ }
107
+
108
+ .mc-markdown__h3 {
109
+ @include mc-typography-css-variables(markdown-h3, default);
110
+ }
111
+
112
+ .mc-markdown__h4 {
113
+ @include mc-typography-css-variables(markdown-h4, default);
114
+ }
115
+
116
+ .mc-markdown__h5 {
117
+ @include mc-typography-css-variables(markdown-h5, default);
118
+ }
119
+
120
+ .mc-markdown__h6 {
121
+ @include mc-typography-css-variables(markdown-h6, default);
104
122
  }
105
123
 
106
124
  .mc-markdown__p {
107
- @include mc-typography-level-to-styles($config, map.get($tokens, markdown-p-font-default));
125
+ @include mc-typography-css-variables(markdown-p, default);
108
126
  }
109
127
 
110
128
  .mc-markdown__ul,
111
129
  .mc-markdown__ol {
112
- @include mc-typography-level-to-styles($config, map.get($tokens, markdown-list-font-default));
130
+ @include mc-typography-css-variables(markdown-list, default);
113
131
  }
114
132
 
115
133
  .mc-markdown__blockquote > .mc-markdown__p {
116
- @include mc-typography-level-to-styles($config, map.get($tokens, markdown-blockquote-font-default));
134
+ @include mc-typography-css-variables(markdown-blockquote, default);
117
135
  }
118
136
 
119
137
  .mc-markdown__code {
120
- @include mc-typography-level-to-styles($config, map.get($tokens, markdown-code-font-default));
138
+ @include mc-typography-css-variables(markdown-code, default);
121
139
  }
122
140
 
123
141
  .mc-markdown__a {
124
- @include mc-typography-level-to-styles($config, map.get($tokens, markdown-link-font-default));
142
+ @include mc-typography-css-variables(markdown-link, default);
125
143
  }
126
144
 
127
145
  .mc-markdown__img + em {
128
- @include mc-typography-level-to-styles($config, map.get($tokens, markdown-image-font-caption));
146
+ @include mc-typography-css-variables(markdown-image, caption);
129
147
  }
130
148
 
131
149
  .mc-markdown__table > .mc-markdown__thead {
132
- @include mc-typography-level-to-styles($config, map.get($tokens, markdown-table-font-header));
150
+ @include mc-typography-css-variables(markdown-table, header);
133
151
  }
134
152
 
135
153
  .mc-markdown__table > .mc-markdown__tbody {
136
- @include mc-typography-level-to-styles($config, map.get($tokens, markdown-table-font-body));
154
+ @include mc-typography-css-variables(markdown-table, body);
137
155
  }
138
156
  }
139
157
  }