@ptsecurity/mosaic 14.2.2 → 14.2.3

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.
package/_theming.scss CHANGED
@@ -3740,6 +3740,10 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
3740
3740
  }
3741
3741
 
3742
3742
 
3743
+
3744
+
3745
+
3746
+
3743
3747
  @function mc-typography-level(
3744
3748
  $font-size,
3745
3749
  $line-height: $font-size,
@@ -3816,138 +3820,120 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
3816
3820
 
3817
3821
 
3818
3822
 
3823
+ @function mc-typography-config() {
3824
+ $font-family: $font-family-base;
3825
+ $typography: map-get($mosaic, typography);
3819
3826
 
3820
- .mc-badge {
3821
- display: inline-flex;
3822
- flex-direction: row;
3823
- justify-content: flex-start;
3824
- align-items: center;
3825
-
3826
- text-align: center;
3827
- white-space: nowrap;
3828
-
3829
- border-style: solid;
3830
-
3831
- box-sizing: border-box;
3832
-
3833
- &.mc-badge_default {
3834
- height: var(--mc-badge-size-default-height, $badge-size-default-height);
3835
- min-width: var(--mc-badge-size-default-min-width, $badge-size-default-min-width);
3836
- padding: var(--mc-badge-size-default-padding, $badge-size-default-padding);
3837
- border: {
3838
- width: var(--mc-badge-size-default-border-width, $badge-size-default-border-width);
3839
- radius: var(--mc-badge-size-default-border-radius, $badge-size-default-border-radius);
3840
- }
3841
- }
3827
+ $config: (
3828
+ display-1: map-get($typography, display-1),
3829
+ display-2: map-get($typography, display-2),
3830
+ display-3: map-get($typography, display-3),
3831
+
3832
+ headline: map-get($typography, headline),
3833
+ subheading: map-get($typography, subheading),
3834
+ title: map-get($typography, title),
3835
+
3836
+ body: map-get($typography, body),
3837
+ body-strong: map-get($typography, body-strong),
3838
+ body-caps: map-get($typography, body-caps),
3839
+ body-mono: map-get($typography, body-mono),
3840
+ body-tabular: map-get($typography, body-tabular),
3841
+
3842
+ caption: map-get($typography, caption),
3843
+ caption-strong: map-get($typography, caption-strong),
3844
+ caption-caps: map-get($typography, caption-caps),
3845
+ caption-mono: map-get($typography, caption-mono),
3846
+ caption-tabular: map-get($typography, caption-tabular),
3847
+
3848
+ small-text: map-get($typography, small-text),
3849
+ extra-small-text: map-get($typography, extra-small-text),
3850
+ extra-small-text-caps: map-get($typography, extra-small-text-caps),
3851
+ extra-small-text-mono: map-get($typography, extra-small-text-mono)
3852
+ );
3842
3853
 
3843
- &.mc-badge_mini {
3844
- height: var(--mc-badge-size-mini-height, $badge-size-mini-height);
3845
- min-width: var(--mc-badge-size-mini-min-width, $badge-size-mini-min-width);
3846
- padding: var(--mc-badge-size-mini-padding, $badge-size-mini-padding);
3847
- border: {
3848
- width: var(--mc-badge-size-mini-border-width, $badge-size-mini-border-width);
3849
- radius: var(--mc-badge-size-mini-border-radius, $badge-size-mini-border-radius);
3854
+ @each $key, $level in $config {
3855
+ @if map-get($level, font-family) == null {
3856
+ $new-level: map-merge($level, (font-family: $font-family));
3857
+ $config: map-merge($config, ($key: $new-level));
3850
3858
  }
3851
-
3852
3859
  }
3853
- }
3854
3860
 
3855
-
3856
- @mixin mc-badge-color($params) {
3857
- color: map-get($params, color);
3858
- border-color: map-get($params, border);
3859
- background: map-get($params, background);
3861
+ // Add the base font family to the config.
3862
+ @return map-merge($config, (font-family: $font-family));
3860
3863
  }
3861
3864
 
3862
- @mixin mc-badge-theme($theme) {
3863
- $foreground: map-get($theme, foreground);
3864
- $badge: map-get(map-get($theme, components), badge);
3865
3865
 
3866
- .mc-badge {
3867
- color: map-get($foreground, text);
3868
- border-color: map-get($foreground, border);
3866
+ @mixin mc-base-typography($config) {
3867
+ .mc-display-1 {
3868
+ @include mc-typography-level-to-styles($config, display-1);
3869
3869
  }
3870
3870
 
3871
- .mc-badge_solid {
3872
- &.mc-badge_primary {
3873
- @include mc-badge-color(map-get($badge, primary_solid));
3874
- }
3875
-
3876
- &.mc-badge_second {
3877
- @include mc-badge-color(map-get($badge, second_solid));
3878
- }
3879
-
3880
- &.mc-badge_transparent {
3881
- @include mc-badge-color(map-get($badge, transparent_solid));
3882
- }
3871
+ .mc-display-2 {
3872
+ @include mc-typography-level-to-styles($config, display-2);
3873
+ }
3883
3874
 
3884
- &.mc-badge_success {
3885
- @include mc-badge-color(map-get($badge, success_solid));
3886
- }
3875
+ .mc-display-3 {
3876
+ @include mc-typography-level-to-styles($config, display-3);
3877
+ }
3887
3878
 
3888
- &.mc-badge_info {
3889
- @include mc-badge-color(map-get($badge, info_solid));
3890
- }
3879
+ .mc-headline {
3880
+ @include mc-typography-level-to-styles($config, headline);
3881
+ }
3891
3882
 
3892
- &.mc-badge_warning {
3893
- @include mc-badge-color(map-get($badge, warning_solid));
3894
- }
3883
+ .mc-subheading {
3884
+ @include mc-typography-level-to-styles($config, subheading);
3885
+ }
3895
3886
 
3896
- &.mc-badge_error {
3897
- @include mc-badge-color(map-get($badge, error_solid));
3898
- }
3887
+ .mc-title {
3888
+ @include mc-typography-level-to-styles($config, title);
3889
+ }
3899
3890
 
3900
- &.mc-badge_light {
3901
- @include mc-badge-color(map-get($badge, light_solid));
3902
- }
3891
+ .mc-body {
3892
+ @include mc-typography-level-to-styles($config, body);
3903
3893
  }
3904
3894
 
3905
- .mc-badge_pastel {
3906
- &.mc-badge_primary {
3907
- @include mc-badge-color(map-get($badge, primary_pastel));
3908
- }
3895
+ .mc-body_tabular {
3896
+ @include mc-typography-level-to-styles($config, body-tabular);
3897
+ }
3909
3898
 
3910
- &.mc-badge_success {
3911
- @include mc-badge-color(map-get($badge, success_pastel));
3912
- }
3899
+ .mc-body_strong {
3900
+ @include mc-typography-level-to-styles($config, body-strong);
3901
+ }
3913
3902
 
3914
- &.mc-badge_info {
3915
- @include mc-badge-color(map-get($badge, info_pastel));
3916
- }
3903
+ .mc-body_caps {
3904
+ @include mc-typography-level-to-styles($config, body-caps);
3905
+ }
3917
3906
 
3918
- &.mc-badge_warning {
3919
- @include mc-badge-color(map-get($badge, warning_pastel));
3920
- }
3907
+ .mc-body_mono {
3908
+ @include mc-typography-level-to-styles($config, body-mono);
3909
+ }
3921
3910
 
3922
- &.mc-badge_error {
3923
- @include mc-badge-color(map-get($badge, error_pastel));
3924
- }
3911
+ .mc-caption {
3912
+ @include mc-typography-level-to-styles($config, caption);
3925
3913
  }
3926
- }
3927
3914
 
3928
- @mixin mc-badge-typography($config) {
3929
- .mc-badge_default {
3930
- @include mc-typography-level-to-styles($config, $badge-font-default-default);
3915
+ .mc-caption_tabular {
3916
+ @include mc-typography-level-to-styles($config, caption-tabular);
3917
+ }
3931
3918
 
3932
- &.mc-badge_caps {
3933
- @include mc-typography-level-to-styles($config, $badge-font-default-caps);
3934
- }
3919
+ .mc-caption_strong {
3920
+ @include mc-typography-level-to-styles($config, caption-strong);
3921
+ }
3935
3922
 
3936
- &.mc-badge_mono {
3937
- @include mc-typography-level-to-styles($config, $badge-font-default-mono);
3938
- }
3923
+ .mc-caption_caps {
3924
+ @include mc-typography-level-to-styles($config, caption-caps);
3939
3925
  }
3940
3926
 
3941
- .mc-badge_mini {
3942
- @include mc-typography-level-to-styles($config, $badge-font-mini-default);
3927
+ .mc-caption_mono {
3928
+ @include mc-typography-level-to-styles($config, caption-mono);
3929
+ }
3943
3930
 
3944
- &.mc-badge_caps {
3945
- @include mc-typography-level-to-styles($config, $badge-font-mini-caps);
3946
- }
3931
+ .mc-small-text {
3932
+ @include mc-typography-level-to-styles($config, small-text);
3933
+ }
3947
3934
 
3948
- &.mc-badge_mono {
3949
- @include mc-typography-level-to-styles($config, $badge-font-mini-mono);
3950
- }
3935
+ .mc-extra-small-text {
3936
+ @include mc-typography-level-to-styles($config, extra-small-text);
3951
3937
  }
3952
3938
  }
3953
3939
 
@@ -3956,9 +3942,6 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
3956
3942
 
3957
3943
 
3958
3944
 
3959
-
3960
-
3961
-
3962
3945
  .mc-alert {
3963
3946
  display: flex;
3964
3947
  align-items: baseline;
@@ -4115,86 +4098,268 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
4115
4098
  }
4116
4099
 
4117
4100
 
4118
- @mixin mc-pseudo-checkbox-color($states) {
4119
- border-color: map-get($states, border);
4120
4101
 
4121
- & .mc-checkbox-checkmark,
4122
- & .mc-checkbox-mixedmark {
4123
- color: map-get($states, color);
4124
- }
4125
4102
 
4126
- &.mc-checked,
4127
- &.mc-indeterminate {
4128
- border-color: map-get($states, checked, border);
4129
4103
 
4130
- background: map-get($states, checked, background);
4131
- }
4132
- }
4104
+ .mc-badge {
4105
+ display: inline-flex;
4106
+ flex-direction: row;
4107
+ justify-content: flex-start;
4108
+ align-items: center;
4133
4109
 
4134
- @mixin mc-pseudo-checkbox-theme($theme) {
4135
- $foreground: map-get($theme, foreground);
4136
- $background: map-get($theme, background);
4110
+ text-align: center;
4111
+ white-space: nowrap;
4137
4112
 
4138
- $checkbox: map-get(map-get($theme, components), checkbox);
4113
+ border-style: solid;
4139
4114
 
4140
- .mc-pseudo-checkbox {
4141
- &.mc-primary {
4142
- @include mc-pseudo-checkbox-color(map-get($checkbox, default));
4143
- }
4115
+ box-sizing: border-box;
4144
4116
 
4145
- &.mc-error {
4146
- @include mc-pseudo-checkbox-color(map-get($checkbox, error));
4117
+ &.mc-badge_default {
4118
+ height: var(--mc-badge-size-default-height, $badge-size-default-height);
4119
+ min-width: var(--mc-badge-size-default-min-width, $badge-size-default-min-width);
4120
+ padding: var(--mc-badge-size-default-padding, $badge-size-default-padding);
4121
+ border: {
4122
+ width: var(--mc-badge-size-default-border-width, $badge-size-default-border-width);
4123
+ radius: var(--mc-badge-size-default-border-radius, $badge-size-default-border-radius);
4147
4124
  }
4125
+ }
4148
4126
 
4149
- &.mc-disabled,
4150
- &.mc-primary.mc-disabled,
4151
- &.mc-error.mc-disabled {
4152
- border-color: map-get($foreground, border);
4153
-
4154
- background-color: map-get($background, background-disabled);
4155
-
4156
- & .mc-checkbox-checkmark,
4157
- & .mc-checkbox-mixedmark {
4158
- color: map-get($foreground, text-disabled);
4159
- }
4127
+ &.mc-badge_mini {
4128
+ height: var(--mc-badge-size-mini-height, $badge-size-mini-height);
4129
+ min-width: var(--mc-badge-size-mini-min-width, $badge-size-mini-min-width);
4130
+ padding: var(--mc-badge-size-mini-padding, $badge-size-mini-padding);
4131
+ border: {
4132
+ width: var(--mc-badge-size-mini-border-width, $badge-size-mini-border-width);
4133
+ radius: var(--mc-badge-size-mini-border-radius, $badge-size-mini-border-radius);
4160
4134
  }
4135
+
4161
4136
  }
4162
4137
  }
4163
4138
 
4164
- @mixin popup-params($theme) {
4165
- $popup: map-get(map-get($theme, components), popup);
4166
-
4167
- box-shadow: map-get($popup, shadow);
4168
- border-color: map-get($popup, border);
4169
4139
 
4170
- background-color: map-get($popup, background);
4140
+ @mixin mc-badge-color($params) {
4141
+ color: map-get($params, color);
4142
+ border-color: map-get($params, border);
4143
+ background: map-get($params, background);
4171
4144
  }
4172
4145
 
4146
+ @mixin mc-badge-theme($theme) {
4147
+ $foreground: map-get($theme, foreground);
4148
+ $badge: map-get(map-get($theme, components), badge);
4173
4149
 
4150
+ .mc-badge {
4151
+ color: map-get($foreground, text);
4152
+ border-color: map-get($foreground, border);
4153
+ }
4174
4154
 
4155
+ .mc-badge_solid {
4156
+ &.mc-badge_primary {
4157
+ @include mc-badge-color(map-get($badge, primary_solid));
4158
+ }
4175
4159
 
4176
- @mixin mc-autocomplete-theme($theme) {
4177
- $foreground: map-get($theme, foreground);
4160
+ &.mc-badge_second {
4161
+ @include mc-badge-color(map-get($badge, second_solid));
4162
+ }
4178
4163
 
4179
- .mc-autocomplete-panel {
4180
- @include popup-params($theme);
4164
+ &.mc-badge_transparent {
4165
+ @include mc-badge-color(map-get($badge, transparent_solid));
4166
+ }
4181
4167
 
4182
- color: mc-color($foreground, text);
4168
+ &.mc-badge_success {
4169
+ @include mc-badge-color(map-get($badge, success_solid));
4170
+ }
4183
4171
 
4184
- .mc-selected {
4185
- $popup: map-get(map-get($theme, components), popup);
4172
+ &.mc-badge_info {
4173
+ @include mc-badge-color(map-get($badge, info_solid));
4174
+ }
4186
4175
 
4187
- background-color: map-get($popup, background);
4176
+ &.mc-badge_warning {
4177
+ @include mc-badge-color(map-get($badge, warning_solid));
4188
4178
  }
4189
- }
4190
- }
4191
4179
 
4180
+ &.mc-badge_error {
4181
+ @include mc-badge-color(map-get($badge, error_solid));
4182
+ }
4192
4183
 
4184
+ &.mc-badge_light {
4185
+ @include mc-badge-color(map-get($badge, light_solid));
4186
+ }
4187
+ }
4193
4188
 
4189
+ .mc-badge_pastel {
4190
+ &.mc-badge_primary {
4191
+ @include mc-badge-color(map-get($badge, primary_pastel));
4192
+ }
4194
4193
 
4194
+ &.mc-badge_success {
4195
+ @include mc-badge-color(map-get($badge, success_pastel));
4196
+ }
4195
4197
 
4198
+ &.mc-badge_info {
4199
+ @include mc-badge-color(map-get($badge, info_pastel));
4200
+ }
4196
4201
 
4197
- @mixin mc-button-color($params) {
4202
+ &.mc-badge_warning {
4203
+ @include mc-badge-color(map-get($badge, warning_pastel));
4204
+ }
4205
+
4206
+ &.mc-badge_error {
4207
+ @include mc-badge-color(map-get($badge, error_pastel));
4208
+ }
4209
+ }
4210
+ }
4211
+
4212
+ @mixin mc-badge-typography($config) {
4213
+ .mc-badge_default {
4214
+ @include mc-typography-level-to-styles($config, $badge-font-default-default);
4215
+
4216
+ &.mc-badge_caps {
4217
+ @include mc-typography-level-to-styles($config, $badge-font-default-caps);
4218
+ }
4219
+
4220
+ &.mc-badge_mono {
4221
+ @include mc-typography-level-to-styles($config, $badge-font-default-mono);
4222
+ }
4223
+ }
4224
+
4225
+ .mc-badge_mini {
4226
+ @include mc-typography-level-to-styles($config, $badge-font-mini-default);
4227
+
4228
+ &.mc-badge_caps {
4229
+ @include mc-typography-level-to-styles($config, $badge-font-mini-caps);
4230
+ }
4231
+
4232
+ &.mc-badge_mono {
4233
+ @include mc-typography-level-to-styles($config, $badge-font-mini-mono);
4234
+ }
4235
+ }
4236
+ }
4237
+
4238
+
4239
+
4240
+
4241
+
4242
+ @mixin mc-forms-theme($theme) {
4243
+ $foreground: map-get($theme, foreground);
4244
+
4245
+ $forms: map-get(map-get($theme, components), forms);
4246
+
4247
+ .mc-form__label {
4248
+ color: map-get($forms, label);
4249
+ }
4250
+
4251
+ .mc-form__legend {
4252
+ color: map-get($forms, legend);
4253
+ }
4254
+ }
4255
+
4256
+ @mixin mc-forms-typography($config) {
4257
+ .mc-form__label {
4258
+ @include mc-typography-level-to-styles($config, $forms-font-default-label);
4259
+ }
4260
+
4261
+ .mc-form__legend {
4262
+ @include mc-typography-level-to-styles($config, $forms-font-default-legend);
4263
+ }
4264
+ }
4265
+
4266
+
4267
+
4268
+
4269
+
4270
+ @mixin mc-option-theme($theme) {
4271
+ $foreground: map-get($theme, foreground);
4272
+ $background: map-get($theme, background);
4273
+
4274
+ $primary: map-get($theme, primary);
4275
+
4276
+ .mc-option {
4277
+ color: map-get($foreground, text);
4278
+
4279
+ &:hover:not(.mc-disabled) {
4280
+ .mc-option-overlay {
4281
+ background: map-get($background, overlay-hover);
4282
+ }
4283
+ }
4284
+
4285
+ &.mc-active {
4286
+ border-color: map-get(map-get($theme, states), focused-color);
4287
+ }
4288
+
4289
+ &.mc-selected {
4290
+ background: map-get(map-get($theme, states), selected-color);
4291
+ }
4292
+
4293
+ &.mc-disabled {
4294
+ background: transparent;
4295
+
4296
+ color: map-get($foreground, text-disabled);
4297
+ }
4298
+ }
4299
+ }
4300
+
4301
+ @mixin mc-option-typography($config) {
4302
+ .mc-option {
4303
+ @include mc-typography-level-to-styles($config, $option-font-default);
4304
+ }
4305
+ }
4306
+
4307
+
4308
+
4309
+
4310
+
4311
+ @mixin mc-optgroup-theme($theme) {
4312
+ $foreground: map-get($theme, foreground);
4313
+
4314
+ .mc-optgroup-label {
4315
+ color: map-get($foreground, text);
4316
+ }
4317
+
4318
+ .mc-disabled .mc-optgroup-label {
4319
+ color: map-get($foreground, text-disabled);
4320
+ }
4321
+ }
4322
+
4323
+ @mixin mc-optgroup-typography($config) {
4324
+ .mc-optgroup-label {
4325
+ @include mc-typography-level-to-styles($config, $optgroup-font-default);
4326
+ }
4327
+ }
4328
+
4329
+ @mixin popup-params($theme) {
4330
+ $popup: map-get(map-get($theme, components), popup);
4331
+
4332
+ box-shadow: map-get($popup, shadow);
4333
+ border-color: map-get($popup, border);
4334
+
4335
+ background-color: map-get($popup, background);
4336
+ }
4337
+
4338
+
4339
+
4340
+
4341
+ @mixin mc-autocomplete-theme($theme) {
4342
+ $foreground: map-get($theme, foreground);
4343
+
4344
+ .mc-autocomplete-panel {
4345
+ @include popup-params($theme);
4346
+
4347
+ color: mc-color($foreground, text);
4348
+
4349
+ .mc-selected {
4350
+ $popup: map-get(map-get($theme, components), popup);
4351
+
4352
+ background-color: map-get($popup, background);
4353
+ }
4354
+ }
4355
+ }
4356
+
4357
+
4358
+
4359
+
4360
+
4361
+
4362
+ @mixin mc-button-color($params) {
4198
4363
  color: map-get($params, color);
4199
4364
  border-color: map-get($params, border);
4200
4365
  background: map-get($params, background);
@@ -4339,65 +4504,6 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
4339
4504
  }
4340
4505
 
4341
4506
 
4342
- @mixin card-type($card) {
4343
- box-shadow:
4344
- inset -1px 0 0 0 map-get($card, shadow),
4345
- inset 0 1px 0 0 map-get($card, shadow),
4346
- inset 0 -1px 0 0 map-get($card, shadow);
4347
-
4348
- background-color: map-get($card, background);
4349
-
4350
- border-left-color: map-get($card, vertical-line);
4351
- }
4352
-
4353
- @mixin mc-card-theme($theme) {
4354
- $foreground: map-get($theme, foreground);
4355
- $background: map-get($theme, background);
4356
-
4357
- $card: map-get(map-get($theme, components), card);
4358
- $popup: map-get(map-get($theme, components), popup);
4359
-
4360
- $is-dark: map-get($theme, is-dark);
4361
-
4362
- .mc-card {
4363
- color: map-get($foreground, text);
4364
-
4365
- &.mc-card_error {
4366
- @include card-type(map-get($card, error));
4367
- }
4368
-
4369
- &.mc-card_warning {
4370
- @include card-type(map-get($card, warning));
4371
- }
4372
-
4373
- &.mc-card_success {
4374
- @include card-type(map-get($card, success));
4375
- }
4376
-
4377
- &.mc-card_info {
4378
- @include card-type(map-get($card, info));
4379
- }
4380
-
4381
- &.mc-card_white {
4382
- background-color: map-get($popup, background);
4383
- }
4384
-
4385
- &.mc-selected {
4386
- background-color: map-get(map-get($theme, states), selected-color);
4387
- }
4388
-
4389
- &:not(.mc-card_readonly):hover {
4390
- .mc-card__overlay {
4391
- background: map-get($background, overlay-hover);
4392
- }
4393
- }
4394
-
4395
- &.cdk-keyboard-focused {
4396
- box-shadow: 0 0 0 2px map-get(map-get($theme, states), focused-color);
4397
- }
4398
- }
4399
- }
4400
-
4401
4507
 
4402
4508
 
4403
4509
 
@@ -4603,27 +4709,54 @@ $mc-datepicker-today-fade-amount: 0.2;
4603
4709
  }
4604
4710
  }
4605
4711
 
4606
- @mixin mc-divider-theme($theme) {
4607
- $divider: map-get(map-get($theme, components), divider);
4608
4712
 
4609
- .mc-divider_horizontal {
4610
- border-top-color: map-get($divider, color);
4713
+
4714
+
4715
+
4716
+ @mixin mc-dl-theme($theme) {
4717
+ $dl: map-get(map-get($theme, components), dl);
4718
+
4719
+ .mc-dt {
4720
+ color: map-get($dl, dt);
4611
4721
  }
4612
4722
 
4613
- .mc-divider_vertical {
4614
- border-right-color: map-get($divider, color);
4723
+ .mc-dd {
4724
+ color: map-get($dl, dd);
4615
4725
  }
4616
4726
  }
4617
4727
 
4728
+ @mixin mc-dl-typography($config) {
4729
+ .mc-dl {
4730
+ & .mc-dt {
4731
+ @include mc-typography-level-to-styles($config, $description-list-font-horizontal-dt);
4732
+ }
4618
4733
 
4734
+ & .mc-dd {
4735
+ @include mc-typography-level-to-styles($config, $description-list-font-horizontal-dd);
4736
+ }
4737
+ }
4619
4738
 
4739
+ .mc-dl.mc-dl_vertical {
4740
+ & .mc-dt {
4741
+ @include mc-typography-level-to-styles($config, $description-list-font-vertical-dt);
4742
+ }
4620
4743
 
4744
+ & .mc-dd {
4745
+ @include mc-typography-level-to-styles($config, $description-list-font-vertical-dd);
4746
+ }
4747
+ }
4748
+ }
4621
4749
 
4622
4750
 
4623
4751
 
4624
4752
 
4625
- @mixin mc-dropdown-theme($theme) {
4626
- $foreground: map-get($theme, foreground);
4753
+
4754
+
4755
+
4756
+
4757
+
4758
+ @mixin mc-dropdown-theme($theme) {
4759
+ $foreground: map-get($theme, foreground);
4627
4760
  $background: map-get($theme, background);
4628
4761
  $second: map-get($theme, second);
4629
4762
 
@@ -4829,158 +4962,6 @@ $mc-datepicker-today-fade-amount: 0.2;
4829
4962
 
4830
4963
 
4831
4964
 
4832
- @mixin mc-icon-theme($theme) {
4833
- $foreground: map-get($theme, foreground);
4834
- $second: map-get($theme, second);
4835
-
4836
- $icon: map-get(map-get($theme, components), icon);
4837
-
4838
- $primary: map-get($icon, primary);
4839
- $secondary: map-get($icon, secondary);
4840
- $error: map-get($icon, error);
4841
- $success: map-get($icon, success);
4842
- $warning: map-get($icon, warning);
4843
- $info: map-get($icon, info);
4844
-
4845
- // Дефолтные серые иконки default-icon: лупа в поле, иконки дропдаунов v, все иконки вне полей.
4846
- .mc-icon {
4847
- color: mc-color($foreground, icon);
4848
-
4849
- &.mc-primary {
4850
- color: map-get($primary, default);
4851
- }
4852
-
4853
- &.mc-second {
4854
- color: map-get($secondary, default);
4855
- }
4856
-
4857
- &.mc-error {
4858
- color: map-get($error, default);
4859
- }
4860
-
4861
-
4862
- &.mc-info {
4863
- color: map-get($info, default);
4864
- }
4865
-
4866
- &.mc-warning {
4867
- color: map-get($warning, default);
4868
- }
4869
-
4870
- &.mc-success {
4871
- color: map-get($success, default);
4872
- }
4873
-
4874
- &[disabled],
4875
- &.mc-disabled {
4876
- cursor: default;
4877
- }
4878
- }
4879
-
4880
- // Облегченные серые иконки less-contrast-icon нужны тогда, когда действие, которое они делают не дефолтное и
4881
- // не самое важное. Не используются вне инпутов или селектов.
4882
- .mc-icon.mc-icon_light {
4883
- &.mc-primary {
4884
- &:active,
4885
- &.mc-active {
4886
- color: map-get($primary, state-active);
4887
- }
4888
-
4889
- &:not([disabled], .mc-disabled):hover {
4890
- color: map-get($primary, state-hover);
4891
- }
4892
-
4893
- &[disabled],
4894
- &.mc-disabled {
4895
- color: map-get($primary, state-disabled);
4896
- }
4897
- }
4898
-
4899
- &.mc-second {
4900
- &:active,
4901
- &.mc-active {
4902
- color: map-get($secondary, state-active);
4903
- }
4904
-
4905
- &:not([disabled], .mc-disabled):hover {
4906
- color: map-get($secondary, state-hover);
4907
- }
4908
-
4909
- &[disabled],
4910
- &.mc-disabled {
4911
- color: map-get($secondary, state-disabled);
4912
- }
4913
- }
4914
-
4915
- &.mc-error {
4916
- &:active,
4917
- &.mc-active {
4918
- color: map-get($error, state-active);
4919
- }
4920
-
4921
- &:not([disabled], .mc-disabled):hover {
4922
- color: map-get($error, state-hover);
4923
- }
4924
-
4925
- &[disabled],
4926
- &.mc-disabled {
4927
- color: map-get($error, state-disabled);
4928
- }
4929
- }
4930
-
4931
- &.mc-info {
4932
- &:active,
4933
- &.mc-active {
4934
- color: map-get($info, state-active);
4935
- }
4936
-
4937
- &:not([disabled], .mc-disabled):hover {
4938
- color: map-get($info, state-hover);
4939
- }
4940
-
4941
- &[disabled],
4942
- &.mc-disabled {
4943
- color: map-get($info, state-disabled);
4944
- }
4945
- }
4946
-
4947
- &.mc-warning {
4948
- &:active,
4949
- &.mc-active {
4950
- color: map-get($warning, state-active);
4951
- }
4952
-
4953
- &:not([disabled], .mc-disabled):hover {
4954
- color: map-get($warning, state-hover);
4955
- }
4956
-
4957
- &[disabled],
4958
- &.mc-disabled {
4959
- color: map-get($warning, state-disabled);
4960
- }
4961
- }
4962
-
4963
- &.mc-success {
4964
- &:active,
4965
- &.mc-active {
4966
- color: map-get($success, state-active);
4967
- }
4968
-
4969
- &:not([disabled], .mc-disabled):hover {
4970
- color: map-get($success, state-hover);
4971
- }
4972
-
4973
- &[disabled],
4974
- &.mc-disabled {
4975
- color: map-get($success, state-disabled);
4976
- }
4977
- }
4978
- }
4979
- }
4980
-
4981
-
4982
-
4983
-
4984
4965
 
4985
4966
  @mixin mc-input-theme($theme) {
4986
4967
  $foreground: map-get($theme, foreground);
@@ -5277,95 +5258,6 @@ $mc-datepicker-today-fade-amount: 0.2;
5277
5258
 
5278
5259
 
5279
5260
 
5280
- @mixin mc-modal-theme($theme) {
5281
- $foreground: map-get($theme, foreground);
5282
- $background: map-get($theme, background);
5283
-
5284
- $modal: map-get(map-get($theme, components), modal);
5285
- $popup: map-get(map-get($theme, components), popup);
5286
-
5287
- .mc-modal {
5288
- .mc-modal-content {
5289
- // У модалки должен быть фон background. Чтобы поповеры и дропдауны было видно поверх модалки
5290
- background-color: map-get($background, background);
5291
-
5292
- box-shadow: map-get($modal, shadow);
5293
- }
5294
-
5295
- .mc-modal-title {
5296
- color: map-get($foreground, text);
5297
- }
5298
-
5299
- .mc-modal-header {
5300
- border-bottom-width: var(--mc-modal-size-border-width, $modal-size-border-width);
5301
- border-bottom-style: solid;
5302
- border-bottom-color: map-get($modal, header-border);
5303
- }
5304
-
5305
- .mc-modal-header.mc-modal-body_top-overflow {
5306
- box-shadow: map-get($modal, body-top-shadow);
5307
- }
5308
-
5309
- .mc-modal-footer.mc-modal-body_bottom-overflow {
5310
- box-shadow: map-get($modal, body-bottom-shadow);
5311
- }
5312
-
5313
- .mc-modal-footer {
5314
- border-top-width: var(--mc-modal-size-border-width, $modal-size-border-width);
5315
- border-top-style: solid;
5316
- border-top-color: map-get($modal, footer-border);
5317
-
5318
- background-color: map-get($popup, footer-background);
5319
- }
5320
-
5321
- .mc-modal-close {
5322
- border: var(--mc-modal-size-border-width, $modal-size-border-width) solid transparent;
5323
-
5324
- &:hover {
5325
- .mc-button-overlay {
5326
- background: map-get($background, overlay-hover);
5327
- }
5328
-
5329
- .mc-icon {
5330
- color: inherit;
5331
- }
5332
- }
5333
- }
5334
- }
5335
-
5336
- .mc-modal-mask {
5337
- background-color: map-get($modal, background-mask);
5338
- }
5339
-
5340
- .mc-confirm {
5341
- .mc-confirm-btns {
5342
- border-top-width: var(--mc-modal-size-border-width, $modal-size-border-width);
5343
- border-top-style: solid;
5344
- border-top-color: map-get($modal, footer-border);
5345
-
5346
- background-color: map-get($popup, footer-background);
5347
- }
5348
- }
5349
- }
5350
-
5351
- @mixin mc-modal-typography($config) {
5352
- .mc-modal-title {
5353
- @include mc-typography-level-to-styles($config, $modal-header-font-default);
5354
- }
5355
-
5356
- .mc-modal-body {
5357
- @include mc-typography-level-to-styles($config, $modal-body-font-default);
5358
- }
5359
- }
5360
-
5361
-
5362
-
5363
-
5364
-
5365
-
5366
-
5367
-
5368
-
5369
5261
  @function mc-markdown-typography-config() {
5370
5262
  $font-family: $font-family-base;
5371
5263
  $md-typography: map-get($md-typography, md-typography);
@@ -5489,129 +5381,87 @@ $mc-datepicker-today-fade-amount: 0.2;
5489
5381
 
5490
5382
 
5491
5383
 
5492
- @mixin mc-markdown-theme($theme) {
5384
+
5385
+
5386
+ @mixin mc-modal-theme($theme) {
5493
5387
  $foreground: map-get($theme, foreground);
5494
5388
  $background: map-get($theme, background);
5495
5389
 
5496
- $markdown: map-get(map-get($theme, components), markdown);
5390
+ $modal: map-get(map-get($theme, components), modal);
5391
+ $popup: map-get(map-get($theme, components), popup);
5497
5392
 
5498
- .mc-markdown {
5499
- color: map-get($foreground, text);
5500
- background: map-get($background, background);;
5501
-
5502
- .mc-markdown__h1 {
5503
- color: map-get($markdown, h1-color);
5504
- }
5505
-
5506
- .mc-markdown__h2 {
5507
- color: map-get($markdown, h2-color);
5508
- }
5509
-
5510
- .mc-markdown__h3 {
5511
- color: map-get($markdown, h3-color);
5512
- }
5513
-
5514
- .mc-markdown__h4 {
5515
- color: map-get($markdown, h4-color);
5516
- }
5517
-
5518
- .mc-markdown__h5 {
5519
- color: map-get($markdown, h5-color);
5520
- }
5393
+ .mc-modal {
5394
+ .mc-modal-content {
5395
+ // У модалки должен быть фон background. Чтобы поповеры и дропдауны было видно поверх модалки
5396
+ background-color: map-get($background, background);
5521
5397
 
5522
- .mc-markdown__h6 {
5523
- color: map-get($markdown, h6-color);
5398
+ box-shadow: map-get($modal, shadow);
5524
5399
  }
5525
5400
 
5526
- .mc-markdown__p {
5527
- color: map-get($markdown, p-color);
5401
+ .mc-modal-title {
5402
+ color: map-get($foreground, text);
5528
5403
  }
5529
5404
 
5530
- .mc-markdown__ul,
5531
- .mc-markdown__ol {
5532
- color: map-get($markdown, list-color);
5405
+ .mc-modal-header {
5406
+ border-bottom-width: var(--mc-modal-size-border-width, $modal-size-border-width);
5407
+ border-bottom-style: solid;
5408
+ border-bottom-color: map-get($modal, header-border);
5533
5409
  }
5534
5410
 
5535
- .mc-markdown__blockquote {
5536
- color: map-get($markdown, blockquote-text);
5537
- background: map-get($markdown, blockquote-background);
5538
- border-color: map-get($markdown, blockquote-border);
5539
- border-left-color: map-get($markdown, blockquote-line);
5411
+ .mc-modal-header.mc-modal-body_top-overflow {
5412
+ box-shadow: map-get($modal, body-top-shadow);
5540
5413
  }
5541
5414
 
5542
- .mc-markdown__pre,
5543
- .mc-markdown__p > .mc-markdown__code {
5544
- color: map-get($markdown, code-text);
5545
- background-color: map-get($markdown, code-background);
5546
- border-color: map-get($markdown, code-border);
5415
+ .mc-modal-footer.mc-modal-body_bottom-overflow {
5416
+ box-shadow: map-get($modal, body-bottom-shadow);
5547
5417
  }
5548
5418
 
5549
- .mc-markdown__a {
5550
- @include md-link-theme($theme);
5551
- }
5419
+ .mc-modal-footer {
5420
+ border-top-width: var(--mc-modal-size-border-width, $modal-size-border-width);
5421
+ border-top-style: solid;
5422
+ border-top-color: map-get($modal, footer-border);
5552
5423
 
5553
- .mc-markdown__img + em {
5554
- color: map-get($markdown, image-caption-text);
5424
+ background-color: map-get($popup, footer-background);
5555
5425
  }
5556
5426
 
5557
- .mc-markdown__hr {
5558
- border-bottom-color: map-get($markdown, hr-color);
5559
- }
5427
+ .mc-modal-close {
5428
+ border: var(--mc-modal-size-border-width, $modal-size-border-width) solid transparent;
5560
5429
 
5561
- .mc-markdown__table > .mc-markdown__thead {
5562
- color: map-get($markdown, table-header);
5563
- border-bottom-color: map-get($markdown, table-border);
5564
- }
5430
+ &:hover {
5431
+ .mc-button-overlay {
5432
+ background: map-get($background, overlay-hover);
5433
+ }
5565
5434
 
5566
- .mc-markdown__table > .mc-markdown__tbody {
5567
- color: map-get($markdown, table-body);
5435
+ .mc-icon {
5436
+ color: inherit;
5437
+ }
5438
+ }
5568
5439
  }
5569
5440
  }
5570
- }
5571
-
5572
-
5573
- // based on mc-link
5574
-
5575
- @mixin md-link($foreground, $markdown) {
5576
- display: inline-block;
5577
-
5578
- color: map-get($markdown, link-text);
5579
- text-decoration: none;
5580
- cursor: pointer;
5581
-
5582
- border-bottom-style: solid;
5583
- border-bottom-width: 1px;
5584
- border-bottom-color: map-get($markdown, link-border-bottom);
5585
-
5586
- transition: color ease-out 300ms;
5587
5441
 
5588
- &:focus {
5589
- outline: none;
5442
+ .mc-modal-mask {
5443
+ background-color: map-get($modal, background-mask);
5590
5444
  }
5591
5445
 
5592
- /* stylelint-disable no-descending-specificity */
5593
- &:hover {
5594
- color: map-get($markdown, link-state-hover-text);
5595
- transition: color 0ms;
5596
- border-bottom-color: map-get($markdown, link-state-hover-border-bottom);
5597
- }
5446
+ .mc-confirm {
5447
+ .mc-confirm-btns {
5448
+ border-top-width: var(--mc-modal-size-border-width, $modal-size-border-width);
5449
+ border-top-style: solid;
5450
+ border-top-color: map-get($modal, footer-border);
5598
5451
 
5599
- &:active {
5600
- color: map-get($markdown, link-state-active-text);
5452
+ background-color: map-get($popup, footer-background);
5453
+ }
5601
5454
  }
5602
5455
  }
5603
5456
 
5604
-
5605
- @mixin md-link-theme($theme) {
5606
- $foreground: map-get($theme, foreground);
5607
- $markdown: map-get(map-get($theme, components), markdown);
5608
-
5609
- &:visited {
5610
- color: map-get($markdown, link-state-visited-text);
5611
- border-bottom-color: map-get($markdown, link-state-visited-border-bottom);
5457
+ @mixin mc-modal-typography($config) {
5458
+ .mc-modal-title {
5459
+ @include mc-typography-level-to-styles($config, $modal-header-font-default);
5612
5460
  }
5613
5461
 
5614
- @include md-link($foreground, $markdown);
5462
+ .mc-modal-body {
5463
+ @include mc-typography-level-to-styles($config, $modal-body-font-default);
5464
+ }
5615
5465
  }
5616
5466
 
5617
5467
 
@@ -5845,56 +5695,6 @@ button {
5845
5695
 
5846
5696
 
5847
5697
 
5848
- @mixin mc-progress-bar-theme($theme) {
5849
- $primary: map-get($theme, primary);
5850
- $second: map-get($theme, second);
5851
- $error: map-get($theme, error);
5852
-
5853
- $progress-bar: map-get(map-get($theme, components), progress-bar);
5854
-
5855
- .mc-progress-bar {
5856
- background-color: map-get($progress-bar, background);
5857
-
5858
- &.mc-primary .mc-progress-bar__line {
5859
- background-color: mc-color($primary);
5860
- }
5861
-
5862
- &.mc-second .mc-progress-bar__line {
5863
- background-color: mc-color($second);
5864
- }
5865
-
5866
- &.mc-error .mc-progress-bar__line {
5867
- background-color: mc-color($error);
5868
- }
5869
- }
5870
- }
5871
-
5872
-
5873
-
5874
-
5875
- @mixin mc-progress-spinner-theme($theme) {
5876
- $primary: map-get($theme, primary);
5877
- $second: map-get($theme, second);
5878
- $error: map-get($theme, error);
5879
-
5880
- .mc-progress-spinner {
5881
- &.mc-primary .mc-progress-spinner__circle {
5882
- stroke: mc-color($primary);
5883
- }
5884
-
5885
- &.mc-second .mc-progress-spinner__circle {
5886
- stroke: mc-color($second);
5887
- }
5888
-
5889
- &.mc-error .mc-progress-spinner__circle {
5890
- stroke: mc-color($error);
5891
- }
5892
- }
5893
- }
5894
-
5895
-
5896
-
5897
-
5898
5698
 
5899
5699
  @mixin mc-radio-theme($theme) {
5900
5700
  $foreground: map-get($theme, foreground);
@@ -6103,33 +5903,6 @@ button {
6103
5903
  }
6104
5904
  }
6105
5905
 
6106
- @mixin mc-splitter-theme($theme) {
6107
- $background: map-get($theme, background);
6108
-
6109
- .mc-gutter {
6110
- cursor: col-resize;
6111
-
6112
- &:hover,
6113
- &.mc-gutter_dragged {
6114
- background-color: map-get($background, background-disabled);
6115
- }
6116
-
6117
- &.mc-gutter_vertical {
6118
- cursor: row-resize;
6119
- }
6120
-
6121
- &[disabled] {
6122
- background-color: mc-color($background, overlay-disabled);
6123
-
6124
- cursor: default;
6125
- }
6126
- }
6127
-
6128
- .mc-gutter-ghost {
6129
- background: mc-color($background, overlay-disabled);
6130
- }
6131
- }
6132
-
6133
5906
 
6134
5907
 
6135
5908
 
@@ -6366,44 +6139,133 @@ button {
6366
6139
 
6367
6140
 
6368
6141
 
6142
+ @mixin mc-timezone-option-theme($theme) {
6143
+ $timezone: map-get(map-get($theme, components), timezone);
6369
6144
 
6145
+ .mc-timezone-option__offset,
6146
+ .mc-timezone-option__city {
6147
+ color: map-get($timezone, text);
6148
+ }
6370
6149
 
6371
- @mixin mc-tag-color($params) {
6372
- background: map-get($params, background);
6373
- border-color: map-get($params, border);
6374
-
6375
- & .mc-tag__text {
6376
- color: map-get($params, text);
6150
+ .mc-timezone-option__cities {
6151
+ color: map-get($timezone, caption);
6377
6152
  }
6153
+ }
6378
6154
 
6379
- &.mc-active,
6380
- &.mc-focused {
6381
- border-color: map-get($params, focused);
6382
- box-shadow: 0 0 0 1px map-get($params, focused);
6155
+ @mixin mc-timezone-option-typography($config) {
6156
+ .mc-timezone-option__offset {
6157
+ @include mc-typography-level-to-styles($config, $timezone-option-font-offset-text);
6383
6158
  }
6384
6159
 
6385
- &:not(.mc-disabled) .mc-icon {
6386
- color: map-get($params, icon);
6160
+ .mc-timezone-option__city {
6161
+ @include mc-typography-level-to-styles($config, $timezone-option-font-text);
6162
+ }
6387
6163
 
6388
- &.mc-tag-remove:hover {
6389
- color: map-get($params, icon_hovered);
6390
- }
6164
+ .mc-timezone-option__cities {
6165
+ @include mc-typography-level-to-styles($config, $timezone-option-font-caption);
6391
6166
  }
6167
+ }
6392
6168
 
6393
- &.mc-disabled {
6394
- border-color: map-get($params, border_disabled);
6395
- background: map-get($params, background_disabled);
6396
6169
 
6397
- & .mc-icon,
6398
- & .mc-tag__text {
6399
- color: map-get($params, disabled);
6400
- }
6401
6170
 
6402
- & .mc-tag-overlay {
6403
- background: transparent;
6404
- }
6405
- }
6406
- }
6171
+
6172
+
6173
+ @mixin mc-toast-theme($theme) {
6174
+ $foreground: map-get($theme, foreground);
6175
+
6176
+ $toast: map-get(map-get($theme, components), toast);
6177
+
6178
+ .mc-toast {
6179
+ &.mc-toast_info .mc-toast__icon {
6180
+ color: map-get($toast, icon_info);
6181
+ }
6182
+
6183
+ &.mc-toast_success .mc-toast__icon {
6184
+ color: map-get($toast, icon_success);
6185
+ }
6186
+
6187
+ &.mc-toast_warning .mc-toast__icon {
6188
+ color: map-get($toast, icon_warning);
6189
+ }
6190
+
6191
+ &.mc-toast_error .mc-toast__icon {
6192
+ color: map-get($toast, icon_error);
6193
+ }
6194
+ }
6195
+
6196
+ .mc-toast__wrapper {
6197
+ border-color: map-get($toast, border);
6198
+
6199
+ background: map-get($toast, background);
6200
+
6201
+ box-shadow: map-get($toast, shadow);
6202
+ }
6203
+
6204
+ .mc-toast__title {
6205
+ color: map-get($toast, text);
6206
+ }
6207
+
6208
+ .mc-toast__caption {
6209
+ color: map-get($toast, text-caption);
6210
+ }
6211
+ }
6212
+
6213
+ @mixin mc-toast-typography($config) {
6214
+ .mc-toast {
6215
+ @include mc-typography-level-to-styles($config, body);
6216
+ }
6217
+
6218
+ .mc-toast__title {
6219
+ @include mc-typography-level-to-styles($config, $toast-font-title);
6220
+ }
6221
+
6222
+ .mc-toast__caption {
6223
+ @include mc-typography-level-to-styles($config, $toast-font-caption);
6224
+ }
6225
+ }
6226
+
6227
+
6228
+
6229
+
6230
+
6231
+
6232
+
6233
+ @mixin mc-tag-color($params) {
6234
+ background: map-get($params, background);
6235
+ border-color: map-get($params, border);
6236
+
6237
+ & .mc-tag__text {
6238
+ color: map-get($params, text);
6239
+ }
6240
+
6241
+ &.mc-active,
6242
+ &.mc-focused {
6243
+ border-color: map-get($params, focused);
6244
+ box-shadow: 0 0 0 1px map-get($params, focused);
6245
+ }
6246
+
6247
+ &:not(.mc-disabled) .mc-icon {
6248
+ color: map-get($params, icon);
6249
+
6250
+ &.mc-tag-remove:hover {
6251
+ color: map-get($params, icon_hovered);
6252
+ }
6253
+ }
6254
+
6255
+ &.mc-disabled {
6256
+ border-color: map-get($params, border_disabled);
6257
+ background: map-get($params, background_disabled);
6258
+
6259
+ & .mc-icon,
6260
+ & .mc-tag__text {
6261
+ color: map-get($params, disabled);
6262
+ }
6263
+
6264
+ & .mc-tag-overlay {
6265
+ background: transparent;
6266
+ }
6267
+ }
6268
+ }
6407
6269
 
6408
6270
  @mixin mc-tag-theme($theme) {
6409
6271
  $foreground: map-get($theme, foreground);
@@ -6524,95 +6386,6 @@ button {
6524
6386
 
6525
6387
 
6526
6388
 
6527
- @mixin mc-timezone-option-theme($theme) {
6528
- $timezone: map-get(map-get($theme, components), timezone);
6529
-
6530
- .mc-timezone-option__offset,
6531
- .mc-timezone-option__city {
6532
- color: map-get($timezone, text);
6533
- }
6534
-
6535
- .mc-timezone-option__cities {
6536
- color: map-get($timezone, caption);
6537
- }
6538
- }
6539
-
6540
- @mixin mc-timezone-option-typography($config) {
6541
- .mc-timezone-option__offset {
6542
- @include mc-typography-level-to-styles($config, $timezone-option-font-offset-text);
6543
- }
6544
-
6545
- .mc-timezone-option__city {
6546
- @include mc-typography-level-to-styles($config, $timezone-option-font-text);
6547
- }
6548
-
6549
- .mc-timezone-option__cities {
6550
- @include mc-typography-level-to-styles($config, $timezone-option-font-caption);
6551
- }
6552
- }
6553
-
6554
-
6555
-
6556
-
6557
-
6558
- @mixin mc-toast-theme($theme) {
6559
- $foreground: map-get($theme, foreground);
6560
-
6561
- $toast: map-get(map-get($theme, components), toast);
6562
-
6563
- .mc-toast {
6564
- &.mc-toast_info .mc-toast__icon {
6565
- color: map-get($toast, icon_info);
6566
- }
6567
-
6568
- &.mc-toast_success .mc-toast__icon {
6569
- color: map-get($toast, icon_success);
6570
- }
6571
-
6572
- &.mc-toast_warning .mc-toast__icon {
6573
- color: map-get($toast, icon_warning);
6574
- }
6575
-
6576
- &.mc-toast_error .mc-toast__icon {
6577
- color: map-get($toast, icon_error);
6578
- }
6579
- }
6580
-
6581
- .mc-toast__wrapper {
6582
- border-color: map-get($toast, border);
6583
-
6584
- background: map-get($toast, background);
6585
-
6586
- box-shadow: map-get($toast, shadow);
6587
- }
6588
-
6589
- .mc-toast__title {
6590
- color: map-get($toast, text);
6591
- }
6592
-
6593
- .mc-toast__caption {
6594
- color: map-get($toast, text-caption);
6595
- }
6596
- }
6597
-
6598
- @mixin mc-toast-typography($config) {
6599
- .mc-toast {
6600
- @include mc-typography-level-to-styles($config, body);
6601
- }
6602
-
6603
- .mc-toast__title {
6604
- @include mc-typography-level-to-styles($config, $toast-font-title);
6605
- }
6606
-
6607
- .mc-toast__caption {
6608
- @include mc-typography-level-to-styles($config, $toast-font-caption);
6609
- }
6610
- }
6611
-
6612
-
6613
-
6614
-
6615
-
6616
6389
 
6617
6390
 
6618
6391
  @mixin mc-toggle-theme($theme) {
@@ -7087,90 +6860,545 @@ button {
7087
6860
 
7088
6861
 
7089
6862
 
7090
- @mixin mc-forms-theme($theme) {
7091
- $foreground: map-get($theme, foreground);
7092
-
7093
- $forms: map-get(map-get($theme, components), forms);
6863
+ @mixin mosaic-typography($config: null) {
6864
+ @if $config == null {
6865
+ $config: mc-typography-config();
6866
+ }
6867
+
6868
+ @include mc-base-typography($config);
6869
+
6870
+ $md-config: mc-markdown-typography-config();
6871
+ @include mc-markdown-base-typography($md-config);
6872
+
6873
+ @include mc-alert-typography($config);
6874
+ @include mc-badge-typography($config);
6875
+ @include mc-button-typography($config);
6876
+ @include mc-checkbox-typography($config);
6877
+ @include mc-datepicker-typography($config);
6878
+ @include mc-dropdown-typography($config);
6879
+ @include mc-dl-typography($config);
6880
+ @include mc-form-field-typography($config);
6881
+ @include mc-forms-typography($config);
6882
+ @include mc-input-typography($config);
6883
+ @include mc-link-typography($config);
6884
+ @include mc-list-typography($config);
6885
+ @include mc-loader-overlay-typography($config);
6886
+ @include mc-markdown-typography($md-config);
6887
+ @include mc-modal-typography($config);
6888
+ @include mc-navbar-typography($config);
6889
+ @include mc-option-typography($config);
6890
+ @include mc-optgroup-typography($config);
6891
+ @include mc-popover-typography($config);
6892
+ @include mc-radio-typography($config);
6893
+ @include mc-select-typography($config);
6894
+ @include mc-sidepanel-typography($config);
6895
+ @include mc-tabs-typography($config);
6896
+ @include mc-tag-typography($config);
6897
+ @include mc-textarea-typography($config);
6898
+ @include mc-timezone-option-typography($config);
6899
+ @include mc-toast-typography($config);
6900
+ @include mc-toggle-typography($config);
6901
+ @include mc-tooltip-typography($config);
6902
+ @include mc-tree-select-typography($config);
6903
+ @include mc-tree-typography($config);
6904
+ @include mc-table-typography($config);
6905
+ }
7094
6906
 
7095
- .mc-form__label {
7096
- color: map-get($forms, label);
7097
- }
7098
6907
 
7099
- .mc-form__legend {
7100
- color: map-get($forms, legend);
7101
- }
7102
- }
7103
6908
 
7104
- @mixin mc-forms-typography($config) {
7105
- .mc-form__label {
7106
- @include mc-typography-level-to-styles($config, $forms-font-default-label);
7107
- }
7108
6909
 
7109
- .mc-form__legend {
7110
- @include mc-typography-level-to-styles($config, $forms-font-default-legend);
7111
- }
7112
- }
7113
6910
 
6911
+ @mixin mc-pseudo-checkbox-color($states) {
6912
+ border-color: map-get($states, border);
7114
6913
 
6914
+ & .mc-checkbox-checkmark,
6915
+ & .mc-checkbox-mixedmark {
6916
+ color: map-get($states, color);
6917
+ }
7115
6918
 
6919
+ &.mc-checked,
6920
+ &.mc-indeterminate {
6921
+ border-color: map-get($states, checked, border);
7116
6922
 
6923
+ background: map-get($states, checked, background);
6924
+ }
6925
+ }
7117
6926
 
7118
- @mixin mc-option-theme($theme) {
6927
+ @mixin mc-pseudo-checkbox-theme($theme) {
7119
6928
  $foreground: map-get($theme, foreground);
7120
6929
  $background: map-get($theme, background);
7121
6930
 
7122
- $primary: map-get($theme, primary);
7123
-
7124
- .mc-option {
7125
- color: map-get($foreground, text);
6931
+ $checkbox: map-get(map-get($theme, components), checkbox);
7126
6932
 
7127
- &:hover:not(.mc-disabled) {
7128
- .mc-option-overlay {
7129
- background: map-get($background, overlay-hover);
7130
- }
6933
+ .mc-pseudo-checkbox {
6934
+ &.mc-primary {
6935
+ @include mc-pseudo-checkbox-color(map-get($checkbox, default));
7131
6936
  }
7132
6937
 
7133
- &.mc-active {
7134
- border-color: map-get(map-get($theme, states), focused-color);
6938
+ &.mc-error {
6939
+ @include mc-pseudo-checkbox-color(map-get($checkbox, error));
7135
6940
  }
7136
6941
 
7137
- &.mc-selected {
7138
- background: map-get(map-get($theme, states), selected-color);
7139
- }
6942
+ &.mc-disabled,
6943
+ &.mc-primary.mc-disabled,
6944
+ &.mc-error.mc-disabled {
6945
+ border-color: map-get($foreground, border);
7140
6946
 
7141
- &.mc-disabled {
7142
- background: transparent;
6947
+ background-color: map-get($background, background-disabled);
7143
6948
 
7144
- color: map-get($foreground, text-disabled);
6949
+ & .mc-checkbox-checkmark,
6950
+ & .mc-checkbox-mixedmark {
6951
+ color: map-get($foreground, text-disabled);
6952
+ }
7145
6953
  }
7146
6954
  }
7147
6955
  }
7148
6956
 
7149
- @mixin mc-option-typography($config) {
7150
- .mc-option {
7151
- @include mc-typography-level-to-styles($config, $option-font-default);
7152
- }
6957
+
6958
+
6959
+ @mixin card-type($card) {
6960
+ box-shadow:
6961
+ inset -1px 0 0 0 map-get($card, shadow),
6962
+ inset 0 1px 0 0 map-get($card, shadow),
6963
+ inset 0 -1px 0 0 map-get($card, shadow);
6964
+
6965
+ background-color: map-get($card, background);
6966
+
6967
+ border-left-color: map-get($card, vertical-line);
7153
6968
  }
7154
6969
 
6970
+ @mixin mc-card-theme($theme) {
6971
+ $foreground: map-get($theme, foreground);
6972
+ $background: map-get($theme, background);
7155
6973
 
6974
+ $card: map-get(map-get($theme, components), card);
6975
+ $popup: map-get(map-get($theme, components), popup);
7156
6976
 
6977
+ $is-dark: map-get($theme, is-dark);
7157
6978
 
6979
+ .mc-card {
6980
+ color: map-get($foreground, text);
7158
6981
 
7159
- @mixin mc-optgroup-theme($theme) {
6982
+ &.mc-card_error {
6983
+ @include card-type(map-get($card, error));
6984
+ }
6985
+
6986
+ &.mc-card_warning {
6987
+ @include card-type(map-get($card, warning));
6988
+ }
6989
+
6990
+ &.mc-card_success {
6991
+ @include card-type(map-get($card, success));
6992
+ }
6993
+
6994
+ &.mc-card_info {
6995
+ @include card-type(map-get($card, info));
6996
+ }
6997
+
6998
+ &.mc-card_white {
6999
+ background-color: map-get($popup, background);
7000
+ }
7001
+
7002
+ &.mc-selected {
7003
+ background-color: map-get(map-get($theme, states), selected-color);
7004
+ }
7005
+
7006
+ &:not(.mc-card_readonly):hover {
7007
+ .mc-card__overlay {
7008
+ background: map-get($background, overlay-hover);
7009
+ }
7010
+ }
7011
+
7012
+ &.cdk-keyboard-focused {
7013
+ box-shadow: 0 0 0 2px map-get(map-get($theme, states), focused-color);
7014
+ }
7015
+ }
7016
+ }
7017
+
7018
+
7019
+
7020
+ @mixin mc-divider-theme($theme) {
7021
+ $divider: map-get(map-get($theme, components), divider);
7022
+
7023
+ .mc-divider_horizontal {
7024
+ border-top-color: map-get($divider, color);
7025
+ }
7026
+
7027
+ .mc-divider_vertical {
7028
+ border-right-color: map-get($divider, color);
7029
+ }
7030
+ }
7031
+
7032
+
7033
+
7034
+
7035
+
7036
+
7037
+ @mixin mc-icon-theme($theme) {
7160
7038
  $foreground: map-get($theme, foreground);
7039
+ $second: map-get($theme, second);
7161
7040
 
7162
- .mc-optgroup-label {
7041
+ $icon: map-get(map-get($theme, components), icon);
7042
+
7043
+ $primary: map-get($icon, primary);
7044
+ $secondary: map-get($icon, secondary);
7045
+ $error: map-get($icon, error);
7046
+ $success: map-get($icon, success);
7047
+ $warning: map-get($icon, warning);
7048
+ $info: map-get($icon, info);
7049
+
7050
+ // Дефолтные серые иконки default-icon: лупа в поле, иконки дропдаунов v, все иконки вне полей.
7051
+ .mc-icon {
7052
+ color: mc-color($foreground, icon);
7053
+
7054
+ &.mc-primary {
7055
+ color: map-get($primary, default);
7056
+ }
7057
+
7058
+ &.mc-second {
7059
+ color: map-get($secondary, default);
7060
+ }
7061
+
7062
+ &.mc-error {
7063
+ color: map-get($error, default);
7064
+ }
7065
+
7066
+
7067
+ &.mc-info {
7068
+ color: map-get($info, default);
7069
+ }
7070
+
7071
+ &.mc-warning {
7072
+ color: map-get($warning, default);
7073
+ }
7074
+
7075
+ &.mc-success {
7076
+ color: map-get($success, default);
7077
+ }
7078
+
7079
+ &[disabled],
7080
+ &.mc-disabled {
7081
+ cursor: default;
7082
+ }
7083
+ }
7084
+
7085
+ // Облегченные серые иконки less-contrast-icon нужны тогда, когда действие, которое они делают не дефолтное и
7086
+ // не самое важное. Не используются вне инпутов или селектов.
7087
+ .mc-icon.mc-icon_light {
7088
+ &.mc-primary {
7089
+ &:active,
7090
+ &.mc-active {
7091
+ color: map-get($primary, state-active);
7092
+ }
7093
+
7094
+ &:not([disabled], .mc-disabled):hover {
7095
+ color: map-get($primary, state-hover);
7096
+ }
7097
+
7098
+ &[disabled],
7099
+ &.mc-disabled {
7100
+ color: map-get($primary, state-disabled);
7101
+ }
7102
+ }
7103
+
7104
+ &.mc-second {
7105
+ &:active,
7106
+ &.mc-active {
7107
+ color: map-get($secondary, state-active);
7108
+ }
7109
+
7110
+ &:not([disabled], .mc-disabled):hover {
7111
+ color: map-get($secondary, state-hover);
7112
+ }
7113
+
7114
+ &[disabled],
7115
+ &.mc-disabled {
7116
+ color: map-get($secondary, state-disabled);
7117
+ }
7118
+ }
7119
+
7120
+ &.mc-error {
7121
+ &:active,
7122
+ &.mc-active {
7123
+ color: map-get($error, state-active);
7124
+ }
7125
+
7126
+ &:not([disabled], .mc-disabled):hover {
7127
+ color: map-get($error, state-hover);
7128
+ }
7129
+
7130
+ &[disabled],
7131
+ &.mc-disabled {
7132
+ color: map-get($error, state-disabled);
7133
+ }
7134
+ }
7135
+
7136
+ &.mc-info {
7137
+ &:active,
7138
+ &.mc-active {
7139
+ color: map-get($info, state-active);
7140
+ }
7141
+
7142
+ &:not([disabled], .mc-disabled):hover {
7143
+ color: map-get($info, state-hover);
7144
+ }
7145
+
7146
+ &[disabled],
7147
+ &.mc-disabled {
7148
+ color: map-get($info, state-disabled);
7149
+ }
7150
+ }
7151
+
7152
+ &.mc-warning {
7153
+ &:active,
7154
+ &.mc-active {
7155
+ color: map-get($warning, state-active);
7156
+ }
7157
+
7158
+ &:not([disabled], .mc-disabled):hover {
7159
+ color: map-get($warning, state-hover);
7160
+ }
7161
+
7162
+ &[disabled],
7163
+ &.mc-disabled {
7164
+ color: map-get($warning, state-disabled);
7165
+ }
7166
+ }
7167
+
7168
+ &.mc-success {
7169
+ &:active,
7170
+ &.mc-active {
7171
+ color: map-get($success, state-active);
7172
+ }
7173
+
7174
+ &:not([disabled], .mc-disabled):hover {
7175
+ color: map-get($success, state-hover);
7176
+ }
7177
+
7178
+ &[disabled],
7179
+ &.mc-disabled {
7180
+ color: map-get($success, state-disabled);
7181
+ }
7182
+ }
7183
+ }
7184
+ }
7185
+
7186
+
7187
+
7188
+
7189
+
7190
+
7191
+
7192
+
7193
+
7194
+
7195
+
7196
+
7197
+
7198
+ @mixin mc-markdown-theme($theme) {
7199
+ $foreground: map-get($theme, foreground);
7200
+ $background: map-get($theme, background);
7201
+
7202
+ $markdown: map-get(map-get($theme, components), markdown);
7203
+
7204
+ .mc-markdown {
7163
7205
  color: map-get($foreground, text);
7206
+ background: map-get($background, background);;
7207
+
7208
+ .mc-markdown__h1 {
7209
+ color: map-get($markdown, h1-color);
7210
+ }
7211
+
7212
+ .mc-markdown__h2 {
7213
+ color: map-get($markdown, h2-color);
7214
+ }
7215
+
7216
+ .mc-markdown__h3 {
7217
+ color: map-get($markdown, h3-color);
7218
+ }
7219
+
7220
+ .mc-markdown__h4 {
7221
+ color: map-get($markdown, h4-color);
7222
+ }
7223
+
7224
+ .mc-markdown__h5 {
7225
+ color: map-get($markdown, h5-color);
7226
+ }
7227
+
7228
+ .mc-markdown__h6 {
7229
+ color: map-get($markdown, h6-color);
7230
+ }
7231
+
7232
+ .mc-markdown__p {
7233
+ color: map-get($markdown, p-color);
7234
+ }
7235
+
7236
+ .mc-markdown__ul,
7237
+ .mc-markdown__ol {
7238
+ color: map-get($markdown, list-color);
7239
+ }
7240
+
7241
+ .mc-markdown__blockquote {
7242
+ color: map-get($markdown, blockquote-text);
7243
+ background: map-get($markdown, blockquote-background);
7244
+ border-color: map-get($markdown, blockquote-border);
7245
+ border-left-color: map-get($markdown, blockquote-line);
7246
+ }
7247
+
7248
+ .mc-markdown__pre,
7249
+ .mc-markdown__p > .mc-markdown__code {
7250
+ color: map-get($markdown, code-text);
7251
+ background-color: map-get($markdown, code-background);
7252
+ border-color: map-get($markdown, code-border);
7253
+ }
7254
+
7255
+ .mc-markdown__a {
7256
+ @include md-link-theme($theme);
7257
+ }
7258
+
7259
+ .mc-markdown__img + em {
7260
+ color: map-get($markdown, image-caption-text);
7261
+ }
7262
+
7263
+ .mc-markdown__hr {
7264
+ border-bottom-color: map-get($markdown, hr-color);
7265
+ }
7266
+
7267
+ .mc-markdown__table > .mc-markdown__thead {
7268
+ color: map-get($markdown, table-header);
7269
+ border-bottom-color: map-get($markdown, table-border);
7270
+ }
7271
+
7272
+ .mc-markdown__table > .mc-markdown__tbody {
7273
+ color: map-get($markdown, table-body);
7274
+ }
7164
7275
  }
7276
+ }
7165
7277
 
7166
- .mc-disabled .mc-optgroup-label {
7167
- color: map-get($foreground, text-disabled);
7278
+
7279
+ // based on mc-link
7280
+
7281
+ @mixin md-link($foreground, $markdown) {
7282
+ display: inline-block;
7283
+
7284
+ color: map-get($markdown, link-text);
7285
+ text-decoration: none;
7286
+ cursor: pointer;
7287
+
7288
+ border-bottom-style: solid;
7289
+ border-bottom-width: 1px;
7290
+ border-bottom-color: map-get($markdown, link-border-bottom);
7291
+
7292
+ transition: color ease-out 300ms;
7293
+
7294
+ &:focus {
7295
+ outline: none;
7296
+ }
7297
+
7298
+ /* stylelint-disable no-descending-specificity */
7299
+ &:hover {
7300
+ color: map-get($markdown, link-state-hover-text);
7301
+ transition: color 0ms;
7302
+ border-bottom-color: map-get($markdown, link-state-hover-border-bottom);
7303
+ }
7304
+
7305
+ &:active {
7306
+ color: map-get($markdown, link-state-active-text);
7168
7307
  }
7169
7308
  }
7170
7309
 
7171
- @mixin mc-optgroup-typography($config) {
7172
- .mc-optgroup-label {
7173
- @include mc-typography-level-to-styles($config, $optgroup-font-default);
7310
+
7311
+ @mixin md-link-theme($theme) {
7312
+ $foreground: map-get($theme, foreground);
7313
+ $markdown: map-get(map-get($theme, components), markdown);
7314
+
7315
+ &:visited {
7316
+ color: map-get($markdown, link-state-visited-text);
7317
+ border-bottom-color: map-get($markdown, link-state-visited-border-bottom);
7318
+ }
7319
+
7320
+ @include md-link($foreground, $markdown);
7321
+ }
7322
+
7323
+
7324
+
7325
+
7326
+
7327
+
7328
+ @mixin mc-progress-bar-theme($theme) {
7329
+ $primary: map-get($theme, primary);
7330
+ $second: map-get($theme, second);
7331
+ $error: map-get($theme, error);
7332
+
7333
+ $progress-bar: map-get(map-get($theme, components), progress-bar);
7334
+
7335
+ .mc-progress-bar {
7336
+ background-color: map-get($progress-bar, background);
7337
+
7338
+ &.mc-primary .mc-progress-bar__line {
7339
+ background-color: mc-color($primary);
7340
+ }
7341
+
7342
+ &.mc-second .mc-progress-bar__line {
7343
+ background-color: mc-color($second);
7344
+ }
7345
+
7346
+ &.mc-error .mc-progress-bar__line {
7347
+ background-color: mc-color($error);
7348
+ }
7349
+ }
7350
+ }
7351
+
7352
+
7353
+
7354
+
7355
+ @mixin mc-progress-spinner-theme($theme) {
7356
+ $primary: map-get($theme, primary);
7357
+ $second: map-get($theme, second);
7358
+ $error: map-get($theme, error);
7359
+
7360
+ .mc-progress-spinner {
7361
+ &.mc-primary .mc-progress-spinner__circle {
7362
+ stroke: mc-color($primary);
7363
+ }
7364
+
7365
+ &.mc-second .mc-progress-spinner__circle {
7366
+ stroke: mc-color($second);
7367
+ }
7368
+
7369
+ &.mc-error .mc-progress-spinner__circle {
7370
+ stroke: mc-color($error);
7371
+ }
7372
+ }
7373
+ }
7374
+
7375
+
7376
+
7377
+
7378
+ @mixin mc-splitter-theme($theme) {
7379
+ $background: map-get($theme, background);
7380
+
7381
+ .mc-gutter {
7382
+ cursor: col-resize;
7383
+
7384
+ &:hover,
7385
+ &.mc-gutter_dragged {
7386
+ background-color: map-get($background, background-disabled);
7387
+ }
7388
+
7389
+ &.mc-gutter_vertical {
7390
+ cursor: row-resize;
7391
+ }
7392
+
7393
+ &[disabled] {
7394
+ background-color: mc-color($background, overlay-disabled);
7395
+
7396
+ cursor: default;
7397
+ }
7398
+ }
7399
+
7400
+ .mc-gutter-ghost {
7401
+ background: mc-color($background, overlay-disabled);
7174
7402
  }
7175
7403
  }
7176
7404
 
@@ -7178,6 +7406,19 @@ button {
7178
7406
 
7179
7407
 
7180
7408
 
7409
+
7410
+
7411
+
7412
+
7413
+
7414
+
7415
+
7416
+
7417
+
7418
+
7419
+
7420
+
7421
+
7181
7422
  @mixin mc-option-action-theme($theme) {
7182
7423
  $foreground: map-get($theme, foreground);
7183
7424
  $background: map-get($theme, background);
@@ -7244,44 +7485,6 @@ button {
7244
7485
 
7245
7486
 
7246
7487
 
7247
-
7248
- @mixin mc-dl-theme($theme) {
7249
- $dl: map-get(map-get($theme, components), dl);
7250
-
7251
- .mc-dt {
7252
- color: map-get($dl, dt);
7253
- }
7254
-
7255
- .mc-dd {
7256
- color: map-get($dl, dd);
7257
- }
7258
- }
7259
-
7260
- @mixin mc-dl-typography($config) {
7261
- .mc-dl {
7262
- & .mc-dt {
7263
- @include mc-typography-level-to-styles($config, $description-list-font-horizontal-dt);
7264
- }
7265
-
7266
- & .mc-dd {
7267
- @include mc-typography-level-to-styles($config, $description-list-font-horizontal-dd);
7268
- }
7269
- }
7270
-
7271
- .mc-dl.mc-dl_vertical {
7272
- & .mc-dt {
7273
- @include mc-typography-level-to-styles($config, $description-list-font-vertical-dt);
7274
- }
7275
-
7276
- & .mc-dd {
7277
- @include mc-typography-level-to-styles($config, $description-list-font-vertical-dd);
7278
- }
7279
- }
7280
- }
7281
-
7282
-
7283
-
7284
-
7285
7488
  @mixin mosaic-theme($theme) {
7286
7489
  @include mc-core-theme($theme);
7287
7490