@ptsecurity/mosaic 17.2.0 → 17.2.2
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/autocomplete/_autocomplete-theme.scss +2 -2
- package/autocomplete/autocomplete.scss +0 -2
- package/button/_button-theme.scss +3 -3
- package/button-toggle/_button-toggle-theme.scss +2 -2
- package/button-toggle/button-toggle.scss +2 -2
- package/checkbox/_checkbox-theme.scss +1 -1
- package/code-block/_code-block-theme.scss +3 -3
- package/core/form-field/form-field-ref.d.ts +13 -0
- package/core/form-field/index.d.ts +1 -0
- package/core/forms/_forms-theme.scss +3 -3
- package/core/locales/en-US.d.ts +17 -0
- package/core/locales/es-LA.d.ts +17 -0
- package/core/locales/fa-IR.d.ts +17 -0
- package/core/locales/index.d.ts +6 -0
- package/core/locales/locale-service.d.ts +102 -0
- package/core/locales/pt-BR.d.ts +17 -0
- package/core/locales/ru-RU.d.ts +17 -0
- package/core/locales/zh-CN.d.ts +17 -0
- package/core/option/_optgroup-theme.scss +1 -1
- package/core/option/_option-theme.scss +1 -1
- package/core/public-api.d.ts +1 -0
- package/core/select/common.d.ts +35 -0
- package/core/select/index.d.ts +1 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -11
- package/core/styles/common/_groups.scss +3 -2
- package/core/styles/common/_popup.scss +1 -1
- package/core/styles/common/_tokens.scss +33 -14
- package/core/styles/theming/_alerts.scss +20 -19
- package/core/styles/theming/_badges.scss +38 -36
- package/core/styles/theming/_components-theming.scss +13 -13
- package/core/styles/theming/_scrollbars.scss +24 -27
- package/core/styles/theming/_theming.scss +10 -8
- package/core/styles/typography/_typography-utils.scss +1 -1
- package/core/styles/typography/_typography.scss +29 -28
- package/core/styles/visual/_layout.scss +14 -13
- package/datepicker/_datepicker-theme.scss +5 -6
- package/divider/_divider-theme.scss +1 -1
- package/dl/_dl-theme.scss +9 -9
- package/dropdown/_dropdown-theme.scss +4 -4
- package/esm2022/button-toggle/button-toggle.component.mjs +2 -2
- package/esm2022/core/form-field/form-field-ref.mjs +8 -0
- package/esm2022/core/form-field/index.mjs +2 -0
- package/esm2022/core/locales/en-US.mjs +18 -1
- package/esm2022/core/locales/es-LA.mjs +18 -1
- package/esm2022/core/locales/fa-IR.mjs +18 -1
- package/esm2022/core/locales/index.mjs +7 -1
- package/esm2022/core/locales/pt-BR.mjs +18 -1
- package/esm2022/core/locales/ru-RU.mjs +18 -1
- package/esm2022/core/locales/zh-CN.mjs +18 -1
- package/esm2022/core/public-api.mjs +2 -1
- package/esm2022/core/select/common.mjs +119 -0
- package/esm2022/core/select/index.mjs +2 -1
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +1 -1
- package/esm2022/file-upload/multiple-file-upload.component.mjs +49 -26
- package/esm2022/file-upload/single-file-upload.component.mjs +38 -14
- package/esm2022/form-field/form-field.mjs +5 -11
- package/esm2022/form-field/password-hint.mjs +5 -4
- package/esm2022/form-field/validate.directive.mjs +5 -2
- package/esm2022/modal/modal.component.mjs +3 -3
- package/esm2022/modal/modal.directive.mjs +12 -6
- package/esm2022/navbar/navbar.component.mjs +2 -2
- package/esm2022/navbar/vertical-navbar.component.mjs +3 -3
- package/esm2022/select/select.component.mjs +17 -113
- package/esm2022/select/select.module.mjs +17 -17
- package/esm2022/tabs/tab-header.component.mjs +2 -2
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
- package/esm2022/tags/tag-default-options.mjs +1 -1
- package/esm2022/tags/tag-input.mjs +17 -3
- package/esm2022/timepicker/timepicker.directive.mjs +10 -2
- package/esm2022/timezone/timezone-select.component.mjs +5 -5
- package/esm2022/toast/toast.service.mjs +17 -11
- package/esm2022/tree-select/tree-select.component.mjs +6 -7
- package/fesm2022/ptsecurity-mosaic-button-toggle.mjs +2 -2
- package/fesm2022/ptsecurity-mosaic-button-toggle.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-core.mjs +227 -4
- package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-datepicker.mjs +1 -1
- package/fesm2022/ptsecurity-mosaic-datepicker.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs +80 -36
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-form-field.mjs +11 -14
- package/fesm2022/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-modal.mjs +11 -6
- package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-navbar.mjs +4 -4
- package/fesm2022/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-select.mjs +35 -131
- package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tabs.mjs +4 -4
- package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tags.mjs +17 -4
- package/fesm2022/ptsecurity-mosaic-tags.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-timepicker.mjs +9 -1
- package/fesm2022/ptsecurity-mosaic-timepicker.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-timezone.mjs +4 -4
- package/fesm2022/ptsecurity-mosaic-timezone.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-toast.mjs +15 -9
- package/fesm2022/ptsecurity-mosaic-toast.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs +6 -6
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +7 -7
- package/file-upload/multiple-file-upload.component.d.ts +17 -6
- package/file-upload/multiple-file-upload.component.scss +9 -9
- package/file-upload/single-file-upload.component.d.ts +15 -6
- package/file-upload/single-file-upload.component.scss +3 -3
- package/form-field/_form-field-theme.scss +7 -5
- package/form-field/form-field.d.ts +1 -7
- package/form-field/form-field.scss +1 -1
- package/form-field/validate.directive.d.ts +5 -2
- package/icon/_icon-theme.scss +1 -1
- package/input/_input-theme.scss +4 -4
- package/link/_link-theme.scss +3 -3
- package/list/_list-theme.scss +1 -1
- package/loader-overlay/_loader-overlay-theme.scss +2 -2
- package/markdown/_markdown-theme.scss +15 -15
- package/modal/_modal-theme.scss +4 -4
- package/modal/modal.directive.d.ts +1 -1
- package/modal/modal.scss +2 -2
- package/navbar/_navbar-theme.scss +6 -6
- package/navbar/navbar-item.scss +2 -2
- package/package.json +8 -8
- package/popover/_popover-theme.scss +4 -4
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/radio/_radio-theme.scss +2 -2
- package/select/_select-theme.scss +4 -4
- package/select/select.component.d.ts +2 -32
- package/select/select.module.d.ts +1 -1
- package/select/select.scss +1 -1
- package/sidepanel/_sidepanel-theme.scss +5 -5
- package/table/_table-theme.scss +2 -2
- package/tabs/_tabs-theme.scss +3 -3
- package/tabs/tab-header.scss +16 -12
- package/tabs/tab-nav-bar/tab-nav-bar.scss +15 -13
- package/tags/_tag-theme.scss +7 -7
- package/tags/tag-default-options.d.ts +1 -0
- package/tags/tag-input.d.ts +7 -1
- package/textarea/_textarea-theme.scss +2 -2
- package/timezone/_timezone-option-theme.scss +4 -4
- package/timezone/timezone-select.component.d.ts +2 -1
- package/toast/_toast-theme.scss +3 -3
- package/toast/toast.service.d.ts +8 -4
- package/toggle/_toggle-theme.scss +3 -3
- package/tooltip/_tooltip-theme.scss +4 -4
- package/tree/_tree-theme.scss +1 -1
- package/tree-select/_tree-select-theme.scss +1 -1
- package/tree-select/tree-select.component.d.ts +1 -2
- package/tree-select/tree-select.scss +1 -1
@@ -6,34 +6,53 @@
|
|
6
6
|
@use '../tokens';
|
7
7
|
|
8
8
|
|
9
|
-
$tokens: meta.module-variables(tokens);
|
9
|
+
$default-tokens: meta.module-variables(tokens);
|
10
10
|
|
11
11
|
|
12
12
|
@function mc-css-variable($name, $value: null) {
|
13
13
|
@if $value {
|
14
14
|
@return var(--mc-#{$name}, $value);
|
15
15
|
} @else {
|
16
|
-
@return var(--mc-#{$name}, map.get($tokens, $name));
|
16
|
+
@return var(--mc-#{$name}, map.get($default-tokens, $name));
|
17
17
|
}
|
18
18
|
}
|
19
19
|
|
20
20
|
@function getToken($name) {
|
21
|
-
@return map.get($tokens, $name);
|
21
|
+
@return map.get($default-tokens, $name);
|
22
22
|
}
|
23
23
|
|
24
|
-
@mixin mc-css-font-variable($component, $component-property, $font-property) {
|
24
|
+
@mixin mc-css-font-variable($tokens, $component, $component-property, $font-property, $font) {
|
25
25
|
#{$font-property}: var(
|
26
|
-
--mc-#{$component}
|
27
|
-
map.get($tokens, #{$component}
|
26
|
+
--mc-#{$component}-#{$font}#{$component-property}-#{$font-property},
|
27
|
+
map.get($tokens, #{$component}-#{$font}#{$component-property}-#{$font-property})
|
28
28
|
);
|
29
|
+
//@debug '_____________________________________________________________';
|
30
|
+
//@debug #{$component}-#{$font}#{$component-property}-#{$font-property};
|
31
|
+
//@debug '_____________________________________________________________';
|
32
|
+
//@debug $tokens;
|
29
33
|
}
|
30
34
|
|
31
|
-
@mixin mc-typography-css-variables($component, $property) {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
@include mc-css-font-variable($component, $property, font-
|
36
|
-
@include mc-css-font-variable($component, $property,
|
37
|
-
@include mc-css-font-variable($component, $property, font-
|
38
|
-
@include mc-css-font-variable($component, $property,
|
35
|
+
@mixin mc-typography-css-variables($config, $component, $property) {
|
36
|
+
//@debug 'mc-typography-css-variables';
|
37
|
+
$tokens: map.get($config, tokens);
|
38
|
+
|
39
|
+
@include mc-css-font-variable($tokens, $component, $property, font-size, font-);
|
40
|
+
@include mc-css-font-variable($tokens, $component, $property, font-weight, font-);
|
41
|
+
@include mc-css-font-variable($tokens, $component, $property, line-height, font-);
|
42
|
+
@include mc-css-font-variable($tokens, $component, $property, font-family, font-);
|
43
|
+
@include mc-css-font-variable($tokens, $component, $property, text-transform, font-);
|
44
|
+
@include mc-css-font-variable($tokens, $component, $property, font-feature-settings, font-);
|
45
|
+
@include mc-css-font-variable($tokens, $component, $property, letter-spacing, font-);
|
46
|
+
}
|
47
|
+
|
48
|
+
@mixin mc-typography-level-to-styles_css-variables($config, $component, $property) {
|
49
|
+
$tokens: map.get($config, tokens);
|
50
|
+
|
51
|
+
@include mc-css-font-variable($tokens, $component, $property, font-size, '');
|
52
|
+
@include mc-css-font-variable($tokens, $component, $property, font-weight, '');
|
53
|
+
@include mc-css-font-variable($tokens, $component, $property, line-height, '');
|
54
|
+
@include mc-css-font-variable($tokens, $component, $property, font-family, '');
|
55
|
+
@include mc-css-font-variable($tokens, $component, $property, text-transform, '');
|
56
|
+
@include mc-css-font-variable($tokens, $component, $property, font-feature-settings, '');
|
57
|
+
@include mc-css-font-variable($tokens, $component, $property, letter-spacing, '');
|
39
58
|
}
|
@@ -52,50 +52,50 @@
|
|
52
52
|
}
|
53
53
|
}
|
54
54
|
|
55
|
-
@mixin alert-theme($
|
56
|
-
|
57
|
-
|
55
|
+
@mixin alert-theme($component, $style-name) {
|
56
|
+
$style: map.get($component, $style-name);
|
57
|
+
|
58
|
+
background-color: mc-css-variable(alert-#{$style-name}-background, map.get($style, background));
|
59
|
+
border-color: mc-css-variable(alert-#{$style-name}-border, map.get($style, border));
|
58
60
|
|
59
61
|
.mc-icon.mc-alert__icon {
|
60
|
-
color: map.get($
|
62
|
+
color: mc-css-variable(alert-#{$style-name}-icon, map.get($style, icon));
|
61
63
|
}
|
62
64
|
}
|
63
65
|
|
64
66
|
@mixin mc-alert-theme($theme) {
|
65
67
|
$foreground: map.get($theme, foreground);
|
66
68
|
|
67
|
-
$alert: map.get(
|
68
|
-
|
69
|
-
$is-dark: map.get($theme, is-dark);
|
69
|
+
$alert: map.get($theme, components, alert);
|
70
70
|
|
71
71
|
.mc-alert__close:focus {
|
72
72
|
outline: none;
|
73
73
|
}
|
74
74
|
|
75
75
|
.mc-alert {
|
76
|
-
color: map.get($foreground, text);
|
76
|
+
color: mc-css-variable(foreground-text, map.get($foreground, text));
|
77
77
|
|
78
78
|
@include mc-alert-geometry(map.get($theme, tokens));
|
79
79
|
}
|
80
80
|
|
81
81
|
.mc-alert_error {
|
82
|
-
@include alert-theme(
|
82
|
+
@include alert-theme($alert, error);
|
83
83
|
}
|
84
84
|
|
85
85
|
.mc-alert_warning {
|
86
|
-
@include alert-theme(
|
86
|
+
@include alert-theme($alert, warning);
|
87
87
|
}
|
88
88
|
|
89
89
|
.mc-alert_success {
|
90
|
-
@include alert-theme(
|
90
|
+
@include alert-theme($alert, success);
|
91
91
|
}
|
92
92
|
|
93
93
|
.mc-alert_info {
|
94
|
-
@include alert-theme(
|
94
|
+
@include alert-theme($alert, info);
|
95
95
|
}
|
96
96
|
|
97
97
|
.mc-alert:not(.mc-alert_error):not(.mc-alert_warning):not(.mc-alert_success):not(.mc-alert_info) {
|
98
|
-
@include alert-theme(
|
98
|
+
@include alert-theme($alert, default);
|
99
99
|
}
|
100
100
|
}
|
101
101
|
|
@@ -128,29 +128,30 @@
|
|
128
128
|
|
129
129
|
&.mc-alert_dismissible {
|
130
130
|
padding-right: calc(
|
131
|
-
mc-
|
131
|
+
var(--mc-alert-size-right-padding-dismissible, #{map.get($tokens, alert-size-close-button-width)}) +
|
132
|
+
var(--mc-alert-size-horizontal-padding, #{map.get($tokens, alert-size-horizontal-padding)})
|
132
133
|
);
|
133
134
|
}
|
134
135
|
}
|
135
136
|
|
136
137
|
@mixin mc-alert-typography($config) {
|
137
138
|
.mc-alert:not(.mc-alert_small) {
|
138
|
-
@include mc-typography-css-variables(alert, default-body);
|
139
|
+
@include mc-typography-css-variables($config, alert, default-body);
|
139
140
|
|
140
141
|
header {
|
141
|
-
@include mc-typography-css-variables(alert, default-header);
|
142
|
+
@include mc-typography-css-variables($config, alert, default-header);
|
142
143
|
}
|
143
144
|
}
|
144
145
|
|
145
146
|
.mc-alert.mc-alert_small {
|
146
|
-
@include mc-typography-css-variables(alert, small-body);
|
147
|
+
@include mc-typography-css-variables($config, alert, small-body);
|
147
148
|
|
148
149
|
header {
|
149
|
-
@include mc-typography-css-variables(alert, small-header);
|
150
|
+
@include mc-typography-css-variables($config, alert, small-header);
|
150
151
|
}
|
151
152
|
|
152
153
|
.mc-link__text {
|
153
|
-
@include mc-typography-css-variables(alert, small-body);
|
154
|
+
@include mc-typography-css-variables($config, alert, small-body);
|
154
155
|
}
|
155
156
|
}
|
156
157
|
|
@@ -19,19 +19,21 @@
|
|
19
19
|
}
|
20
20
|
|
21
21
|
|
22
|
-
@mixin mc-badge-color($
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
@mixin mc-badge-color($component, $style-name) {
|
23
|
+
$style: map.get($component, $style-name);
|
24
|
+
|
25
|
+
color: mc-css-variable(badge-#{$style-name}-color, map.get($style, color));
|
26
|
+
border-color: mc-css-variable(badge-#{$style-name}-border, map.get($style, border));
|
27
|
+
background: mc-css-variable(badge-#{$style-name}-background, map.get($style, background));
|
26
28
|
}
|
27
29
|
|
28
30
|
@mixin mc-badge-theme($theme) {
|
29
31
|
$foreground: map.get($theme, foreground);
|
30
|
-
$badge: map.get(
|
32
|
+
$badge: map.get($theme, components, badge);
|
31
33
|
|
32
34
|
.mc-badge {
|
33
|
-
color: map.get($foreground, text);
|
34
|
-
border-color: map.get($foreground, border);
|
35
|
+
color: mc-css-variable(foreground-text, map.get($foreground, text));
|
36
|
+
border-color: mc-css-variable(foreground-border, map.get($foreground, border));
|
35
37
|
|
36
38
|
}
|
37
39
|
|
@@ -39,57 +41,57 @@
|
|
39
41
|
|
40
42
|
.mc-badge_solid {
|
41
43
|
&.mc-badge_primary {
|
42
|
-
@include mc-badge-color(
|
44
|
+
@include mc-badge-color($badge, solid-primary);
|
43
45
|
}
|
44
46
|
|
45
47
|
&.mc-badge_second {
|
46
|
-
@include mc-badge-color(
|
48
|
+
@include mc-badge-color($badge, solid-secondary);
|
47
49
|
}
|
48
50
|
|
49
51
|
&.mc-badge_transparent {
|
50
|
-
@include mc-badge-color(
|
52
|
+
@include mc-badge-color($badge, solid-transparent);
|
51
53
|
}
|
52
54
|
|
53
55
|
&.mc-badge_success {
|
54
|
-
@include mc-badge-color(
|
56
|
+
@include mc-badge-color($badge, solid-success);
|
55
57
|
}
|
56
58
|
|
57
59
|
&.mc-badge_info {
|
58
|
-
@include mc-badge-color(
|
60
|
+
@include mc-badge-color($badge, solid-info);
|
59
61
|
}
|
60
62
|
|
61
63
|
&.mc-badge_warning {
|
62
|
-
@include mc-badge-color(
|
64
|
+
@include mc-badge-color($badge, solid-warning);
|
63
65
|
}
|
64
66
|
|
65
67
|
&.mc-badge_error {
|
66
|
-
@include mc-badge-color(
|
68
|
+
@include mc-badge-color($badge, solid-error);
|
67
69
|
}
|
68
70
|
|
69
71
|
&.mc-badge_light {
|
70
|
-
@include mc-badge-color(
|
72
|
+
@include mc-badge-color($badge, solid-light);
|
71
73
|
}
|
72
74
|
}
|
73
75
|
|
74
76
|
.mc-badge_pastel {
|
75
77
|
&.mc-badge_primary {
|
76
|
-
@include mc-badge-color(
|
78
|
+
@include mc-badge-color($badge, pastel-primary);
|
77
79
|
}
|
78
80
|
|
79
81
|
&.mc-badge_success {
|
80
|
-
@include mc-badge-color(
|
82
|
+
@include mc-badge-color($badge, pastel-success);
|
81
83
|
}
|
82
84
|
|
83
85
|
&.mc-badge_info {
|
84
|
-
@include mc-badge-color(
|
86
|
+
@include mc-badge-color($badge, pastel-info);
|
85
87
|
}
|
86
88
|
|
87
89
|
&.mc-badge_warning {
|
88
|
-
@include mc-badge-color(
|
90
|
+
@include mc-badge-color($badge, pastel-warning);
|
89
91
|
}
|
90
92
|
|
91
93
|
&.mc-badge_error {
|
92
|
-
@include mc-badge-color(
|
94
|
+
@include mc-badge-color($badge, pastel-error);
|
93
95
|
}
|
94
96
|
}
|
95
97
|
}
|
@@ -97,22 +99,22 @@
|
|
97
99
|
@mixin mc-badges-geometry($tokens) {
|
98
100
|
.mc-badge {
|
99
101
|
&.mc-badge_default {
|
100
|
-
height:
|
101
|
-
min-width:
|
102
|
-
padding:
|
102
|
+
height: mc-css-variable(badge-size-default-height);
|
103
|
+
min-width: mc-css-variable(badge-size-default-min-width);
|
104
|
+
padding: mc-css-variable(badge-size-default-padding);
|
103
105
|
border: {
|
104
|
-
width:
|
105
|
-
radius:
|
106
|
+
width: mc-css-variable(badge-size-default-border-width);
|
107
|
+
radius: mc-css-variable(badge-size-default-border-radius);
|
106
108
|
}
|
107
109
|
}
|
108
110
|
|
109
111
|
&.mc-badge_mini {
|
110
|
-
height:
|
111
|
-
min-width:
|
112
|
-
padding:
|
112
|
+
height: mc-css-variable(badge-size-mini-height);
|
113
|
+
min-width: mc-css-variable(badge-size-mini-min-width);
|
114
|
+
padding: mc-css-variable(badge-size-mini-padding);
|
113
115
|
border: {
|
114
|
-
width:
|
115
|
-
radius:
|
116
|
+
width: mc-css-variable(badge-size-mini-border-width);
|
117
|
+
radius: mc-css-variable(badge-size-mini-border-radius);
|
116
118
|
}
|
117
119
|
}
|
118
120
|
}
|
@@ -120,26 +122,26 @@
|
|
120
122
|
|
121
123
|
@mixin mc-badge-typography($config) {
|
122
124
|
.mc-badge_default {
|
123
|
-
@include mc-typography-css-variables(badge, default-default);
|
125
|
+
@include mc-typography-css-variables($config, badge, default-default);
|
124
126
|
|
125
127
|
&.mc-badge_caps {
|
126
|
-
@include mc-typography-css-variables(badge, default-caps);
|
128
|
+
@include mc-typography-css-variables($config, badge, default-caps);
|
127
129
|
}
|
128
130
|
|
129
131
|
&.mc-badge_mono {
|
130
|
-
@include mc-typography-css-variables(badge, default-mono);
|
132
|
+
@include mc-typography-css-variables($config, badge, default-mono);
|
131
133
|
}
|
132
134
|
}
|
133
135
|
|
134
136
|
.mc-badge_mini {
|
135
|
-
@include mc-typography-css-variables(badge, mini-default);
|
137
|
+
@include mc-typography-css-variables($config, badge, mini-default);
|
136
138
|
|
137
139
|
&.mc-badge_caps {
|
138
|
-
@include mc-typography-css-variables(badge, mini-caps);
|
140
|
+
@include mc-typography-css-variables($config, badge, mini-caps);
|
139
141
|
}
|
140
142
|
|
141
143
|
&.mc-badge_mono {
|
142
|
-
@include mc-typography-css-variables(badge, mini-mono);
|
144
|
+
@include mc-typography-css-variables($config, badge, mini-mono);
|
143
145
|
}
|
144
146
|
}
|
145
147
|
}
|
@@ -36,67 +36,67 @@
|
|
36
36
|
);
|
37
37
|
|
38
38
|
$badge: (
|
39
|
-
|
39
|
+
solid-primary: (
|
40
40
|
color: map-get($tokens, 'badge-#{$scheme}-solid-primary-color'),
|
41
41
|
background: map-get($tokens, 'badge-#{$scheme}-solid-primary-background'),
|
42
42
|
border: map-get($tokens, 'badge-#{$scheme}-solid-primary-border')
|
43
43
|
),
|
44
|
-
|
44
|
+
solid-secondary: (
|
45
45
|
color: map-get($tokens, 'badge-#{$scheme}-solid-secondary-color'),
|
46
46
|
background: map-get($tokens, 'badge-#{$scheme}-solid-secondary-background'),
|
47
47
|
border: map-get($tokens, 'badge-#{$scheme}-solid-secondary-border')
|
48
48
|
),
|
49
|
-
|
49
|
+
solid-light: (
|
50
50
|
color: map-get($tokens, 'badge-#{$scheme}-solid-light-color'),
|
51
51
|
background: map-get($tokens, 'badge-#{$scheme}-solid-light-background'),
|
52
52
|
border: map-get($tokens, 'badge-#{$scheme}-solid-light-background')
|
53
53
|
),
|
54
|
-
|
54
|
+
solid-info: (
|
55
55
|
color: map-get($tokens, 'badge-#{$scheme}-solid-info-color'),
|
56
56
|
background: map-get($tokens, 'badge-#{$scheme}-solid-info-background'),
|
57
57
|
border: map-get($tokens, 'badge-#{$scheme}-solid-info-border')
|
58
58
|
),
|
59
|
-
|
59
|
+
solid-success: (
|
60
60
|
color: map-get($tokens, 'badge-#{$scheme}-solid-success-color'),
|
61
61
|
background: map-get($tokens, 'badge-#{$scheme}-solid-success-background'),
|
62
62
|
border: map-get($tokens, 'badge-#{$scheme}-solid-success-border')
|
63
63
|
),
|
64
|
-
|
64
|
+
solid-warning: (
|
65
65
|
color: map-get($tokens, 'badge-#{$scheme}-solid-warning-color'),
|
66
66
|
background: map-get($tokens, 'badge-#{$scheme}-solid-warning-background'),
|
67
67
|
border: map-get($tokens, 'badge-#{$scheme}-solid-warning-border')
|
68
68
|
),
|
69
|
-
|
69
|
+
solid-error: (
|
70
70
|
color: map-get($tokens, 'badge-#{$scheme}-solid-error-color'),
|
71
71
|
background: map-get($tokens, 'badge-#{$scheme}-solid-error-background'),
|
72
72
|
border: map-get($tokens, 'badge-#{$scheme}-solid-error-border')
|
73
73
|
),
|
74
|
-
|
74
|
+
solid-transparent: (
|
75
75
|
color: map-get($tokens, 'badge-#{$scheme}-solid-transparent-color'),
|
76
76
|
border: map-get($tokens, 'badge-#{$scheme}-solid-transparent-border'),
|
77
77
|
background: map-get($tokens, 'badge-#{$scheme}-solid-transparent-background')
|
78
78
|
),
|
79
|
-
|
79
|
+
pastel-primary: (
|
80
80
|
color: map-get($tokens, 'badge-#{$scheme}-pastel-primary-color'),
|
81
81
|
background: map-get($tokens, 'badge-#{$scheme}-pastel-primary-background'),
|
82
82
|
border: map-get($tokens, 'badge-#{$scheme}-pastel-primary-border')
|
83
83
|
),
|
84
|
-
|
84
|
+
pastel-info: (
|
85
85
|
color: map-get($tokens, 'badge-#{$scheme}-pastel-info-color'),
|
86
86
|
background: map-get($tokens, 'badge-#{$scheme}-pastel-info-background'),
|
87
87
|
border: map-get($tokens, 'badge-#{$scheme}-pastel-info-border')
|
88
88
|
),
|
89
|
-
|
89
|
+
pastel-success: (
|
90
90
|
color: map-get($tokens, 'badge-#{$scheme}-pastel-success-color'),
|
91
91
|
background: map-get($tokens, 'badge-#{$scheme}-pastel-success-background'),
|
92
92
|
border: map-get($tokens, 'badge-#{$scheme}-pastel-success-border')
|
93
93
|
),
|
94
|
-
|
94
|
+
pastel-warning: (
|
95
95
|
color: map-get($tokens, 'badge-#{$scheme}-pastel-warning-color'),
|
96
96
|
background: map-get($tokens, 'badge-#{$scheme}-pastel-warning-background'),
|
97
97
|
border: map-get($tokens, 'badge-#{$scheme}-pastel-warning-border')
|
98
98
|
),
|
99
|
-
|
99
|
+
pastel-error: (
|
100
100
|
color: map-get($tokens, 'badge-#{$scheme}-pastel-error-color'),
|
101
101
|
background: map-get($tokens, 'badge-#{$scheme}-pastel-error-background'),
|
102
102
|
border: map-get($tokens, 'badge-#{$scheme}-pastel-error-border')
|
@@ -2,6 +2,8 @@
|
|
2
2
|
@use 'sass:map';
|
3
3
|
|
4
4
|
@use '../functions/string' as *;
|
5
|
+
@use '../common/tokens' as *;
|
6
|
+
|
5
7
|
|
6
8
|
.mc-scrollbar {
|
7
9
|
//firefox
|
@@ -11,54 +13,55 @@
|
|
11
13
|
}
|
12
14
|
|
13
15
|
@mixin mc-scrollbar-theme($theme) {
|
14
|
-
$scrollbar: map.get(
|
16
|
+
$scrollbar: map.get($theme, components, scrollbar);
|
15
17
|
$thumb: map.get($scrollbar, thumb);
|
16
18
|
$arrow: map.get($scrollbar, arrow);
|
17
19
|
|
18
20
|
.mc-scrollbar {
|
19
|
-
@include mc-scrollbar-geometry(
|
21
|
+
@include mc-scrollbar-geometry();
|
20
22
|
|
21
23
|
// firefox
|
22
24
|
@supports not selector(::-webkit-scrollbar) {
|
23
|
-
scrollbar-color:
|
25
|
+
scrollbar-color: mc-css-variable(thumb-normal, map-get($thumb, normal))
|
26
|
+
mc-css-variable(scrollbar-track, map-get($scrollbar, track));
|
24
27
|
}
|
25
28
|
|
26
29
|
// webkit
|
27
30
|
&::-webkit-scrollbar,
|
28
31
|
::-webkit-scrollbar {
|
29
|
-
background-color: map.get($scrollbar, track);
|
32
|
+
background-color: mc-css-variable(scrollbar-track, map.get($scrollbar, track));
|
30
33
|
}
|
31
34
|
|
32
35
|
|
33
36
|
&::-webkit-scrollbar-corner,
|
34
37
|
::-webkit-scrollbar-corner {
|
35
|
-
background-color: map.get($scrollbar, corner-background);
|
38
|
+
background-color: mc-css-variable(scrollbar-corner-background, map.get($scrollbar, corner-background));
|
36
39
|
}
|
37
40
|
|
38
41
|
&::-webkit-scrollbar-thumb,
|
39
42
|
::-webkit-scrollbar-thumb {
|
40
|
-
background-color: map.get($thumb, normal);
|
43
|
+
background-color: mc-css-variable(thumb-normal, map.get($thumb, normal));
|
41
44
|
|
42
|
-
border-color: map.get($scrollbar, track);
|
45
|
+
border-color: mc-css-variable(scrollbar-track, map.get($scrollbar, track));
|
43
46
|
border-style: solid;
|
44
47
|
|
45
48
|
&:hover {
|
46
|
-
background-color: map.get($thumb, hover);
|
49
|
+
background-color: mc-css-variable(thumb-hover, map.get($thumb, hover));
|
47
50
|
}
|
48
51
|
|
49
52
|
&:disabled {
|
50
|
-
background-color: map.get($thumb, disabled);
|
53
|
+
background-color: mc-css-variable(thumb-disabled, map.get($thumb, disabled));
|
51
54
|
}
|
52
55
|
|
53
56
|
&:active {
|
54
|
-
background-color: map.get($thumb, active);
|
57
|
+
background-color: mc-css-variable(thumb-active, map.get($thumb, active));
|
55
58
|
}
|
56
59
|
}
|
57
60
|
|
58
61
|
/* stylelint-disable */
|
59
62
|
&::-webkit-scrollbar-button,
|
60
63
|
::-webkit-scrollbar-button {
|
61
|
-
background-color: map.get($arrow, background);
|
64
|
+
background-color: mc-css-variable(arrow-background, map.get($arrow, background));
|
62
65
|
background-size: 10px 10px;
|
63
66
|
background-repeat: no-repeat;
|
64
67
|
background-position: center center;
|
@@ -93,39 +96,33 @@
|
|
93
96
|
}
|
94
97
|
}
|
95
98
|
|
96
|
-
@mixin mc-scrollbar-geometry(
|
99
|
+
@mixin mc-scrollbar-geometry() {
|
97
100
|
// webkit
|
98
101
|
&::-webkit-scrollbar,
|
99
102
|
::-webkit-scrollbar {
|
100
103
|
&:vertical {
|
101
|
-
width:
|
104
|
+
width: mc-css-variable(scrollbar-size-track-dimension);
|
102
105
|
}
|
103
106
|
|
104
107
|
&:horizontal {
|
105
|
-
height:
|
108
|
+
height: mc-css-variable(scrollbar-size-track-dimension);
|
106
109
|
}
|
107
110
|
}
|
108
111
|
|
109
112
|
/* stylelint-disable no-descending-specificity */
|
110
113
|
&::-webkit-scrollbar-thumb,
|
111
114
|
::-webkit-scrollbar-thumb {
|
112
|
-
width:
|
113
|
-
border-width:
|
114
|
-
|
115
|
-
map.get($tokens, scrollbar-size-thumb-border-width)
|
116
|
-
);
|
117
|
-
border-radius: var(
|
118
|
-
--mc-scrollbar-size-thumb-inset-border-radius,
|
119
|
-
map.get($tokens, scrollbar-size-thumb-border-radius)
|
120
|
-
);
|
115
|
+
width: mc-css-variable(scrollbar-size-thumb-width);
|
116
|
+
border-width: mc-css-variable(scrollbar-size-thumb-border-width);
|
117
|
+
border-radius: mc-css-variable(scrollbar-size-thumb-border-radius);
|
121
118
|
|
122
119
|
// these props are used to set the user-friendly thumb for long content.
|
123
120
|
&:vertical {
|
124
|
-
min-height:
|
121
|
+
min-height: mc-css-variable(scrollbar-size-thumb-min-size);
|
125
122
|
}
|
126
123
|
|
127
124
|
&:horizontal {
|
128
|
-
min-width:
|
125
|
+
min-width: mc-css-variable(scrollbar-size-thumb-min-size);
|
129
126
|
}
|
130
127
|
}
|
131
128
|
|
@@ -133,8 +130,8 @@
|
|
133
130
|
::-webkit-scrollbar-button {
|
134
131
|
display: none;
|
135
132
|
|
136
|
-
width:
|
137
|
-
height:
|
133
|
+
width: mc-css-variable(scrollbar-size-arrow-icon-width);
|
134
|
+
height: mc-css-variable(scrollbar-size-arrow-icon-height);
|
138
135
|
}
|
139
136
|
}
|
140
137
|
|
@@ -2,9 +2,11 @@
|
|
2
2
|
@use 'sass:meta';
|
3
3
|
|
4
4
|
@use 'components-theming' as *;
|
5
|
+
@use '../common/tokens' as *;
|
6
|
+
|
5
7
|
|
6
8
|
@function mc-contrast($palette, $hue) {
|
7
|
-
@return map.get(
|
9
|
+
@return map.get($palette, contrast, $hue);
|
8
10
|
}
|
9
11
|
|
10
12
|
@function mc-palette($base-palette, $default) {
|
@@ -37,8 +39,8 @@
|
|
37
39
|
$background: map.get($theme, background);
|
38
40
|
$foreground: map.get($theme, foreground);
|
39
41
|
|
40
|
-
background-color: mc-
|
41
|
-
color: mc-
|
42
|
+
background-color: mc-css-variable(background-background, map.get($background, background));
|
43
|
+
color: mc-css-variable(foreground-text, map.get($foreground, text));
|
42
44
|
}
|
43
45
|
|
44
46
|
.mc-theme-loaded-marker {
|
@@ -46,23 +48,23 @@
|
|
46
48
|
}
|
47
49
|
|
48
50
|
.mc-primary {
|
49
|
-
color: mc-
|
51
|
+
color: mc-css-variable(primary-default, map.get($theme, primary, default));
|
50
52
|
}
|
51
53
|
|
52
54
|
.mc-error {
|
53
|
-
color: mc-
|
55
|
+
color: mc-css-variable(error-default, map.get($theme, error, default));
|
54
56
|
}
|
55
57
|
|
56
58
|
.mc-warning {
|
57
|
-
color: mc-
|
59
|
+
color: mc-css-variable(warning-default, map.get($theme, warning, default));
|
58
60
|
}
|
59
61
|
|
60
62
|
.mc-success {
|
61
|
-
color: mc-
|
63
|
+
color: mc-css-variable(success-default, map.get($theme, success, default));
|
62
64
|
}
|
63
65
|
|
64
66
|
.mc-info {
|
65
|
-
color: mc-
|
67
|
+
color: mc-css-variable(info-default, map.get($theme, info, default));
|
66
68
|
}
|
67
69
|
}
|
68
70
|
|